Merge pull request #149 from ClusterCockpit/hotfix

Hotfix
This commit is contained in:
Jan Eitzinger 2023-06-16 16:24:56 +02:00 committed by GitHub
commit 34fc6b1541
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 10 deletions

View File

@ -181,7 +181,7 @@
>Metric disabled for subcluster '{job.subCluster}'</Card
>
{:else}
<Card body color="warning">Missing Data</Card>
<Card body color="warning">Missing Full Dataset</Card>
{/if}
</td>
{/each}

View File

@ -24,6 +24,7 @@
import uPlot from 'uplot'
import { formatNumber } from '../units.js'
import { getContext, onMount, onDestroy } from 'svelte'
import { Card } from 'sveltestrap'
export let width
export let height
@ -219,11 +220,15 @@
}, resizeSleepTime)
}
$: onSizeChange(width, height)
$: if (series[0].data.length > 0) {
onSizeChange(width, height)
}
onMount(() => {
if (series[0].data.length > 0) {
plotWrapper.style.backgroundColor = backgroundColor()
render()
}
})
onDestroy(() => {
@ -312,9 +317,11 @@
</script>
<!--Add empty series warning card-->
<div bind:this={plotWrapper} class="cc-plot"></div>
{#if series[0].data.length > 0}
<div bind:this={plotWrapper} class="cc-plot"></div>
{:else}
<Card style="margin-left: 2rem;margin-right: 2rem;" body color="warning">Cannot render plot: No series data found for <code>{metric}</code></Card>
{/if}
<style>
.cc-plot {
border-radius: 5px;

View File

@ -183,9 +183,10 @@ export function groupByScope(jobMetrics) {
const scopeGranularity = {
node: 10,
socket: 5,
accelerator: 5,
core: 2,
hwthread: 1,
memorydomain: 4,
core: 3,
hwthread: 2,
accelerator: 1
};
export function maxScope(scopes) {