diff options
author | Vitalii Lysak <v.lysak@dunice.net> | 2022-07-25 15:12:46 +0300 |
---|---|---|
committer | Vitalii Lysak <v.lysak@dunice.net> | 2022-07-25 15:12:46 +0300 |
commit | 7f9753363138b3005a8f7e41f8ca569b79da4f5d (patch) | |
tree | 69cebcb3b6feb1621fe2d7645236982940e41c55 /src/views/_sila/Memory/Dynamic | |
parent | f1c66a53a142a2c590830aff32aeff2e3c589449 (diff) | |
download | webui-vue-7f9753363138b3005a8f7e41f8ca569b79da4f5d.tar.xz |
add time tabs
Diffstat (limited to 'src/views/_sila/Memory/Dynamic')
-rw-r--r-- | src/views/_sila/Memory/Dynamic/MemoryDynamicPage.vue | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/src/views/_sila/Memory/Dynamic/MemoryDynamicPage.vue b/src/views/_sila/Memory/Dynamic/MemoryDynamicPage.vue index 78dbc98f..4c1a3dc8 100644 --- a/src/views/_sila/Memory/Dynamic/MemoryDynamicPage.vue +++ b/src/views/_sila/Memory/Dynamic/MemoryDynamicPage.vue @@ -1,7 +1,11 @@ <template> <b-container fluid="xl"> <page-title :description="$t('appPageTitle.dynamicInformation')" /> - <table-date-picker style="margin: -2rem 0 0 -2rem" /> + <table-date-picker + :switch-time-scale="switchTimeScale" + :time-scale="timeScale" + style="margin: -2rem 0 0 -2rem" + /> <div class="custom-divider" style="margin-top: 0"> <b-button variant="collapse" @@ -111,9 +115,15 @@ export default { data() { return { activeFilters: [], + timeScale: 'hour', temperatureWarning: 72, + temperatureWarningInput: 72, temperatureNonNormal: 44, + temperatureNonNormalInput: 44, temperatureCriticalStart: 55, + temperatureCritical: 55, + temperatureCriticalInput: 55, + notificationInput: 42, fields: [ { key: 'name', @@ -174,10 +184,27 @@ export default { }, created() { - this.startLoader(); - this.$store.dispatch('memory/getMemoryDynamic').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('memory/getMemoryDynamic').finally(() => { + this.endLoader(); + }); + }, }, }; </script> |