From 2db574effd22d545b40d5c74a2e35a0148f1a020 Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Sun, 21 Feb 2021 22:26:50 +0100 Subject: [PATCH] feature: add configable chart rendering intervals Signed-off-by: Stefan Dej --- .../panels/Settings/DashboardPanel.vue | 55 ++++++++++++++++++- 1 file changed, 52 insertions(+), 3 deletions(-) diff --git a/src/components/panels/Settings/DashboardPanel.vue b/src/components/panels/Settings/DashboardPanel.vue index 01506384..36a2be52 100644 --- a/src/components/panels/Settings/DashboardPanel.vue +++ b/src/components/panels/Settings/DashboardPanel.vue @@ -26,6 +26,34 @@ + + + + + + + + @@ -55,7 +83,7 @@ return this.$store.state.gui.dashboard.boolTempchart; }, set(status) { - return this.$store.dispatch('gui/setSettings', { dashboard: { boolTempchart: status } }); + return this.$store.dispatch('gui/setSettings', { dashboard: { boolTempchart: status } }) } }, boolShowConsoleOnDashboard: { @@ -63,12 +91,33 @@ return this.$store.state.gui.dashboard.boolConsole; }, set(status) { - return this.$store.dispatch('gui/setSettings', { dashboard: { boolConsole: status } }); + return this.$store.dispatch('gui/setSettings', { dashboard: { boolConsole: status } }) + } + }, + intervalChartUpdate: { + get() { + return this.$store.state.gui.tempchart.intervalChartUpdate + }, + set(newVal) { + if (newVal >= 500) return this.$store.dispatch('gui/setSettings', { gui: { tempchart: { intervalChartUpdate: newVal } } }) + } + }, + intervalDatasetUpdate: { + get() { + return this.$store.state.gui.tempchart.intervalDatasetUpdate + }, + set(newVal) { + if (newVal >= 500) return this.$store.dispatch('gui/setSettings', { gui: { tempchart: { intervalDatasetUpdate: newVal } } }) } }, }, methods: { - + blurIntervalDatasetUpdate() { + if (this.intervalDatasetUpdate < 500) this.intervalDatasetUpdate = 500 + }, + blurIntervalChartUpdate() { + if (this.intervalChartUpdate < 500) this.intervalChartUpdate = 500 + }, } } \ No newline at end of file