Skip to content

Commit

Permalink
Merge pull request ClusterCockpit#238 from ClusterCockpit/hotfix
Browse files Browse the repository at this point in the history
Hotfix
  • Loading branch information
spacehamster87 authored Feb 9, 2024
2 parents be6c63e + 2d8cf02 commit f534ad6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion web/frontend/src/HistogramSelection.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
export let metricsInHistograms
export let isOpen
let availableMetrics = ['cpu_load', 'flops_any', 'mem_used', 'mem_bw', 'net_bw', 'file_bw']
let availableMetrics = ['cpu_load', 'flops_any', 'mem_used', 'mem_bw'] // 'net_bw', 'file_bw'
let pendingMetrics = [...metricsInHistograms] // Copy
const client = getContextClient()
Expand Down
8 changes: 5 additions & 3 deletions web/frontend/src/JobFootprint.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@
} else if (jm?.metric?.series?.length > 1) {
const avgs = jm.metric.series.map(jms => jms.statistics.avg)
mv = round(mean(avgs), 2)
} else if (jm?.metric?.series) {
mv = round(jm.metric.series[0].statistics.avg, 2)
} else {
mv = jm.metric.series[0].statistics.avg
mv = 0.0
}
}
Expand Down Expand Up @@ -111,12 +113,12 @@
else return (mean <= thresholds.peak && mean > thresholds.normal)
case 'alert':
if (metric === 'mem_used') return (mean <= thresholds.alert && mean > thresholds.caution)
else return (mean <= thresholds.alert && mean > 0)
else return (mean <= thresholds.alert && mean >= 0)
case 'caution':
if (metric === 'mem_used') return (mean <= thresholds.caution && mean > thresholds.normal)
else return (mean <= thresholds.caution && mean > thresholds.alert)
case 'normal':
if (metric === 'mem_used') return (mean <= thresholds.normal && mean > 0)
if (metric === 'mem_used') return (mean <= thresholds.normal && mean >= 0)
else return (mean <= thresholds.normal && mean > thresholds.caution)
default:
return false
Expand Down

0 comments on commit f534ad6

Please sign in to comment.