AjayTripathy před 6 roky
rodič
revize
3c1a6a1962
1 změnil soubory, kde provedl 1 přidání a 3 odebrání
  1. 1 3
      costmodel/cluster.go

+ 1 - 3
costmodel/cluster.go

@@ -144,9 +144,7 @@ func resultToTotal(qr interface{}) (map[string][][]string, error) {
 // ClusterCostsForAllClusters gives the cluster costs averaged over a window of time for all clusters.
 // ClusterCostsForAllClusters gives the cluster costs averaged over a window of time for all clusters.
 func ClusterCostsForAllClusters(cli prometheusClient.Client, cloud costAnalyzerCloud.Provider, windowString, offset string) (map[string]*Totals, error) {
 func ClusterCostsForAllClusters(cli prometheusClient.Client, cloud costAnalyzerCloud.Provider, windowString, offset string) (map[string]*Totals, error) {
 
 
-	if offset != "" {
-		offset = fmt.Sprintf("offset 3h") // Set offset to 3h for block sync
-	}
+	offset = fmt.Sprintf("offset 3h") // Set offset to 3h for block sync
 
 
 	qCores := fmt.Sprintf(queryClusterCores, offset, offset, offset)
 	qCores := fmt.Sprintf(queryClusterCores, offset, offset, offset)
 	qRAM := fmt.Sprintf(queryClusterRAM, offset, offset)
 	qRAM := fmt.Sprintf(queryClusterRAM, offset, offset)