From 0eb0aa1d3b134cb63df4711eec47d6ac9a6861db Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Wed, 2 Oct 2024 14:37:32 +0200 Subject: [PATCH] change default range to 12h, rework layout in system node views --- web/frontend/src/Node.root.svelte | 32 ++++++++++------ web/frontend/src/Systems.root.svelte | 38 ++++++++++--------- .../src/generic/helper/Refresher.svelte | 22 +++++------ 3 files changed, 53 insertions(+), 39 deletions(-) diff --git a/web/frontend/src/Node.root.svelte b/web/frontend/src/Node.root.svelte index c8b0d78..4ea5491 100644 --- a/web/frontend/src/Node.root.svelte +++ b/web/frontend/src/Node.root.svelte @@ -13,6 +13,7 @@ import { Row, Col, + Input, InputGroup, InputGroupText, Icon, @@ -43,7 +44,7 @@ if (from == null || to == null) { to = new Date(Date.now()); from = new Date(to.getTime()); - from.setMinutes(from.getMinutes() - 30); + from.setHours(from.getHours() - 12); } const initialized = getContext("initialized") @@ -135,26 +136,38 @@ {:else if $initq.fetching} {:else} + - {hostname} ({cluster}) + Selected Node + + + + + + {#if $nodeJobsData.fetching} {:else if $nodeJobsData.data} - Currently running jobs on this node: {$nodeJobsData.data.jobs.count} - [ - View in Job List ] + + + Activity + + + Show List + + {:else} + No currently running jobs. + {/if} + { @@ -164,9 +177,6 @@ }} /> - - - {/if}
diff --git a/web/frontend/src/Systems.root.svelte b/web/frontend/src/Systems.root.svelte index 0d5e70e..8ff1aef 100644 --- a/web/frontend/src/Systems.root.svelte +++ b/web/frontend/src/Systems.root.svelte @@ -42,7 +42,7 @@ if (from == null || to == null) { to = new Date(Date.now()); from = new Date(to.getTime()); - from.setMinutes(from.getMinutes() - 30); + from.setHours(from.getHours() - 12); } const initialized = getContext("initialized"); @@ -117,18 +117,23 @@ {:else if $initq.fetching} {:else} + - { - const diff = Date.now() - to; - from = new Date(from.getTime() + diff); - to = new Date(to.getTime() + diff); - }} - /> + + + Find Node + + + + @@ -142,16 +147,15 @@ + - - - Find Node - - + { + const diff = Date.now() - to; + from = new Date(from.getTime() + diff); + to = new Date(to.getTime() + diff); + }} + /> {/if} diff --git a/web/frontend/src/generic/helper/Refresher.svelte b/web/frontend/src/generic/helper/Refresher.svelte index bf90f3c..986bcc2 100644 --- a/web/frontend/src/generic/helper/Refresher.svelte +++ b/web/frontend/src/generic/helper/Refresher.svelte @@ -9,7 +9,7 @@ --> - - + +