mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-26 05:19:05 +01:00
add lastThreshold to jobListRow
This commit is contained in:
parent
c853d74ba0
commit
93377f53fc
@ -37,6 +37,7 @@
|
|||||||
: ["node"];
|
: ["node"];
|
||||||
let selectedResolution = resampleDefault;
|
let selectedResolution = resampleDefault;
|
||||||
let zoomStates = {};
|
let zoomStates = {};
|
||||||
|
let thresholdStates = {};
|
||||||
|
|
||||||
const cluster = getContext("clusters").find((c) => c.name == job.cluster);
|
const cluster = getContext("clusters").find((c) => c.name == job.cluster);
|
||||||
const client = getContextClient();
|
const client = getContextClient();
|
||||||
@ -80,6 +81,13 @@
|
|||||||
zoomStates[metric] = {...detail.lastZoomState}
|
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
|
if (detail?.newRes) { // Triggers GQL
|
||||||
selectedResolution = detail.newRes
|
selectedResolution = detail.newRes
|
||||||
}
|
}
|
||||||
@ -191,6 +199,7 @@
|
|||||||
numhwthreads={job.numHWThreads}
|
numhwthreads={job.numHWThreads}
|
||||||
numaccs={job.numAcc}
|
numaccs={job.numAcc}
|
||||||
zoomState={zoomStates[metric.data.name] || null}
|
zoomState={zoomStates[metric.data.name] || null}
|
||||||
|
thresholdState={thresholdStates[metric.data.name] || null}
|
||||||
/>
|
/>
|
||||||
{:else if metric.disabled == true && metric.data}
|
{:else if metric.disabled == true && metric.data}
|
||||||
<Card body color="info"
|
<Card body color="info"
|
||||||
|
Loading…
Reference in New Issue
Block a user