Browse Source

reverted cluster aggregation changes

Signed-off-by: Andrii Chubatiuk <andrew.chubatiuk@gmail.com>
Signed-off-by: Kaelan Patel <kaelanspatel@gmail.com>
Andrii Chubatiuk 3 years ago
parent
commit
bee6a62393
1 changed files with 6 additions and 0 deletions
  1. 6 0
      ui/src/Reports.js

+ 6 - 0
ui/src/Reports.js

@@ -154,6 +154,12 @@ const ReportsPage = () => {
       if (resp.data && resp.data.length > 0) {
         const allocationRange = resp.data
         for (const i in allocationRange) {
+          // update cluster aggregations to use clusterName/clusterId names
+	  if (aggregateBy == 'cluster') {
+            for (const k in allocationRange[i]) {
+              allocationRange[i][k].name = 'cluster-one';
+            }
+          }
           allocationRange[i] = sortBy(allocationRange[i], a => a.totalCost)
         }
         setAllocationData(allocationRange)