From e80ce7a4742f4cfe19efb6170ade0d7f53b847ca Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Thu, 10 Aug 2023 18:06:19 +0200 Subject: [PATCH] feat: Rework analysis view top to contain piechart --- web/frontend/src/Analysis.root.svelte | 134 +++++++++++++++----------- 1 file changed, 78 insertions(+), 56 deletions(-) diff --git a/web/frontend/src/Analysis.root.svelte b/web/frontend/src/Analysis.root.svelte index 1cfadc9..ba04e05 100644 --- a/web/frontend/src/Analysis.root.svelte +++ b/web/frontend/src/Analysis.root.svelte @@ -6,7 +6,8 @@ import Filters from './filters/Filters.svelte' import PlotSelection from './PlotSelection.svelte' import Histogramuplot from './plots/Histogramuplot.svelte' - import Histogram, { binsFromFootprint } from './plots/Histogram.svelte' + import Pie from './plots/Pie.svelte' + import { binsFromFootprint } from './plots/Histogram.svelte' import ScatterPlot from './plots/Scatter.svelte' import PlotTable from './PlotTable.svelte' import Roofline from './plots/Roofline.svelte' @@ -30,7 +31,7 @@ let filterComponent; // see why here: https://stackoverflow.com/questions/58287729/how-can-i-export-a-function-from-a-svelte-component-that-changes-a-value-in-the let jobFilters = []; let rooflineMaxY; - let colWidth; + let colWidth1, colWidth2, colWidth3, colWidth4; let numBins = 50; let maxY = -1; const ccconfig = getContext('cc-config') @@ -135,82 +136,103 @@ {:else if $statsQuery.data} - -
-
- - - - - - - - - - - - - - - - - -
Total Jobs{$statsQuery.data.stats[0].totalJobs}
Short Jobs{$statsQuery.data.stats[0].shortJobs}
Total Walltime{$statsQuery.data.stats[0].totalWalltime}
Total Core Hours{$statsQuery.data.stats[0].totalCoreHours}
+ + + + + + + + + + + + + + + + + + + +
Total Jobs{$statsQuery.data.stats[0].totalJobs}
Short Jobs{$statsQuery.data.stats[0].shortJobs}
Total Walltime{$statsQuery.data.stats[0].totalWalltime}
Total Core Hours{$statsQuery.data.stats[0].totalCoreHours}
+ + +
+
Top Users
+ {#key $statsQuery.data.topUsers} + b.count - a.count).map((tu) => tu.count)} + entities={$statsQuery.data.topUsers.sort((a, b) => b.count - a.count).map((tu) => tu.name)} + /> + {/key}
-
- {#key $statsQuery.data.topUsers} -

Top Users (by node hours)

- b.count - a.count).map(({ count }, idx) => ({ count, value: idx }))} - label={(x) => x < $statsQuery.data.topUsers.length ? $statsQuery.data.topUsers[Math.floor(x)].name : 'No Users'} - ylabel="Node Hours [h]"/> + + + + + {#each $statsQuery.data.topUsers.sort((a, b) => b.count - a.count) as { name, count }} + + + + + {/each} +
User NameNode Hours
{name}{count}
+ + + + + {#if $rooflineQuery.fetching} + + {:else if $rooflineQuery.error} + {$rooflineQuery.error.message} + {:else if $rooflineQuery.data && cluster} +
+ {#key $rooflineQuery.data} + {/key} -
-
-
+
+ {/if} + + +
{#key $statsQuery.data.stats[0].histDuration} {/key} -
-
+
+ + +
{#key $statsQuery.data.stats[0].histNumNodes} {/key} -
-
- {#if $rooflineQuery.fetching} - - {:else if $rooflineQuery.error} - {$rooflineQuery.error.message} - {:else if $rooflineQuery.data && cluster} - {#key $rooflineQuery.data} - - {/key} - {/if} -
+
+ {/if} -
+
+ {#if $footprintsQuery.error} @@ -284,7 +306,7 @@ {/if}