mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-11-10 08:57:25 +01:00
Fix frontend error when loading unconfig'd metric
This commit is contained in:
parent
b8e864e6e4
commit
760d3dec0f
@ -85,9 +85,12 @@
|
||||
.map(function (name) {
|
||||
// Get MetricConf for this selected/requested metric
|
||||
let thisConfig = metricConfig(cluster, name);
|
||||
let thisSCIndex = thisConfig.subClusters.findIndex(
|
||||
(sc) => sc.name == job.subCluster
|
||||
);
|
||||
let thisSCIndex = -1
|
||||
if (thisConfig) {
|
||||
thisSCIndex = thisConfig.subClusters.findIndex(
|
||||
(sc) => sc.name == job.subCluster
|
||||
);
|
||||
};
|
||||
// Check if Subcluster has MetricConf: If not found (index == -1), no further remove flag check required
|
||||
if (thisSCIndex >= 0) {
|
||||
// SubCluster Config present: Check if remove flag is set
|
||||
|
Loading…
Reference in New Issue
Block a user