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 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)
</script>
{#if series == null || series.length == 0}