diff --git a/web/frontend/src/Analysis.root.svelte b/web/frontend/src/Analysis.root.svelte index e6dba50..49bfb3a 100644 --- a/web/frontend/src/Analysis.root.svelte +++ b/web/frontend/src/Analysis.root.svelte @@ -1,7 +1,7 @@ diff --git a/web/frontend/src/List.root.svelte b/web/frontend/src/List.root.svelte index 5eb36ae..2aadba4 100644 --- a/web/frontend/src/List.root.svelte +++ b/web/frontend/src/List.root.svelte @@ -2,22 +2,28 @@ @component List of users or projects --> @@ -68,59 +72,85 @@ - + { - $stats.variables = { filter: detail.filters } - $stats.context.pause = false - $stats.reexecute() - }} /> + $stats.variables = { filter: detail.filters }; + $stats.context.pause = false; + $stats.reexecute(); + }} + /> - {#if type == 'USER'} + {#if type == "USER"} {/if} @@ -129,26 +159,36 @@ {#if $stats.fetching} - + {:else if $stats.error} - + {:else if $stats.data} {#each sort($stats.data.rows, sorting, nameFilter) as row (row.id)} - {#if type == 'USER'} - + {#if type == "USER"} + {/if} @@ -156,7 +196,9 @@ {:else} - + {/each} {/if} diff --git a/web/frontend/src/MetricSelection.svelte b/web/frontend/src/MetricSelection.svelte index 3397afd..56df34d 100644 --- a/web/frontend/src/MetricSelection.svelte +++ b/web/frontend/src/MetricSelection.svelte @@ -10,7 +10,7 @@ diff --git a/web/frontend/src/PlotSelection.svelte b/web/frontend/src/PlotSelection.svelte index 0205c27..74e7fba 100644 --- a/web/frontend/src/PlotSelection.svelte +++ b/web/frontend/src/PlotSelection.svelte @@ -1,17 +1,21 @@ diff --git a/web/frontend/src/TagManagement.svelte b/web/frontend/src/TagManagement.svelte index 747b092..296f748 100644 --- a/web/frontend/src/TagManagement.svelte +++ b/web/frontend/src/TagManagement.svelte @@ -1,6 +1,6 @@ diff --git a/web/frontend/src/utils.js b/web/frontend/src/utils.js index f1f76cd..05a7e8b 100644 --- a/web/frontend/src/utils.js +++ b/web/frontend/src/utils.js @@ -1,5 +1,5 @@ import { expiringCacheExchange } from './cache-exchange.js' -import { Client, fetchExchange } from '@urql/svelte'; +import { Client, setContextClient, fetchExchange } from '@urql/svelte'; import { setContext, getContext, hasContext, onDestroy, tick } from 'svelte' import { readable } from 'svelte/store' @@ -32,6 +32,8 @@ export function init(extraInitQuery = '') { ] }) + setContextClient(client) + const query = client.query(`query { clusters { name,
- {({ USER: 'Username', PROJECT: 'Project Name' })[type]} - Name - Total Jobs - Total Walltime - Total Core Hours -
{$stats.error.message}{$stats.error.message}
- {#if type == 'USER'} - {scrambleNames ? scramble(row.id) : row.id} - {:else if type == 'PROJECT'} - {row.id} + {#if type == "USER"} + {scrambleNames ? scramble(row.id) : row.id} + {:else if type == "PROJECT"} + {row.id} {:else} {row.id} {/if} {row?.name ? row.name : ''}{row?.name ? row.name : ""}{row.totalJobs} {row.totalWalltime}
No {type.toLowerCase()}s/jobs foundNo {type.toLowerCase()}s/jobs found