mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-10-11 16:44:31 +02:00
Adapt svelte to new schema, add removed metric box
- Moved 'scope' field to parent jobMetric - Implemented unit { prefix, base } where necessary - SubCluster Metric Config 'remove' option implemented in Joblists
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
let ctx, canvasElement
|
||||
|
||||
const labels = metrics.filter(name => {
|
||||
if (!jobMetrics.find(m => m.name == name && m.metric.scope == "node")) {
|
||||
if (!jobMetrics.find(m => m.name == name && m.scope == "node")) {
|
||||
console.warn(`PolarPlot: No metric data for '${name}'`)
|
||||
return false
|
||||
}
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
const getValuesForStat = (getStat) => labels.map(name => {
|
||||
const peak = metricConfig(cluster, name).peak
|
||||
const metric = jobMetrics.find(m => m.name == name && m.metric.scope == "node")
|
||||
const metric = jobMetrics.find(m => m.name == name && m.scope == "node")
|
||||
const value = getStat(metric.metric) / peak
|
||||
return value <= 1. ? value : 1.
|
||||
})
|
||||
|
Reference in New Issue
Block a user