Cleanup and shift FilterRanges to configuration

This commit is contained in:
Jan Eitzinger
2022-09-11 07:11:17 +02:00
parent 48c1ba097a
commit 5e002def0a
3 changed files with 9 additions and 12 deletions

View File

@@ -9,7 +9,7 @@ import { readable } from 'svelte/store'
*
* It does several things:
* - Initialize the GraphQL client
* - Creates a readable store 'initialization' which indicates when the values below can be used.
* - Creates a readable store 'initialization' which indicates when the values below can be used.
* - Adds 'tags' to the context (list of all tags)
* - Adds 'clusters' to the context (object with cluster names as keys)
* - Adds 'metrics' to the context, a function that takes a cluster and metric name and returns the MetricConfig (or undefined)
@@ -43,11 +43,6 @@ export function init(extraInitQuery = '') {
aggregation,
subClusters { name, peak, normal, caution, alert }
}
filterRanges {
duration { from, to }
numNodes { from, to }
startTime { from, to }
}
partitions
subClusters {
name, processorType
@@ -104,7 +99,7 @@ export function init(extraInitQuery = '') {
for (let tag of data.tags)
tags.push(tag)
for (let cluster of data.clusters)
clusters.push(cluster)
@@ -241,7 +236,7 @@ export async function fetchMetrics(job, metrics, scopes) {
if (res.status != 200) {
return { error: { status: res.status, message: await res.text() } }
}
return await res.json()
} catch (e) {
return { error: e }