Bläddra i källkod

Fix ClusterDisks to sum data from results with the same name

Niko Kovacevic 6 år sedan
förälder
incheckning
a11d733720
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      pkg/costmodel/cluster.go

+ 2 - 2
pkg/costmodel/cluster.go

@@ -176,7 +176,7 @@ func ClusterDisks(client prometheus.Client, provider cloud.Provider, duration, o
 				Name:    name,
 			}
 		}
-		diskMap[key].Cost = cost
+		diskMap[key].Cost += cost
 	}
 
 	for _, result := range resPVSize {
@@ -227,7 +227,7 @@ func ClusterDisks(client prometheus.Client, provider cloud.Provider, duration, o
 				Local:   true,
 			}
 		}
-		diskMap[key].Cost = cost
+		diskMap[key].Cost += cost
 	}
 
 	for _, result := range resLocalStorageBytes {