diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/api/db.json b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/api/db.json index b28c510363a..3362faf6281 100644 --- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/api/db.json +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/api/db.json @@ -1857,6 +1857,15 @@ ], "sizeDirectKey": 0 }, + "replica": { + "status": "OK", + "path": "/s3v/fso-bucket/dir1/key1-fso", + "size": 17289, + "sizeWithReplica": 17289, + "subPathCount": 0, + "subPaths": [], + "sizeDirectKey": -1 + }, "taskStatus": [ { "taskName": "ContainerKeyMapperTask", diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/api/routes.json b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/api/routes.json index b2136d074b0..86d7a51a567 100644 --- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/api/routes.json +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/api/routes.json @@ -21,6 +21,7 @@ "/namespace/du?path=/dummyVolume/dummyBucket/key:id*": "/key", "/namespace/du?path=/vol1/bucket1/empty&files=true&sortSubPaths=true": "/empty", "/namespace/du?path=/clunky&files=true&sortSubpaths=true": "/clunky", + "/namespace/du?path=/*&replica=true": "/replica", "/namespace/summary?path=*": "/metadata", "/namespace/quota?path=*": "/quota", "/task/status": "/taskStatus", diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/diskUsage/diskUsage.tsx b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/diskUsage/diskUsage.tsx index 091d8a146d3..873d8a16d93 100644 --- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/diskUsage/diskUsage.tsx +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/diskUsage/diskUsage.tsx @@ -314,7 +314,7 @@ export class DiskUsage extends React.Component, IDUState> keys.push('Entity Type'); values.push(summaryResponse.type); - if (summaryResponse.countStats.type === 'KEY') { + if (summaryResponse.type === 'KEY') { const keyEndpoint = `/api/v1/namespace/du?path=${path}&replica=true`; const { request: metadataRequest, controller: metadataNewController } = AxiosGetHelper(keyEndpoint, cancelKeyMetadataSignal); cancelKeyMetadataSignal = metadataNewController; @@ -323,8 +323,6 @@ export class DiskUsage extends React.Component, IDUState> values.push(byteToSize(response.data.size, 3)); keys.push('File Size With Replication'); values.push(byteToSize(response.data.sizeWithReplica, 3)); - console.log(values); - this.setState({ showPanel: true, panelKeys: keys,