From 8aa7f4eb07197e9a835ec472b615933a40d95c63 Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Tue, 13 Jun 2023 16:42:04 +0200 Subject: [PATCH 1/3] Fix roofline data reference - caused roofline data being regarded as missing --- web/frontend/src/plots/Roofline.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/frontend/src/plots/Roofline.svelte b/web/frontend/src/plots/Roofline.svelte index 14229f3..831eb2d 100644 --- a/web/frontend/src/plots/Roofline.svelte +++ b/web/frontend/src/plots/Roofline.svelte @@ -279,8 +279,8 @@ export function transformPerNodeData(nodes) { const x = [], y = [], c = [] for (let node of nodes) { - let flopsAny = node.metrics.find(m => m.name == 'flops_any' && m.metric.scope == 'node')?.metric - let memBw = node.metrics.find(m => m.name == 'mem_bw' && m.metric.scope == 'node')?.metric + let flopsAny = node.metrics.find(m => m.name == 'flops_any' && m.scope == 'node')?.metric + let memBw = node.metrics.find(m => m.name == 'mem_bw' && m.scope == 'node')?.metric if (!flopsAny || !memBw) { console.warn("transformPerNodeData: metrics for 'mem_bw' and/or 'flops_any' missing!") continue From cdd25eaa15fdca6009f945bd1f3db3b5168edf82 Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Tue, 13 Jun 2023 16:42:32 +0200 Subject: [PATCH 2/3] Fix job view scope dropdown data load --- web/frontend/src/Metric.svelte | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/web/frontend/src/Metric.svelte b/web/frontend/src/Metric.svelte index ad691ca..cf82a3e 100644 --- a/web/frontend/src/Metric.svelte +++ b/web/frontend/src/Metric.svelte @@ -18,9 +18,9 @@ let selectedHost = null, plot, fetching = false, error = null let selectedScope = minScope(scopes) - let selectedScopeIndex = scopes.findIndex(s => s == selectedScope) - $: avaliableScopes = scopes + $: availableScopes = scopes + $: selectedScopeIndex = scopes.findIndex(s => s == selectedScope) $: data = rawData[selectedScopeIndex] $: series = data?.series.filter(series => selectedHost == null || series.hostname == selectedHost) @@ -43,11 +43,11 @@ for (let jm of response.data.jobMetrics) { if (jm.scope != "node") { - scopes.push(jm.metric) + scopes = [...scopes, jm.scope] + rawData.push(jm.metric) selectedScope = jm.scope + selectedScopeIndex = scopes.findIndex(s => s == jm.scope) dispatch('more-loaded', jm) - if (!avaliableScopes.includes(selectedScope)) - avaliableScopes = [...avaliableScopes, selectedScope] } } } @@ -59,11 +59,11 @@ {metricName} ({(metricConfig?.unit?.prefix ? metricConfig.unit.prefix : '') + (metricConfig?.unit?.base ? metricConfig.unit.base : '')}) - + {#each availableScopes as scope} {/each} - {#if avaliableScopes.length == 1 && metricConfig?.scope != "node"} + {#if availableScopes.length == 1 && metricConfig?.scope != "node"} {/if} From 3c2ad234df0f1311e5230268fbc5d4068f459971 Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Tue, 13 Jun 2023 16:49:34 +0200 Subject: [PATCH 3/3] Remove non required dev leftover --- web/frontend/src/Metric.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/frontend/src/Metric.svelte b/web/frontend/src/Metric.svelte index cf82a3e..40ad236 100644 --- a/web/frontend/src/Metric.svelte +++ b/web/frontend/src/Metric.svelte @@ -59,7 +59,7 @@ {metricName} ({(metricConfig?.unit?.prefix ? metricConfig.unit.prefix : '') + (metricConfig?.unit?.base ? metricConfig.unit.base : '')}) - {#each availableScopes as scope} {/each}