smengcl commented on code in PR #3789:
URL: https://github.com/apache/ozone/pull/3789#discussion_r998494988
##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/diskUsage/diskUsage.tsx:
##########
@@ -152,26 +152,39 @@ export class DiskUsage extends
React.Component<Record<string, object>, IDUState>
subpaths.push(other);
}
- const pathLabels = subpaths.map(subpath => {
- // The return subPath must be normalized in a format with
- // a leading slash and without trailing slash
- const pieces = subpath.path.split('/');
- const subpathName = pieces[pieces.length - 1];
- // Differentiate key without trailing slash
- return (subpath.isKey || subpathName === OTHER_PATH_NAME) ?
subpathName : subpathName + '/';
- });
+ let pathLabels, values, percentage, sizeStr, pieces, subpathName;
+
+ if (duResponse.subPathCount === 0 || subpaths === 0) {
+ pieces = duResponse && duResponse.path.split('/');
+ subpathName = pieces[pieces.length - 1];
+ pathLabels = [subpathName];
+ values = [0.1];
Review Comment:
Note: It is just a dummy value
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]