sravani-revuri commented on code in PR #11924:
URL: https://github.com/apache/ozone/pull/11924#discussion_r4489961586


##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/heatMap/heatmap.tsx:
##########


Review Comment:
   from the screenshot i notice that both files appear red , but one has only 1 
read and the other 5000. This implies that they're equally hot.
   The backend still omits the color field when accessCount / maxAccessCount < 
0.0005, truncating to 0.000. When AG Charts can't find the color property, it 
seems to default to red.
   can we handle this case from the backend to return colour even if its 0?
   
   @spacemonkd , @ArafatKhan2198 , @chihsuan what do you think?



##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/heatMap/heatMapConfiguration.tsx:
##########
@@ -94,7 +94,7 @@ export default class HeatMapConfiguration extends 
React.Component<IHeatmapConfig
               nodeClick: (event) => {
               var data = event.datum;
               // Leaf level box should not call API
-              if (!data.color)
+              if (data.children?.length)

Review Comment:
   nit : same here can replace with && to read cleaner



##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/components/plots/heatmapPlot.tsx:
##########
@@ -131,7 +131,7 @@ const HeatmapPlot: React.FC<HeatmapPlotProps> = ({
         nodeClick: (event) => {
         var data = event.datum;
         // Leaf level box should not call API
-        if (!data.color)
+        if (data.children?.length)
           if (data.path) {
             onClick(data.path);
           }

Review Comment:
   nit: can the nested if be made into a single if case with &&



-- 
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]

Reply via email to