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

some cleanup

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

+ 4 - 4
ui/src/CloudCost/CloudCost.js

@@ -57,13 +57,13 @@ const CloudCost = ({ cumulativeData, totalData, graphData, currency }) => {
       id: "kubernetesPercent",
       id: "kubernetesPercent",
       numeric: true,
       numeric: true,
       label: "K8's Utilization",
       label: "K8's Utilization",
-      width: 90,
+      width: 200,
     },
     },
     {
     {
       id: "cost",
       id: "cost",
       numeric: true,
       numeric: true,
       label: "Sum of Sample Data",
       label: "Sum of Sample Data",
-      width: 90,
+      width: 200,
     },
     },
   ];
   ];
 
 
@@ -154,7 +154,7 @@ const CloudCost = ({ cumulativeData, totalData, graphData, currency }) => {
                       style={{ fontWeight: 500 }}
                       style={{ fontWeight: 500 }}
                     >
                     >
                       {cell.id === "kubernetesPercent"
                       {cell.id === "kubernetesPercent"
-                        ? round(totalData[cell.id] * 100, 2)
+                        ? round(totalData[cell.id] * 100, 2) + "%"
                         : toCurrency(round(totalData[cell.id]), currency)}
                         : toCurrency(round(totalData[cell.id]), currency)}
                     </TableCell>
                     </TableCell>
                   );
                   );
@@ -165,7 +165,7 @@ const CloudCost = ({ cumulativeData, totalData, graphData, currency }) => {
                   <TableRow key={key}>
                   <TableRow key={key}>
                     <TableCell align="left">{row.name}</TableCell>
                     <TableCell align="left">{row.name}</TableCell>
                     <TableCell align="right">
                     <TableCell align="right">
-                      {round(row.kubernetesPercent * 100)}
+                      {round(row.kubernetesPercent * 100) + "%"}
                     </TableCell>
                     </TableCell>
                     <TableCell align="right">
                     <TableCell align="right">
                       {toCurrency(row.cost, currency)}
                       {toCurrency(row.cost, currency)}

+ 1 - 1
ui/src/CloudCost/CloudCostChart/RangeChart.js

@@ -1,4 +1,4 @@
-import React, { useEffect } from "react";
+import React from "react";
 import { makeStyles } from "@material-ui/styles";
 import { makeStyles } from "@material-ui/styles";
 import {
 import {
   BarChart,
   BarChart,