Format cleanup

This commit is contained in:
Christoph Kluge 2023-05-12 11:19:37 +02:00
parent 23e485afce
commit 96e4448505
6 changed files with 80 additions and 78 deletions

View File

@ -91,7 +91,7 @@
minX: $minX, minY: $minY, maxX: $maxX, maxY: $maxY)
}
`,
variables: { filters, rows: 50, cols: 50, minX: 0.01, minY: 1., maxX: 1000., maxY },
variables: { filters, rows: 50, cols: 50, minX: 0.01, minY: 1., maxX: 1000., maxY }
})
onMount(() => filters.update())

View File

@ -30,7 +30,9 @@
);
const client = getContextClient();
const query = gql`
$: stats = queryStore({
client: client,
query: gql`
query($filters: [JobFilter!]!) {
rows: jobsStatistics(filter: $filters, groupBy: ${type}) {
id
@ -39,12 +41,8 @@
totalWalltime
totalCoreHours
}
}`
$: stats = queryStore({
client,
query,
variables: { filters },
}`,
variables: { filters }
});
let filters;

View File

@ -13,8 +13,9 @@
let plotWidths = [], colWidth1 = 0, colWidth2
let from = new Date(Date.now() - 5 * 60 * 1000), to = new Date(Date.now())
const client = getContextClient();
$: mainQuery = queryStore({
client: getContextClient(),
client: client,
query: gql`query($cluster: String!, $filter: [JobFilter!]!, $metrics: [String!], $from: Time!, $to: Time!) {
nodeMetrics(cluster: $cluster, metrics: $metrics, from: $from, to: $to) {
host

View File

@ -27,8 +27,9 @@
let hostnameFilter = ''
let selectedMetric = ccconfig.system_view_selectedMetric
const client = getContextClient();
$: nodesQuery = queryStore({
client: getContextClient(),
client: client,
query: gql`query($cluster: String!, $metrics: [String!], $from: Time!, $to: Time!) {
nodeMetrics(cluster: $cluster, metrics: $metrics, from: $from, to: $to) {
host
@ -51,7 +52,8 @@
cluster: cluster,
metrics: [selectedMetric],
from: from.toISOString(),
to: to.toISOString()}
to: to.toISOString()
}
})
let metricUnits = {}

View File

@ -25,8 +25,9 @@
let w1, w2, histogramHeight = 250
let selectedCluster = filterPresets?.cluster ? filterPresets.cluster : null
const client = getContextClient();
$: stats = queryStore({
client: getContextClient(),
client: client,
query: gql`
query($filters: [JobFilter!]!) {
jobsStatistics(filter: $filters) {
@ -37,7 +38,7 @@
histDuration { count, value }
histNumNodes { count, value }
}}`,
variables: { filters },
variables: { filters }
})
$: selectedCluster = filters[0]?.cluster ? filters[0].cluster.eq : null

View File

@ -59,16 +59,16 @@
`;
$: metricsQuery = queryStore({
client,
query,
variables: { id, metrics, scopes },
client: client,
query: query,
variables: { id, metrics, scopes }
});
function refresh() {
queryStore({
client,
query,
variables: { id, metrics, scopes },
client: client,
query: query,
variables: { id, metrics, scopes }
});
}