diff --git a/web/frontend/src/Config.root.svelte b/web/frontend/src/Config.root.svelte index dc45491..126f92b 100644 --- a/web/frontend/src/Config.root.svelte +++ b/web/frontend/src/Config.root.svelte @@ -3,6 +3,7 @@ Properties: - `ìsAdmin Bool!`: Is currently logged in user admin authority + - `isSupport Bool!`: Is currently logged in user support authority - `isApi Bool!`: Is currently logged in user api authority - `username String!`: Empty string if auth. is disabled, otherwise the username as string --> @@ -10,15 +11,17 @@ -{#if isAdmin == true} +{#if isAdmin} Admin Options @@ -27,6 +30,15 @@ {/if} +{#if isSupport || isAdmin} + + + Support Options + + + +{/if} + User Options diff --git a/web/frontend/src/Systems.root.svelte b/web/frontend/src/Systems.root.svelte index d9caf90..b9457d9 100644 --- a/web/frontend/src/Systems.root.svelte +++ b/web/frontend/src/Systems.root.svelte @@ -9,7 +9,7 @@ --> + + diff --git a/web/frontend/src/config/admin/Options.svelte b/web/frontend/src/config/admin/Options.svelte index 64c75ec..3808834 100644 --- a/web/frontend/src/config/admin/Options.svelte +++ b/web/frontend/src/config/admin/Options.svelte @@ -4,13 +4,8 @@ @@ -73,53 +41,6 @@ - - -
- handleSettingSubmit("#node-paging-form", "npag")} - > - - -
Node List Paging Type
- {#if displayMessage && message.target == "npag"}
- Update: {message.msg} -
{/if} -
- -
-
- {#if config?.node_list_usePaging} - - {:else} - - {/if} - -
-
- {#if config?.node_list_usePaging} - - {:else} - - {/if} - -
-
- -
-
- - {#if resampleConfig} diff --git a/web/frontend/src/config/support/SupportOptions.svelte b/web/frontend/src/config/support/SupportOptions.svelte new file mode 100644 index 0000000..7d9ce03 --- /dev/null +++ b/web/frontend/src/config/support/SupportOptions.svelte @@ -0,0 +1,89 @@ + + + + + + + +
+ handleSettingSubmit("#node-paging-form", "npag")} + > + + +
Node List Paging Type
+ {#if displayMessage && message.target == "npag"}
+ Update: {message.msg} +
{/if} +
+ +
+
+ {#if config?.node_list_usePaging} + + {:else} + + {/if} + +
+
+ {#if config?.node_list_usePaging} + + {:else} + + {/if} + +
+
+ +
+
+ +
\ No newline at end of file diff --git a/web/frontend/src/generic/plots/MetricPlot.svelte b/web/frontend/src/generic/plots/MetricPlot.svelte index 3d143bd..bf18881 100644 --- a/web/frontend/src/generic/plots/MetricPlot.svelte +++ b/web/frontend/src/generic/plots/MetricPlot.svelte @@ -138,6 +138,7 @@ export let numaccs = 0; export let zoomState = null; export let thresholdState = null; + export let extendedLegendData = null; if (!useStatsSeries && statisticsSeries != null) useStatsSeries = true; @@ -191,6 +192,7 @@ className && legendEl.classList.add(className); uPlot.assign(legendEl.style, { + minWidth: extendedLegendData ? "300px" : "100px", textAlign: "left", pointerEvents: "none", display: "none", @@ -307,13 +309,6 @@ } } - const plotSeries = [ - { - label: "Runtime", - value: (u, ts, sidx, didx) => - didx == null ? null : formatTime(ts, forNode), - }, - ]; const plotData = [new Array(longestSeries)]; if (forNode === true) { // Negative Timestamp Buildup @@ -330,6 +325,15 @@ plotData[0][j] = j * timestep; } + const plotSeries = [ + // Note: X-Legend Will not be shown as soon as Y-Axis are in extendedMode + { + label: "Runtime", + value: (u, ts, sidx, didx) => + (didx == null) ? null : formatTime(ts, forNode), + } + ]; + let plotBands = undefined; if (useStatsSeries) { plotData.push(statisticsSeries.min); @@ -366,15 +370,60 @@ } else { for (let i = 0; i < series.length; i++) { plotData.push(series[i].data); - plotSeries.push({ - label: - scope === "node" + // Default + if (!extendedLegendData) { + plotSeries.push({ + label: + scope === "node" ? series[i].hostname - : scope + " #" + (i + 1), - scale: "y", - width: lineWidth, - stroke: lineColor(i, series.length), - }); + : scope === "accelerator" + ? 'Acc #' + (i + 1) // series[i].id.slice(9, 14) | Too Hardware Specific + : scope + " #" + (i + 1), + scale: "y", + width: lineWidth, + stroke: lineColor(i, series.length), + }); + } + // Extended Legend For NodeList + else { + plotSeries.push({ + label: + scope === "node" + ? series[i].hostname + : scope === "accelerator" + ? 'Acc #' + (i + 1) // series[i].id.slice(9, 14) | Too Hardware Specific + : scope + " #" + (i + 1), + scale: "y", + width: lineWidth, + stroke: lineColor(i, series.length), + values: (u, sidx, idx) => { + // "i" = "sidx - 1" : sidx contains x-axis-data + if (idx == null) + return { + time: '-', + value: '-', + user: '-', + job: '-' + }; + + if (series[i].id in extendedLegendData) { + return { + time: formatTime(plotData[0][idx], forNode), + value: plotData[sidx][idx], + user: extendedLegendData[series[i].id].user, + job: extendedLegendData[series[i].id].job, + }; + } else { + return { + time: formatTime(plotData[0][idx], forNode), + value: plotData[sidx][idx], + user: '-', + job: '-', + }; + } + } + }); + } } } diff --git a/web/frontend/src/systems/nodelist/NodeInfo.svelte b/web/frontend/src/systems/nodelist/NodeInfo.svelte index 057ef9f..ad6c98e 100644 --- a/web/frontend/src/systems/nodelist/NodeInfo.svelte +++ b/web/frontend/src/systems/nodelist/NodeInfo.svelte @@ -9,7 +9,6 @@ @@ -92,127 +54,123 @@ - {#if $nodeJobsData.fetching} - - {:else if $nodeJobsData.data} - {#if healthWarn} - - - - - - Status - - - - {:else if metricWarn} - - - - - - Status - - - - {:else if $nodeJobsData.data.jobs.count == 1 && $nodeJobsData.data.jobs.items[0].exclusive} - - - - - - Status - - - - {:else if $nodeJobsData.data.jobs.count >= 1 && !$nodeJobsData.data.jobs.items[0].exclusive} - - - - - - Status - - - - {:else} - - - - - - Status - - - - {/if} -
- - + {#if healthWarn} + - + - - Activity - - - - - List - - - - - + Status - - Users - - - - - List - + - {#if userList?.length > 0} - -
- {userList.join(", ")} -
-
- {/if} - - + {:else if metricWarn} + - + - - Projects + + Status - - - - List - + - {#if projectList?.length > 0} - -
- {projectList.join(", ")} -
-
- {/if} + {:else if nodeJobsData.jobs.count == 1 && nodeJobsData.jobs.items[0].exclusive} + + + + + + Status + + + + {:else if nodeJobsData.jobs.count >= 1 && !nodeJobsData.jobs.items[0].exclusive} + + + + + + Status + + + + {:else} + + + + + + Status + + + + {/if} +
+ + + + + + + Activity + + + + + List + + + + + + + + + Users + + + + + List + + + {#if userList?.length > 0} + +
+ {userList.join(", ")} +
+
+ {/if} + + + + + + + Projects + + + + + List + + + {#if projectList?.length > 0} + +
+ {projectList.join(", ")} +
+
{/if}
diff --git a/web/frontend/src/systems/nodelist/NodeListRow.svelte b/web/frontend/src/systems/nodelist/NodeListRow.svelte index 817d953..329f960 100644 --- a/web/frontend/src/systems/nodelist/NodeListRow.svelte +++ b/web/frontend/src/systems/nodelist/NodeListRow.svelte @@ -8,7 +8,12 @@ --> - + {#if $nodeJobsData.fetching} + + + + + + {:else} + + {/if} {#each refinedData as metricData (metricData.data.name)} @@ -83,16 +155,19 @@ forNode />
- + {#key extendedLegendData} + + {/key} {:else} const isAdmin = {{ .User.HasRole .Roles.admin }}; + const isSupport = {{ .User.HasRole .Roles.support }}; const isApi = {{ .User.HasRole .Roles.api }}; const username = {{ .User.Username }}; const filterPresets = {{ .FilterPresets }};