mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-26 05:19:05 +01:00
fix selection, add zero default
This commit is contained in:
parent
ead5c54bcb
commit
78494cd30e
@ -4,7 +4,7 @@
|
||||
import { gql, getContextClient , mutationStore } from '@urql/svelte'
|
||||
|
||||
export let cluster
|
||||
export let availableMetrics
|
||||
export let availableMetrics = ['cpu_load', 'flops_any', 'mem_bw']
|
||||
export let metricsInHistograms
|
||||
|
||||
const client = getContextClient();
|
||||
|
@ -75,7 +75,6 @@
|
||||
|
||||
<HistogramSelection
|
||||
bind:cluster={selectedCluster}
|
||||
bind:availableMetrics={metrics}
|
||||
bind:metricsInHistograms={metricsInHistograms}/>
|
||||
</Col>
|
||||
<Col xs="auto">
|
||||
@ -194,7 +193,7 @@
|
||||
title="Distribution of '{item.metric}'"
|
||||
xlabel={`${item.metric} bin maximum [${item.unit}]`}
|
||||
xunit={item.unit}
|
||||
ylabel="Count"
|
||||
ylabel="Count [Jobs]"
|
||||
yunit="Jobs"/>
|
||||
</PlotTable>
|
||||
{/key}
|
||||
|
@ -320,6 +320,11 @@ export function convert2uplot(canvasData) {
|
||||
let uplotData = [[],[]] // [X, Y1, Y2, ...]
|
||||
canvasData.forEach( cd => {
|
||||
if (cd.bin) { // MetricHisto Datafromat
|
||||
// Force Zero Entry for scaling
|
||||
if (uplotData[0].length == 0) {
|
||||
uplotData[0].push(0)
|
||||
uplotData[1].push(0)
|
||||
}
|
||||
uplotData[0].push(cd.max)
|
||||
uplotData[1].push(cd.count)
|
||||
} else { // Default
|
||||
|
Loading…
Reference in New Issue
Block a user