mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-07-22 12:41:39 +02:00
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:
@@ -68,8 +68,23 @@ func initClusterConfig() error {
|
||||
}
|
||||
|
||||
for _, sc := range cluster.SubClusters {
|
||||
newMetric := mc
|
||||
newMetric.SubClusters = nil
|
||||
newMetric := &schema.MetricConfig{
|
||||
Unit: mc.Unit,
|
||||
Energy: mc.Energy,
|
||||
Name: mc.Name,
|
||||
Scope: mc.Scope,
|
||||
Aggregation: mc.Aggregation,
|
||||
Peak: mc.Peak,
|
||||
Caution: mc.Caution,
|
||||
Alert: mc.Alert,
|
||||
Timestep: mc.Timestep,
|
||||
Normal: mc.Normal,
|
||||
LowerIsBetter: mc.LowerIsBetter,
|
||||
}
|
||||
|
||||
if mc.Footprint != "" {
|
||||
newMetric.Footprint = mc.Footprint
|
||||
}
|
||||
|
||||
if cfg, ok := scLookup[sc.Name]; ok {
|
||||
if !cfg.Remove {
|
||||
|
Reference in New Issue
Block a user