diff --git a/web/frontend/rollup.config.mjs b/web/frontend/rollup.config.mjs index 44a7688..8336287 100644 --- a/web/frontend/rollup.config.mjs +++ b/web/frontend/rollup.config.mjs @@ -5,8 +5,8 @@ import resolve from '@rollup/plugin-node-resolve'; import terser from '@rollup/plugin-terser'; import css from 'rollup-plugin-css-only'; -// const production = !process.env.ROLLUP_WATCH; -const production = false +const production = !process.env.ROLLUP_WATCH; +// const production = false const plugins = [ svelte({ diff --git a/web/frontend/src/List.root.svelte b/web/frontend/src/List.root.svelte index 87a678d..9afd2d5 100644 --- a/web/frontend/src/List.root.svelte +++ b/web/frontend/src/List.root.svelte @@ -4,12 +4,20 @@ @@ -94,20 +135,43 @@ - {#each metrics as metric (metric)} - {/each} @@ -116,28 +180,27 @@ {#if $jobs.error} - {:else if $jobs.fetching || !$jobs.data} - {:else if $jobs.data && $initialized} {#each $jobs.data.jobs.items as job (job)} - + {:else} - - - + + + {/each} {/if} @@ -146,24 +209,24 @@ { if (detail.itemsPerPage != itemsPerPage) { - itemsPerPage = detail.itemsPerPage + itemsPerPage = detail.itemsPerPage; updateConfiguration({ name: "plot_list_jobsPerPage", - value: itemsPerPage.toString() - }).then(res => { - if (res.error) - console.error(res.error); - }) + value: itemsPerPage.toString(), + }).then((res) => { + if (res.error) console.error(res.error); + }); } - paging = { itemsPerPage: detail.itemsPerPage, page: detail.page } - }} /> + paging = { itemsPerPage: detail.itemsPerPage, page: detail.page }; + }} +/>
+ Job Info + {metric} {#if $initialized} ({clusters - .map(cluster => cluster.metricConfig.find(m => m.name == metric)) - .filter(m => m != null) - .map(m => (m.unit?.prefix?m.unit?.prefix:'') + (m.unit?.base?m.unit?.base:'')) // Build unitStr - .reduce((arr, unitStr) => arr.includes(unitStr) ? arr : [...arr, unitStr], []) // w/o this, output would be [unitStr, unitStr] - .join(', ') - }) + .map((cluster) => + cluster.metricConfig.find( + (m) => m.name == metric + ) + ) + .filter((m) => m != null) + .map( + (m) => + (m.unit?.prefix + ? m.unit?.prefix + : "") + + (m.unit?.base ? m.unit?.base : "") + ) // Build unitStr + .reduce( + (arr, unitStr) => + arr.includes(unitStr) + ? arr + : [...arr, unitStr], + [] + ) // w/o this, output would be [unitStr, unitStr] + .join(", ")}) {/if}
-

{$jobs.error.message}

+
+

{$jobs.error.message}

+
- No jobs found -
+ No jobs found +