Fix exclusive to shared in svlete and graphql

This commit is contained in:
Aditya Ujeniya
2025-09-09 14:57:05 +02:00
parent d00881de2e
commit 3b9d05cc6d
16 changed files with 35 additions and 132 deletions

View File

@@ -56,7 +56,7 @@
job(id: "${dbid}") {
id, jobId, user, project, cluster, startTime,
duration, numNodes, numHWThreads, numAcc, energy,
SMT, exclusive, partition, subCluster, arrayJobId,
SMT, shared, partition, subCluster, arrayJobId,
monitoringStatus, state, walltime,
tags { id, type, scope, name },
resources { hostname, hwthreads, accelerators },
@@ -325,7 +325,7 @@
metricUnit={$initq.data.globalMetrics.find((gm) => gm.name == item.metric)?.unit}
nativeScope={$initq.data.globalMetrics.find((gm) => gm.name == item.metric)?.scope}
presetScopes={item.data.map((x) => x.scope)}
isShared={$initq.data.job.exclusive != 1}
isShared={$initq.data.job.shared != "none"}
/>
{:else if item.disabled == true}
<Card color="info">

View File

@@ -69,7 +69,7 @@
hostname
}
SMT
exclusive
shared
partition
arrayJobId
monitoringStatus

View File

@@ -172,7 +172,7 @@
{job.numNodes}
{/if}
<Icon name="pc-horizontal" />
{#if job.exclusive != 1}
{#if job.shared != "none"}
(shared)
{/if}
{#if job.numAcc > 0}

View File

@@ -213,7 +213,7 @@
metric={metric.data.name}
cluster={cluster.find((c) => c.name == job.cluster)}
subCluster={job.subCluster}
isShared={job.exclusive != 1}
isShared={job.shared != "none"}
numhwthreads={job.numHWThreads}
numaccs={job.numAcc}
zoomState={zoomStates[metric.data.name] || null}

View File

@@ -92,7 +92,7 @@
Missing Metric
</Button>
</InputGroup>
{:else if nodeJobsData.jobs.count == 1 && nodeJobsData.jobs.items[0].exclusive}
{:else if nodeJobsData.jobs.count == 1 && nodeJobsData.jobs.items[0].shared == "none"}
<InputGroup>
<InputGroupText>
<Icon name="circle-fill"/>
@@ -104,7 +104,7 @@
Exclusive
</Button>
</InputGroup>
{:else if nodeJobsData.jobs.count >= 1 && !nodeJobsData.jobs.items[0].exclusive}
{:else if nodeJobsData.jobs.count >= 1 && !(nodeJobsData.jobs.items[0].shared == "none")}
<InputGroup>
<InputGroupText>
<Icon name="circle-half"/>

View File

@@ -45,7 +45,7 @@
jobId
user
project
exclusive
shared
resources {
hostname
accelerators
@@ -101,7 +101,7 @@
function buildExtendedLegend() {
let pendingExtendedLegendData = null
// Build Extended for allocated nodes [Commented: Only Build extended Legend For Shared Nodes]
if ($nodeJobsData.data.jobs.count >= 1) { // "&& !$nodeJobsData.data.jobs.items[0].exclusive)"
if ($nodeJobsData.data.jobs.count >= 1) {
const accSet = Array.from(new Set($nodeJobsData.data.jobs.items
.map((i) => i.resources
.filter((r) => (r.hostname === nodeData.host) && r?.accelerators)