From 4aa9c4831f93b5411a0f64012843dc569748cc57 Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Thu, 24 Aug 2023 09:49:19 +0200 Subject: [PATCH] Make columns responsive --- web/frontend/src/Status.root.svelte | 394 +++++++++++++++++++++------- 1 file changed, 293 insertions(+), 101 deletions(-) diff --git a/web/frontend/src/Status.root.svelte b/web/frontend/src/Status.root.svelte index 244862c..3b85b7d 100644 --- a/web/frontend/src/Status.root.svelte +++ b/web/frontend/src/Status.root.svelte @@ -1,82 +1,182 @@ -

Current utilization of cluster "{cluster}"

+

Current utilization of cluster "{cluster}"

{#if $initq.fetching || $mainQuery.fetching} - + {:else if $initq.error} {$initq.error.message} {:else} @@ -84,10 +184,13 @@ {/if} - { - from = new Date(Date.now() - 5 * 60 * 1000) - to = new Date(Date.now()) - }} /> + { + from = new Date(Date.now() - 5 * 60 * 1000); + to = new Date(Date.now()); + }} + />
{#if $mainQuery.error} @@ -98,43 +201,85 @@ {/if} -
+
{#if $initq.data && $mainQuery.data} - {#each $initq.data.clusters.find(c => c.name == cluster).subClusters as subCluster, i} - - + {#each $initq.data.clusters.find((c) => c.name == cluster).subClusters as subCluster, i} + + - SubCluster "{subCluster.name}" + SubCluster "{subCluster.name}" - - + + - - + + - +
Allocated Nodes
{allocatedNodes[subCluster.name]} / {subCluster.numberOfNodes} Nodes
+ +
{allocatedNodes[subCluster.name]} / {subCluster.numberOfNodes} + Nodes
Flop Rate (Any)
Flop Rate (Any)
+ +
- {scaleNumbers(flopRate[subCluster.name], - (subCluster.flopRateSimd.value * subCluster.numberOfNodes), - flopRateUnitPrefix[subCluster.name]) - }{flopRateUnitBase[subCluster.name]} [Max] + {scaleNumbers( + flopRate[subCluster.name], + subCluster.flopRateSimd.value * + subCluster.numberOfNodes, + flopRateUnitPrefix[subCluster.name] + )}{flopRateUnitBase[subCluster.name]} [Max]
MemBw Rate
+ +
- {scaleNumbers(memBwRate[subCluster.name], - (subCluster.memoryBandwidth.value * subCluster.numberOfNodes), - memBwRateUnitPrefix[subCluster.name]) - }{memBwRateUnitBase[subCluster.name]} [Max] + {scaleNumbers( + memBwRate[subCluster.name], + subCluster.memoryBandwidth.value * + subCluster.numberOfNodes, + memBwRateUnitPrefix[subCluster.name] + )}{memBwRateUnitBase[subCluster.name]} [Max]
@@ -145,40 +290,65 @@
{#key $mainQuery.data.nodeMetrics} data.subCluster == subCluster.name))} /> + width={plotWidths[i] - 10} + height={300} + colorDots={true} + showTime={false} + cluster={subCluster} + data={transformPerNodeData( + $mainQuery.data.nodeMetrics.filter( + (data) => data.subCluster == subCluster.name + ) + )} + /> {/key}
{/each} -
+
- +

Top Users

{#key $mainQuery.data} b.count - a.count).map((tu) => tu.count)} - entities={$mainQuery.data.topUsers.sort((a, b) => b.count - a.count).map((tu) => tu.name)} - + sliceLabel="Jobs" + quantities={$mainQuery.data.topUsers + .sort((a, b) => b.count - a.count) + .map((tu) => tu.count)} + entities={$mainQuery.data.topUsers + .sort((a, b) => b.count - a.count) + .map((tu) => tu.name)} /> {/key}
- + {#each $mainQuery.data.topUsers.sort((a, b) => b.count - a.count) as { name, count }, i} - - + + {/each} @@ -189,38 +359,58 @@ {#key $mainQuery.data} b.count - a.count).map((tp) => tp.count)} - entities={$mainQuery.data.topProjects.sort((a, b) => b.count - a.count).map((tp) => tp.name)} + sliceLabel="Jobs" + quantities={$mainQuery.data.topProjects + .sort((a, b) => b.count - a.count) + .map((tp) => tp.count)} + entities={$mainQuery.data.topProjects + .sort((a, b) => b.count - a.count) + .map((tp) => tp.name)} /> {/key}
LegendUser NameNumber of Nodes
LegendUser NameNumber of Nodes
{name}{name} {count}
- + {#each $mainQuery.data.topProjects.sort((a, b) => b.count - a.count) as { name, count }, i} - - + + {/each}
LegendProject CodeNumber of Nodes
LegendProject CodeNumber of Nodes
{name}{name} {count}
-
- +
+
{#key $mainQuery.data.stats} + yunit="Jobs" + /> {/key}
@@ -231,10 +421,12 @@ width={colWidth2 - 25} title="Number of Nodes Distribution" xlabel="Allocated Nodes" - xunit="Nodes" + xunit="Nodes" ylabel="Number of Jobs" - yunit="Jobs"/> + yunit="Jobs" + /> {/key}
-{/if} \ No newline at end of file +{/if} +