From 163462b29c5874f24cf915b42b7b1d7cebe70c1c Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Wed, 9 Aug 2023 16:34:00 +0200 Subject: [PATCH] pre-sort numerical ids in statstable - sorting still fixed if not nodescope --- web/frontend/src/StatsTableEntry.svelte | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/frontend/src/StatsTableEntry.svelte b/web/frontend/src/StatsTableEntry.svelte index 6e96c1f..8871681 100644 --- a/web/frontend/src/StatsTableEntry.svelte +++ b/web/frontend/src/StatsTableEntry.svelte @@ -4,9 +4,14 @@ export let scope export let jobMetrics + function compareIds(a, b) { + return a.id - b.id; + } + $: series = jobMetrics .find(jm => jm.name == metric && jm.scope == scope) ?.metric.series.filter(s => s.hostname == host && s.statistics != null) + ?.sort(compareIds) {#if series == null || series.length == 0}