mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-25 04:49:05 +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) {
|
.map(function (name) {
|
||||||
// Get MetricConf for this selected/requested metric
|
// Get MetricConf for this selected/requested metric
|
||||||
let thisConfig = metricConfig(cluster, name);
|
let thisConfig = metricConfig(cluster, name);
|
||||||
let thisSCIndex = thisConfig.subClusters.findIndex(
|
let thisSCIndex = -1
|
||||||
(sc) => sc.name == job.subCluster
|
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
|
// Check if Subcluster has MetricConf: If not found (index == -1), no further remove flag check required
|
||||||
if (thisSCIndex >= 0) {
|
if (thisSCIndex >= 0) {
|
||||||
// SubCluster Config present: Check if remove flag is set
|
// SubCluster Config present: Check if remove flag is set
|
||||||
|
Loading…
Reference in New Issue
Block a user