From 37d9b5172b75f4d158e6b3046448821184962908 Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Tue, 6 Jun 2023 16:28:54 +0200 Subject: [PATCH] Fix UserOrProject functionality - fixed by restoring correct implementation of filters in frontend --- web/frontend/src/Jobs.root.svelte | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/web/frontend/src/Jobs.root.svelte b/web/frontend/src/Jobs.root.svelte index b96576b..07094b8 100644 --- a/web/frontend/src/Jobs.root.svelte +++ b/web/frontend/src/Jobs.root.svelte @@ -17,7 +17,7 @@ export let authlevel export let roles - let filters = [] + 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 jobList, matchedJobs = null let sorting = { field: 'startTime', order: 'DESC' }, isSortingOpen = false, isMetricsSelectionOpen = false let metrics = filterPresets.cluster @@ -25,12 +25,10 @@ : ccconfig.plot_list_selectedMetrics let selectedCluster = filterPresets?.cluster ? filterPresets.cluster : null - $: selectedCluster = filters[0]?.cluster ? filters[0].cluster.eq : null - // The filterPresets are handled by the Filters component, // so we need to wait for it to be ready before we can start a query. // This is also why JobList component starts out with a paused query. - onMount(() => filters.update()) + onMount(() => filterComponent.update()) @@ -61,15 +59,16 @@ { - filters = detail.filters - jobList.update(detail.filters)} + selectedCluster = detail.filters[0]?.cluster ? detail.filters[0].cluster.eq : null + jobList.update(detail.filters) + } } /> - filters.update(detail)}/> + filterComponent.update(detail)}/> jobList.refresh()} />