dombizita commented on code in PR #3907:
URL: https://github.com/apache/ozone/pull/3907#discussion_r1013991054
##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/insights.tsx:
##########
@@ -89,8 +89,14 @@ export class Insights extends React.Component<Record<string,
object>, IInsightsS
// selected buckets value should be reset to all buckets
let selectedBuckets = [allBucketsOption];
// Update bucket options only if one volume is selected
- if (selectedVolumes && selectedVolumes.length === 1) {
- const selectedVolume = selectedVolumes[0].value;
+ if (((selectedVolumes && selectedVolumes.length != null) &&
(selectedVolumes.length === 2 && selectedVolumes[0].value === '*')) ||
(selectedVolumes.length === 1)){
Review Comment:
Is the `selectedVolumes.length != null` necessary? Later we are checking if
the size is either 1 or 2.
```suggestion
if ((selectedVolumes && (selectedVolumes.length === 2 &&
selectedVolumes[0].value === '*')) || (selectedVolumes.length === 1)){
```
--
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]