From 998ef8d834da572a6da93fc83f1c6e9dbd74ef92 Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Wed, 19 Feb 2025 16:40:25 +0100 Subject: [PATCH] fix: use job_view_selectedMetrics config instead of iterating globalMetrics - Caveat: Minimal Defaultset needs to be generally available on all clusters --- pkg/schema/schemas/config.schema.json | 2 +- web/frontend/src/Job.root.svelte | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/pkg/schema/schemas/config.schema.json b/pkg/schema/schemas/config.schema.json index 0a3905a..f372fc1 100644 --- a/pkg/schema/schemas/config.schema.json +++ b/pkg/schema/schemas/config.schema.json @@ -446,7 +446,7 @@ } }, "job_view_selectedMetrics": { - "description": "", + "description": "Initial metrics shown as plots in single job view", "type": "array", "items": { "type": "string", diff --git a/web/frontend/src/Job.root.svelte b/web/frontend/src/Job.root.svelte index aa5b9fd..9d80bef 100644 --- a/web/frontend/src/Job.root.svelte +++ b/web/frontend/src/Job.root.svelte @@ -151,12 +151,7 @@ const roofQuery = gql` const pendingMetrics = [ ...(ccconfig[`job_view_selectedMetrics:${job.cluster}`] || - $initq.data.globalMetrics.reduce((names, gm) => { - if (gm.availability.find((av) => av.cluster === job.cluster)) { - names.push(gm.name); - } - return names; - }, []) + ccconfig[`job_view_selectedMetrics`] ), ...(ccconfig[`job_view_nodestats_selectedMetrics:${job.cluster}`] || ccconfig[`job_view_nodestats_selectedMetrics`]