mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-03-03 21:45:55 +01:00
fix undefined if system_view_selectedMetric missing
- defaults to first metric on init - reorder gitignore
This commit is contained in:
parent
2bd7c8d51e
commit
140b3c371d
22
.gitignore
vendored
22
.gitignore
vendored
@ -1,21 +1,23 @@
|
|||||||
/cc-backend
|
/cc-backend
|
||||||
|
|
||||||
/var/job-archive
|
|
||||||
/var/*.db
|
|
||||||
/var/machine-state
|
|
||||||
|
|
||||||
/.env
|
/.env
|
||||||
/config.json
|
/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/public/build
|
||||||
/web/frontend/node_modules
|
/web/frontend/node_modules
|
||||||
/.vscode/*
|
|
||||||
/archive-migration
|
/archive-migration
|
||||||
/archive-manager
|
/archive-manager
|
||||||
var/job.db-shm
|
|
||||||
var/job.db-wal
|
|
||||||
|
|
||||||
|
/internal/repository/testdata/job.db-shm
|
||||||
|
/internal/repository/testdata/job.db-wal
|
||||||
|
|
||||||
|
/.vscode/*
|
||||||
dist/
|
dist/
|
||||||
*.db
|
*.db
|
||||||
internal/repository/testdata/job.db-shm
|
|
||||||
internal/repository/testdata/job.db-wal
|
|
||||||
|
@ -77,6 +77,7 @@
|
|||||||
for (let sm of systemMetrics) {
|
for (let sm of systemMetrics) {
|
||||||
systemUnits[sm.name] = (sm?.unit?.prefix ? sm.unit.prefix : "") + (sm?.unit?.base ? sm.unit.base : "")
|
systemUnits[sm.name] = (sm?.unit?.prefix ? sm.unit.prefix : "") + (sm?.unit?.base ? sm.unit.base : "")
|
||||||
}
|
}
|
||||||
|
if (!selectedMetric) selectedMetric = systemMetrics[0].name
|
||||||
}
|
}
|
||||||
|
|
||||||
$: loadMetrics($initialized)
|
$: loadMetrics($initialized)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user