Преглед изворни кода

some cleanup

Signed-off-by: Thomas Evans <tevans3@icloud.com>
jjarrett21 пре 2 година
родитељ
комит
8879cc9c76
2 измењених фајлова са 4 додато и 2 уклоњено
  1. 3 1
      ui/src/CloudCost/CloudCost.js
  2. 1 1
      ui/src/CloudCostReports.js

+ 3 - 1
ui/src/CloudCost/CloudCost.js

@@ -155,7 +155,9 @@ const CloudCost = ({ cumulativeData, totalData, graphData, currency }) => {
                     >
                       {cell.id === "kubernetesPercent"
                         ? round(totalData[cell.id] * 100, 2) + "%"
-                        : totalData[cell.id]}
+                        : isNaN(totalData[cell.id])
+                        ? "Totals"
+                        : toCurrency(round(totalData[cell.id]), currency)}
                     </TableCell>
                   );
                 })}

+ 1 - 1
ui/src/CloudCostReports.js

@@ -169,7 +169,7 @@ const CloudCostReports = () => {
   React.useEffect(() => {
     setFetch(true);
     setTitle(generateTitle({ window, aggregateBy, costMetric }));
-  }, [window, aggregateBy, costMetric, fetch]);
+  }, [window, aggregateBy, costMetric]);
 
   return (
     <Page active="cloud.html">