init basic proof of concept

This commit is contained in:
Christoph Kluge 2024-08-26 17:37:23 +02:00
parent 5cc7fc6ccb
commit a59df12595
3 changed files with 31 additions and 1 deletions

View File

@ -159,6 +159,10 @@
<!-- Subluster Metricconfig remove keyword for jobtables (joblist main, user joblist, project joblist) to be used here as toplevel case-->
{#if metric.disabled == false && metric.data}
<MetricPlot
on:zoom-in={({ detail }) => {
// filterComponent.updateFilters(detail)
console.log("Upstream New Res:", detail)
}}
width={plotWidth}
height={plotHeight}
timestep={metric.data.metric.timestep}

View File

@ -112,7 +112,7 @@
<script>
import uPlot from "uplot";
import { formatNumber } from "../units.js";
import { getContext, onMount, onDestroy } from "svelte";
import { getContext, onMount, onDestroy, createEventDispatcher } from "svelte";
import { Card } from "@sveltestrap/sveltestrap";
export let metric;
@ -134,6 +134,7 @@
if (useStatsSeries == false && series == null) useStatsSeries = true;
const dispatch = createEventDispatcher();
const subClusterTopology = getContext("getHardwareTopology")(cluster, subCluster);
const metricConfig = getContext("getMetricConfig")(cluster, subCluster, metric);
const clusterCockpitConfig = getContext("cc-config");
@ -433,6 +434,23 @@
u.ctx.restore();
},
],
setScale: [
(u, key) => {
if (key === 'x') {
// Start
console.log('setScale X', key);
// Decide which resolution to request
// Dispatch request
const res = 1337;
dispatch('zoom-in', {
newres: res,
});
};
}
]
},
scales: {
x: { time: false },

View File

@ -190,6 +190,10 @@
{:else if series != null && !patternMatches}
<Timeseries
bind:this={plot}
on:zoom-in={({ detail }) => {
// filterComponent.updateFilters(detail)
console.log("Upstream New Res:", detail)
}}
{width}
height={300}
cluster={job.cluster}
@ -203,6 +207,10 @@
{:else if statsSeries[selectedScopeIndex] != null && patternMatches}
<Timeseries
bind:this={plot}
on:zoom-in={({ detail }) => {
// filterComponent.updateFilters(detail)
console.log("Upstream New Res:", detail)
}}
{width}
height={300}
cluster={job.cluster}