fix: ad dmissing resampleConfig handling to scope select

This commit is contained in:
Christoph Kluge 2024-10-08 17:54:12 +02:00
parent 322e161064
commit ed991de11a

View File

@ -110,8 +110,9 @@
const selectedMetrics = [metricName] const selectedMetrics = [metricName]
$: if (selectedScope || pendingResolution) { $: if (selectedScope || pendingResolution) {
if (!selectedResolution) {
// Skips reactive data load on init if (resampleConfig && !selectedResolution) {
// Skips reactive data load on init || Only if resampling is enabled
selectedResolution = Number(pendingResolution) selectedResolution = Number(pendingResolution)
} else { } else {
@ -119,14 +120,14 @@
selectedScopes = [...scopes, "socket", "core", "accelerator"] selectedScopes = [...scopes, "socket", "core", "accelerator"]
} }
if (pendingResolution) { if (resampleConfig && pendingResolution) {
selectedResolution = Number(pendingResolution) selectedResolution = Number(pendingResolution)
} }
metricData = queryStore({ metricData = queryStore({
client: client, client: client,
query: subQuery, query: subQuery,
variables: { dbid, selectedMetrics, selectedScopes, selectedResolution }, variables: { dbid, selectedMetrics, selectedScopes, selectedResolution: (resampleConfig ? selectedResolution : 0) },
// Never user network-only: causes reactive load-loop! // Never user network-only: causes reactive load-loop!
}); });