From 93377f53fc1dc6a9dd2305b7556a585371da2e8b Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Fri, 29 Nov 2024 14:15:15 +0100 Subject: [PATCH] add lastThreshold to jobListRow --- web/frontend/src/generic/joblist/JobListRow.svelte | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/frontend/src/generic/joblist/JobListRow.svelte b/web/frontend/src/generic/joblist/JobListRow.svelte index 0900730..82cf2ed 100644 --- a/web/frontend/src/generic/joblist/JobListRow.svelte +++ b/web/frontend/src/generic/joblist/JobListRow.svelte @@ -37,6 +37,7 @@ : ["node"]; let selectedResolution = resampleDefault; let zoomStates = {}; + let thresholdStates = {}; const cluster = getContext("clusters").find((c) => c.name == job.cluster); const client = getContextClient(); @@ -80,6 +81,13 @@ zoomStates[metric] = {...detail.lastZoomState} } + if ( // States have to differ, causes deathloop if just set + detail?.lastThreshold && + thresholdStates[metric] !== detail.lastThreshold + ) { // Handle to correctly reset on summed metric scope change + thresholdStates[metric] = detail.lastThreshold; + } + if (detail?.newRes) { // Triggers GQL selectedResolution = detail.newRes } @@ -191,6 +199,7 @@ numhwthreads={job.numHWThreads} numaccs={job.numAcc} zoomState={zoomStates[metric.data.name] || null} + thresholdState={thresholdStates[metric.data.name] || null} /> {:else if metric.disabled == true && metric.data}