From 10ca86e58397cdff3b77fd3a5ac1c0c3f1423205 Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Mon, 19 Jun 2023 10:25:34 +0200 Subject: [PATCH] Handle removed metrics in isMissing check --- web/frontend/src/Job.root.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/frontend/src/Job.root.svelte b/web/frontend/src/Job.root.svelte index cb537ec..9c74b78 100644 --- a/web/frontend/src/Job.root.svelte +++ b/web/frontend/src/Job.root.svelte @@ -87,7 +87,8 @@ metrics = $jobMetrics.data.jobMetrics, metricNames = clusters.find(c => c.name == job.cluster).metricConfig.map(mc => mc.name) - missingMetrics = metricNames.filter(metric => !metrics.some(jm => jm.name == metric)) + // Metric not found in JobMetrics && Metric not explicitly disabled: Was expected, but is Missing + missingMetrics = metricNames.filter(metric => (!metrics.some(jm => jm.name == metric) && !checkMetricDisabled(metric, $initq.data.job.cluster, $initq.data.job.subCluster))) missingHosts = job.resources.map(({ hostname }) => ({ hostname: hostname, metrics: metricNames.filter(metric => !metrics.some(jm => jm.scope == 'node' && jm.metric.series.some(series => series.hostname == hostname)))