fix: use job_view_selectedMetrics config instead of iterating globalMetrics

- Caveat: Minimal Defaultset needs to be generally available on all clusters
This commit is contained in:
Christoph Kluge 2025-02-19 16:40:25 +01:00
parent c25b076ca9
commit 998ef8d834
2 changed files with 2 additions and 7 deletions

View File

@ -446,7 +446,7 @@
} }
}, },
"job_view_selectedMetrics": { "job_view_selectedMetrics": {
"description": "", "description": "Initial metrics shown as plots in single job view",
"type": "array", "type": "array",
"items": { "items": {
"type": "string", "type": "string",

View File

@ -151,12 +151,7 @@ const roofQuery = gql`
const pendingMetrics = [ const pendingMetrics = [
...(ccconfig[`job_view_selectedMetrics:${job.cluster}`] || ...(ccconfig[`job_view_selectedMetrics:${job.cluster}`] ||
$initq.data.globalMetrics.reduce((names, gm) => { ccconfig[`job_view_selectedMetrics`]
if (gm.availability.find((av) => av.cluster === job.cluster)) {
names.push(gm.name);
}
return names;
}, [])
), ),
...(ccconfig[`job_view_nodestats_selectedMetrics:${job.cluster}`] || ...(ccconfig[`job_view_nodestats_selectedMetrics:${job.cluster}`] ||
ccconfig[`job_view_nodestats_selectedMetrics`] ccconfig[`job_view_nodestats_selectedMetrics`]