fix metricconfig pointer copy, add disabled metric card in jobView

- skips disabled metrics in backend, see cc-backend tries to retrieve "removed" metrics #377
This commit is contained in:
Christoph Kluge
2025-04-16 18:36:12 +02:00
parent a6784b5549
commit 29ae2423f8
4 changed files with 70 additions and 15 deletions

View File

@@ -302,6 +302,20 @@ func (ccms *CCMetricStore) buildQueries(
continue
}
// Skip if metric is removed for subcluster
if len(mc.SubClusters) != 0 {
isRemoved := false
for _, scConfig := range mc.SubClusters {
if scConfig.Name == job.SubCluster && scConfig.Remove == true {
isRemoved = true
break
}
}
if isRemoved {
continue
}
}
// Avoid duplicates...
handledScopes := make([]schema.MetricScope, 0, 3)
@@ -985,6 +999,20 @@ func (ccms *CCMetricStore) buildNodeQueries(
continue
}
// Skip if metric is removed for subcluster
if mc.SubClusters != nil {
isRemoved := false
for _, scConfig := range mc.SubClusters {
if scConfig.Name == subCluster && scConfig.Remove == true {
isRemoved = true
break
}
}
if isRemoved {
continue
}
}
// Avoid duplicates...
handledScopes := make([]schema.MetricScope, 0, 3)