mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-11-20 08:47:22 +01:00
add allocated cores gauge to status view, fix stacked labels
This commit is contained in:
@@ -51,6 +51,7 @@
|
|||||||
let stackedFrom = $state(Math.floor(Date.now() / 1000) - 14400);
|
let stackedFrom = $state(Math.floor(Date.now() / 1000) - 14400);
|
||||||
// Bar Gauges
|
// Bar Gauges
|
||||||
let allocatedNodes = $state({});
|
let allocatedNodes = $state({});
|
||||||
|
let allocatedCores = $state({});
|
||||||
let allocatedAccs = $state({});
|
let allocatedAccs = $state({});
|
||||||
let flopRate = $state({});
|
let flopRate = $state({});
|
||||||
let flopRateUnitPrefix = $state({});
|
let flopRateUnitPrefix = $state({});
|
||||||
@@ -179,6 +180,7 @@
|
|||||||
id
|
id
|
||||||
totalJobs
|
totalJobs
|
||||||
totalUsers
|
totalUsers
|
||||||
|
totalCores
|
||||||
totalAccs
|
totalAccs
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -220,6 +222,10 @@
|
|||||||
$statusQuery.data.allocatedNodes.find(
|
$statusQuery.data.allocatedNodes.find(
|
||||||
({ name }) => name == subCluster.name,
|
({ name }) => name == subCluster.name,
|
||||||
)?.count || 0;
|
)?.count || 0;
|
||||||
|
allocatedCores[subCluster.name] =
|
||||||
|
$statusQuery.data.jobsStatistics.find(
|
||||||
|
({ id }) => id == subCluster.name,
|
||||||
|
)?.totalCores || 0;
|
||||||
allocatedAccs[subCluster.name] =
|
allocatedAccs[subCluster.name] =
|
||||||
$statusQuery.data.jobsStatistics.find(
|
$statusQuery.data.jobsStatistics.find(
|
||||||
({ id }) => id == subCluster.name,
|
({ id }) => id == subCluster.name,
|
||||||
@@ -416,8 +422,8 @@
|
|||||||
<Stacked
|
<Stacked
|
||||||
data={$statesTimed?.data?.nodeStates}
|
data={$statesTimed?.data?.nodeStates}
|
||||||
width={stackedWidth1 * 0.95}
|
width={stackedWidth1 * 0.95}
|
||||||
xLabel="Time"
|
xlabel="Time"
|
||||||
yLabel="Nodes"
|
ylabel="Nodes"
|
||||||
yunit = "#Count"
|
yunit = "#Count"
|
||||||
title = "Node States"
|
title = "Node States"
|
||||||
stateType = "Node"
|
stateType = "Node"
|
||||||
@@ -434,8 +440,8 @@
|
|||||||
<Stacked
|
<Stacked
|
||||||
data={$statesTimed?.data?.healthStates}
|
data={$statesTimed?.data?.healthStates}
|
||||||
width={stackedWidth2 * 0.95}
|
width={stackedWidth2 * 0.95}
|
||||||
xLabel="Time"
|
xlabel="Time"
|
||||||
yLabel="Nodes"
|
ylabel="Nodes"
|
||||||
yunit = "#Count"
|
yunit = "#Count"
|
||||||
title = "Health States"
|
title = "Health States"
|
||||||
stateType = "Health"
|
stateType = "Health"
|
||||||
@@ -585,6 +591,21 @@
|
|||||||
Nodes</td
|
Nodes</td
|
||||||
>
|
>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr class="py-2">
|
||||||
|
<th scope="col">Allocated Cores</th>
|
||||||
|
<td style="min-width: 100px;"
|
||||||
|
><div class="col">
|
||||||
|
<Progress
|
||||||
|
value={allocatedCores[subCluster.name]}
|
||||||
|
max={subCluster.socketsPerNode * subCluster.coresPerSocket * subCluster.numberOfNodes}
|
||||||
|
/>
|
||||||
|
</div></td
|
||||||
|
>
|
||||||
|
<td
|
||||||
|
>{allocatedCores[subCluster.name]} / {subCluster.socketsPerNode * subCluster.coresPerSocket * subCluster.numberOfNodes}
|
||||||
|
Cores</td
|
||||||
|
>
|
||||||
|
</tr>
|
||||||
{#if totalAccs[subCluster.name] !== null}
|
{#if totalAccs[subCluster.name] !== null}
|
||||||
<tr class="py-2">
|
<tr class="py-2">
|
||||||
<th scope="col">Allocated Accelerators</th>
|
<th scope="col">Allocated Accelerators</th>
|
||||||
|
|||||||
Reference in New Issue
Block a user