Skip to content

Commit

Permalink
HDDS-11140. Recon Disk Usage Metadata Details are not working for du …
Browse files Browse the repository at this point in the history
…api (#6966)

(cherry picked from commit 96e1a8c)
  • Loading branch information
smitajoshi12 authored and xichen01 committed Jul 26, 2024
1 parent f82b019 commit f5cd2ec
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1806,6 +1806,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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"/namespace/du?path=/dummyVolume/dummyBucket/key:id*": "/key",
"/namespace/du?path=/vol1/bucket1/empty&files=true": "/empty",
"/namespace/du?path=/clunky&files=true": "/clunky",
"/namespace/du?path=/*&replica=true": "/replica",
"/namespace/summary?path=*": "/metadata",
"/namespace/quota?path=*": "/quota",
"/task/status": "/taskStatus",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ export class DiskUsage extends React.Component<Record<string, object>, 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;
Expand All @@ -304,8 +304,6 @@ export class DiskUsage extends React.Component<Record<string, object>, 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,
Expand Down

0 comments on commit f5cd2ec

Please sign in to comment.