From 36abed2093f76105cc3226f17ff191e192628be0 Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Tue, 1 Aug 2023 15:30:21 +0200 Subject: [PATCH 1/5] feat: add auto-reloading to system and node views --- web/frontend/src/Node.root.svelte | 8 ++++++++ web/frontend/src/Systems.root.svelte | 8 ++++++++ web/frontend/src/filters/TimeSelection.svelte | 1 + 3 files changed, 17 insertions(+) diff --git a/web/frontend/src/Node.root.svelte b/web/frontend/src/Node.root.svelte index daa12c5..3cd6d04 100644 --- a/web/frontend/src/Node.root.svelte +++ b/web/frontend/src/Node.root.svelte @@ -11,6 +11,7 @@ } from "sveltestrap"; import { queryStore, gql, getContextClient } from "@urql/svelte"; import TimeSelection from "./filters/TimeSelection.svelte"; + import Refresher from './joblist/Refresher.svelte'; import PlotTable from "./PlotTable.svelte"; import MetricPlot from "./plots/MetricPlot.svelte"; import { getContext } from "svelte"; @@ -160,6 +161,13 @@ No currently running jobs. {/if} + + { + const diff = Date.now() - to + from = new Date(from.getTime() + diff) + to = new Date(to.getTime() + diff) + }} /> + diff --git a/web/frontend/src/Systems.root.svelte b/web/frontend/src/Systems.root.svelte index fcca95e..bda1763 100644 --- a/web/frontend/src/Systems.root.svelte +++ b/web/frontend/src/Systems.root.svelte @@ -1,5 +1,6 @@