diff options
author | Vitalii Lysak <v.lysak@dunice.net> | 2022-08-02 09:45:39 +0300 |
---|---|---|
committer | Vitalii Lysak <v.lysak@dunice.net> | 2022-08-02 09:45:39 +0300 |
commit | 2115ab9778fcabcec6293161fc8f6254219bfb03 (patch) | |
tree | 35da3f90cd57f97c597f258e1a15556a36de54c5 /src/views/_sila/Processors/Dynamic/ProcessorsDynamicPage.vue | |
parent | 20f718fc04f3ad8b8be0236f23717a63c5e8757c (diff) | |
download | webui-vue-2115ab9778fcabcec6293161fc8f6254219bfb03.tar.xz |
add reset zoom, switch period
Diffstat (limited to 'src/views/_sila/Processors/Dynamic/ProcessorsDynamicPage.vue')
-rw-r--r-- | src/views/_sila/Processors/Dynamic/ProcessorsDynamicPage.vue | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/views/_sila/Processors/Dynamic/ProcessorsDynamicPage.vue b/src/views/_sila/Processors/Dynamic/ProcessorsDynamicPage.vue index eef6fd0b..ff9feb2e 100644 --- a/src/views/_sila/Processors/Dynamic/ProcessorsDynamicPage.vue +++ b/src/views/_sila/Processors/Dynamic/ProcessorsDynamicPage.vue @@ -1,10 +1,7 @@ <template> <b-container fluid="xl"> <page-title :description="$t('appPageTitle.dynamicInformation')" /> - <table-date-picker - :switch-time-scale="switchTimeScale" - :time-scale="timeScale" - /> + <table-date-picker :time-scale="timeScale" @changePeriod="onChangePeriod" /> <cpu-temp :time-scale="timeScale"></cpu-temp> <cpu-power :time-scale="timeScale"></cpu-power> </b-container> @@ -35,8 +32,17 @@ export default { }, methods: { - switchTimeScale(period) { + resetZoom() { + const resetButton = document.querySelector('.highcharts-reset-zoom'); + if (!resetButton) { + return; + } + + resetButton.dispatchEvent(new Event('click')); + }, + onChangePeriod(period) { this.timeScale = period; + this.resetZoom(); }, }, }; |