From 140b3c371dc2c57077115ab0546bd8831d0973e3 Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Mon, 10 Feb 2025 15:36:14 +0100 Subject: [PATCH] fix undefined if system_view_selectedMetric missing - defaults to first metric on init - reorder gitignore --- .gitignore | 22 ++++++++++++---------- web/frontend/src/Systems.root.svelte | 1 + 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index e23a17b..75cc004 100644 --- a/.gitignore +++ b/.gitignore @@ -1,21 +1,23 @@ /cc-backend - -/var/job-archive -/var/*.db -/var/machine-state - /.env /config.json +/var/job-archive +/var/machine-state +/var/job.db-shm +/var/job.db-wal +/var/*.db +/var/*.txt + /web/frontend/public/build /web/frontend/node_modules -/.vscode/* + /archive-migration /archive-manager -var/job.db-shm -var/job.db-wal +/internal/repository/testdata/job.db-shm +/internal/repository/testdata/job.db-wal + +/.vscode/* dist/ *.db -internal/repository/testdata/job.db-shm -internal/repository/testdata/job.db-wal diff --git a/web/frontend/src/Systems.root.svelte b/web/frontend/src/Systems.root.svelte index 4086667..8089bbe 100644 --- a/web/frontend/src/Systems.root.svelte +++ b/web/frontend/src/Systems.root.svelte @@ -77,6 +77,7 @@ for (let sm of systemMetrics) { systemUnits[sm.name] = (sm?.unit?.prefix ? sm.unit.prefix : "") + (sm?.unit?.base ? sm.unit.base : "") } + if (!selectedMetric) selectedMetric = systemMetrics[0].name } $: loadMetrics($initialized)