From 2655bda64416431b7ce05b36553d9685ab85f21b Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Mon, 24 Jul 2023 11:12:22 +0200 Subject: [PATCH 1/5] feat: enable uplot XY-Zoom for metrics - Disable jobView manual zoom --- web/frontend/src/Job.root.svelte | 4 ++-- web/frontend/src/plots/MetricPlot.svelte | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/frontend/src/Job.root.svelte b/web/frontend/src/Job.root.svelte index 2ec1ade..6f78196 100644 --- a/web/frontend/src/Job.root.svelte +++ b/web/frontend/src/Job.root.svelte @@ -279,9 +279,9 @@ {/if} - +
diff --git a/web/frontend/src/plots/MetricPlot.svelte b/web/frontend/src/plots/MetricPlot.svelte index c0440fd..6b45c70 100644 --- a/web/frontend/src/plots/MetricPlot.svelte +++ b/web/frontend/src/plots/MetricPlot.svelte @@ -177,7 +177,7 @@ x: { time: false }, y: maxY ? { range: [0., maxY * 1.1] } : {} }, - cursor: { show: false }, + cursor: { drag: { x: true, y: true } }, legend: { show: false, live: false } } From 742c2e399e9db818eb80f7b735014970f03e6e53 Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Wed, 26 Jul 2023 13:44:06 +0200 Subject: [PATCH 2/5] feat: Add uplot histogram, implemented in userview - For testing - add conversion function to utils --- web/frontend/src/User.root.svelte | 57 ++----- web/frontend/src/plots/Histogramuplot.svelte | 168 +++++++++++++++++++ web/frontend/src/plots/MetricPlot.svelte | 3 +- web/frontend/src/units.js | 12 +- web/frontend/src/utils.js | 10 ++ 5 files changed, 205 insertions(+), 45 deletions(-) create mode 100644 web/frontend/src/plots/Histogramuplot.svelte diff --git a/web/frontend/src/User.root.svelte b/web/frontend/src/User.root.svelte index 9c94eca..55aacc1 100644 --- a/web/frontend/src/User.root.svelte +++ b/web/frontend/src/User.root.svelte @@ -1,13 +1,13 @@ + +{#if data.length > 0} +
+
+
+{:else} + Cannot render histogram: No data! +{/if} + + diff --git a/web/frontend/src/plots/MetricPlot.svelte b/web/frontend/src/plots/MetricPlot.svelte index 6b45c70..a20b307 100644 --- a/web/frontend/src/plots/MetricPlot.svelte +++ b/web/frontend/src/plots/MetricPlot.svelte @@ -323,8 +323,9 @@ {#if series[0].data.length > 0}
{:else} - Cannot render plot: No series data returned for {metric} + Cannot render plot: No series data returned for {metric} {/if} +