From 7f9753363138b3005a8f7e41f8ca569b79da4f5d Mon Sep 17 00:00:00 2001 From: Vitalii Lysak Date: Mon, 25 Jul 2022 15:12:46 +0300 Subject: add time tabs --- .../Motherboard/Dynamic/MotherboardDynamicPage.vue | 48 ++++++++++++++++------ 1 file changed, 35 insertions(+), 13 deletions(-) (limited to 'src/views/_sila/Motherboard/Dynamic/MotherboardDynamicPage.vue') diff --git a/src/views/_sila/Motherboard/Dynamic/MotherboardDynamicPage.vue b/src/views/_sila/Motherboard/Dynamic/MotherboardDynamicPage.vue index 628cb92f..f4d41901 100644 --- a/src/views/_sila/Motherboard/Dynamic/MotherboardDynamicPage.vue +++ b/src/views/_sila/Motherboard/Dynamic/MotherboardDynamicPage.vue @@ -1,7 +1,11 @@ - @@ -92,8 +94,11 @@ export default { return { activeFilters: [], temperatureWarning: 72, + temperatureWarningInput: 72, temperatureNonNormal: 44, + temperatureNonNormalInput: 44, temperatureCriticalStart: 55, + temperatureCriticalInput: 55, fields: [ { key: 'name', @@ -154,10 +159,27 @@ export default { }, created() { - this.startLoader(); - this.$store.dispatch('motherboard/getMotherboardDynamic').finally(() => { - this.endLoader(); - }); + this.loadData(); + }, + + methods: { + switchTimeScale(period) { + this.timeScale = period; + this.loadData(); + }, + + updateTemperature() { + this.temperatureWarning = +this.temperatureWarningInput; + this.temperatureNonNormal = +this.temperatureNonNormalInput; + this.temperatureCritical = +this.temperatureCriticalInput; + }, + + loadData() { + this.startLoader(); + this.$store.dispatch('motherboard/getMotherboardDynamic').finally(() => { + this.endLoader(); + }); + }, }, }; -- cgit v1.2.3