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)
  • Loading branch information
smitajoshi12 authored Jul 25, 2024
1 parent 324d296 commit 96e1a8c
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 @@ -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",
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&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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,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 @@ -323,8 +323,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 96e1a8c

Please sign in to comment.