pre-sort numerical ids in statstable

- sorting still fixed if not nodescope
This commit is contained in:
Christoph Kluge 2023-08-09 16:34:00 +02:00
parent 298051c334
commit 163462b29c

View File

@ -4,9 +4,14 @@
export let scope export let scope
export let jobMetrics export let jobMetrics
function compareIds(a, b) {
return a.id - b.id;
}
$: series = jobMetrics $: series = jobMetrics
.find(jm => jm.name == metric && jm.scope == scope) .find(jm => jm.name == metric && jm.scope == scope)
?.metric.series.filter(s => s.hostname == host && s.statistics != null) ?.metric.series.filter(s => s.hostname == host && s.statistics != null)
?.sort(compareIds)
</script> </script>
{#if series == null || series.length == 0} {#if series == null || series.length == 0}