diff --git a/web/frontend/src/Job.root.svelte b/web/frontend/src/Job.root.svelte
index 58c0d56..92c230b 100644
--- a/web/frontend/src/Job.root.svelte
+++ b/web/frontend/src/Job.root.svelte
@@ -43,12 +43,19 @@
// TODO: Do not even fetch metrics that are not one of the following: flops_any, mem_bw, job_view_selectedMetrics, job_view_nodestats_selectedMetrics
selectedMetrics = ccconfig[`job_view_selectedMetrics:${job.cluster}`]
|| clusters.find(c => c.name == job.cluster).metricConfig.map(mc => mc.name)
+
+
+ // selectedMetrics = ccconfig[`job_view_selectedMetrics:${job.cluster}`]
+ // || clusters.find(c => c.name == job.cluster).metricConfig.map(mc => mc.name)
+
+ // let toFetch = new Set(['flops_any', 'mem_bw', ])
})
let plots = {}, jobTags, fullWidth, statsTable
$: polarPlotSize = Math.min(fullWidth / 3 - 10, 300)
$: document.title = $initq.fetching ? 'Loading...' : ($initq.error ? 'Error' : `Job ${$initq.data.job.jobId} - ClusterCockpit`)
+ // Find out what metrics or hosts are missing:
let missingMetrics = [], missingHosts = [], somethingMissing = false
$: if ($initq.data && $jobMetrics.data) {
let job = $initq.data.job,
@@ -81,7 +88,7 @@
@@ -179,7 +186,12 @@
{/if}
{#if $jobMetrics.data}
-
+ {#key $jobMetrics.data}
+
+ {/key}
{/if}
diff --git a/web/frontend/src/MetricSelection.svelte b/web/frontend/src/MetricSelection.svelte
index 4119256..85afe65 100644
--- a/web/frontend/src/MetricSelection.svelte
+++ b/web/frontend/src/MetricSelection.svelte
@@ -34,7 +34,8 @@
}
newMetricsOrder = [...allMetrics].filter(m => !metrics.includes(m))
- newMetricsOrder.unshift(...metrics)
+ newMetricsOrder.unshift(...metrics.filter(m => allMetrics.has(m)))
+ unorderedMetrics = unorderedMetrics.filter(m => allMetrics.has(m))
})
const updateConfiguration = mutation({
diff --git a/web/frontend/src/StatsTable.svelte b/web/frontend/src/StatsTable.svelte
index e9400ac..f459fd9 100644
--- a/web/frontend/src/StatsTable.svelte
+++ b/web/frontend/src/StatsTable.svelte
@@ -17,7 +17,8 @@
selectedScopes = {},
sorting = {},
isMetricSelectionOpen = false,
- selectedMetrics = getContext('cc-config').job_view_nodestats_selectedMetrics
+ selectedMetrics = getContext('cc-config')[`job_view_nodestats_selectedMetrics:${job.cluster}`]
+ || getContext('cc-config')['job_view_nodestats_selectedMetrics']
for (let metric of allMetrics) {
selectedScopes[metric] = maxScope(scopesForMetric(metric))
@@ -116,7 +117,8 @@
diff --git a/web/frontend/src/utils.js b/web/frontend/src/utils.js
index decfdc6..da5e471 100644
--- a/web/frontend/src/utils.js
+++ b/web/frontend/src/utils.js
@@ -250,13 +250,17 @@ export async function fetchMetrics(job, metrics, scopes) {
export function fetchMetricsStore() {
let set = null
+ let prev = { fetching: true, error: null, data: null }
return [
- readable({ fetching: true, error: null, data: null }, (_set) => { set = _set }),
- (job, metrics, scopes) => fetchMetrics(job, metrics, scopes).then(res => set({
- fetching: false,
- error: res.error,
- data: res.data
- }))
+ readable(prev, (_set) => { set = _set }),
+ (job, metrics, scopes) => fetchMetrics(job, metrics, scopes).then(res => {
+ let next = { fetching: false, error: res.error, data: res.data }
+ if (prev.data && next.data)
+ next.data.jobMetrics.push(...prev.data.jobMetrics)
+
+ prev = next
+ set(next)
+ })
]
}