mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-26 05:19:05 +01:00
fix: add additionally loaded scopes to statsTable again
This commit is contained in:
parent
01845a0cb7
commit
95fe369648
@ -348,6 +348,7 @@
|
||||
{#if item.data}
|
||||
<Metric
|
||||
bind:this={plots[item.metric]}
|
||||
on:more-loaded={({ detail }) => statsTable.moreLoaded(detail)}
|
||||
job={$initq.data.job}
|
||||
metricName={item.metric}
|
||||
metricUnit={$initq.data.globalMetrics.find((gm) => gm.name == item.metric)?.unit}
|
||||
|
@ -13,6 +13,9 @@
|
||||
-->
|
||||
|
||||
<script>
|
||||
import {
|
||||
createEventDispatcher
|
||||
} from "svelte";
|
||||
import {
|
||||
queryStore,
|
||||
gql,
|
||||
@ -46,6 +49,7 @@
|
||||
let patternMatches = false;
|
||||
let statsSeries = rawData.map((data) => data?.statisticsSeries ? data.statisticsSeries : null);
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
const statsPattern = /(.*)-stat$/;
|
||||
const unit = (metricUnit?.prefix ? metricUnit.prefix : "") + (metricUnit?.base ? metricUnit.base : "");
|
||||
const resolutions = [600, 240, 60] // DEV: Make configable
|
||||
@ -124,6 +128,11 @@
|
||||
selectedScope = minScope(scopes)
|
||||
}
|
||||
|
||||
const statsTableData = $metricData.data.singleUpdate.filter((x) => x.scope !== "node")
|
||||
if (statsTableData.length > 0) {
|
||||
dispatch("more-loaded", statsTableData);
|
||||
}
|
||||
|
||||
patternMatches = statsPattern.exec(selectedScope)
|
||||
|
||||
if (!patternMatches) {
|
||||
|
@ -4,6 +4,9 @@
|
||||
Properties:
|
||||
- `job Object`: The job object
|
||||
- `jobMetrics [Object]`: The jobs metricdata
|
||||
|
||||
Exported:
|
||||
- `moreLoaded`: Adds additional scopes requested from Metric.svelte in Job-View
|
||||
-->
|
||||
|
||||
<script>
|
||||
@ -82,6 +85,10 @@
|
||||
return s.dir != "up" ? s1[stat] - s2[stat] : s2[stat] - s1[stat];
|
||||
});
|
||||
}
|
||||
|
||||
export function moreLoaded(moreJobMetrics) {
|
||||
jobMetrics = [...jobMetrics, ...moreJobMetrics]
|
||||
}
|
||||
</script>
|
||||
|
||||
<Table>
|
||||
|
Loading…
Reference in New Issue
Block a user