diff options
author | Vitalii Lysak <v.lysak@dunice.net> | 2022-08-30 09:42:32 +0300 |
---|---|---|
committer | Vitalii Lysak <v.lysak@dunice.net> | 2022-08-30 09:42:32 +0300 |
commit | 53c1b2579c12181f949b56f9242e53043875ae4d (patch) | |
tree | 1836e0044d6a3d181dfb94e7dc03a965b0ba9867 | |
parent | 2aa0a1a6e2f6399a51cad5b73a3611092697a59a (diff) | |
download | webui-vue-53c1b2579c12181f949b56f9242e53043875ae4d.tar.xz |
upd processors, dynamic
-rw-r--r-- | src/views/_sila/Processors/Dynamic/CpuTemp.vue | 21 | ||||
-rw-r--r-- | src/views/_sila/Processors/Dynamic/ProcessorsDynamicPage.vue | 2 |
2 files changed, 16 insertions, 7 deletions
diff --git a/src/views/_sila/Processors/Dynamic/CpuTemp.vue b/src/views/_sila/Processors/Dynamic/CpuTemp.vue index f33b328a..9f2d60fa 100644 --- a/src/views/_sila/Processors/Dynamic/CpuTemp.vue +++ b/src/views/_sila/Processors/Dynamic/CpuTemp.vue @@ -148,7 +148,7 @@ export default { loading, warning: null, critical: null, - isBusy: true, + isBusy: false, opened: false, fields: [ { @@ -290,20 +290,29 @@ export default { payload = { lastHour: true }; } - this.$root.$emit('cpu-temp', true); - this.startLoader(); + this.start(); this.$store .dispatch('processors/getCpuTempDynamic', payload) .finally(() => { this.$store.dispatch('processors/getLimitsTemp').finally(() => { this.warning = this.warningLimit; this.critical = this.criticalLimit; - this.$root.$emit('cpu-temp', false); - this.endLoader(); - this.isBusy = false; + this.end(); }); }); }, + + start() { + this.startLoader(); + this.isBusy = true; + this.$root.$emit('cpu-temp', true); + }, + + end() { + this.endLoader(); + this.isBusy = false; + this.$root.$emit('cpu-temp', false); + }, }, }; </script> diff --git a/src/views/_sila/Processors/Dynamic/ProcessorsDynamicPage.vue b/src/views/_sila/Processors/Dynamic/ProcessorsDynamicPage.vue index e92ee8fb..76d519c0 100644 --- a/src/views/_sila/Processors/Dynamic/ProcessorsDynamicPage.vue +++ b/src/views/_sila/Processors/Dynamic/ProcessorsDynamicPage.vue @@ -51,7 +51,6 @@ export default { }, onChangePeriod(period) { this.timeScale = period; - this.startProgress(); this.resetZoom(); }, startProgress() { @@ -60,6 +59,7 @@ export default { this.$root.$on('cpu-power', (loading) => this.onLoading(loading)); }, onLoading(loading) { + console.log('loading!!!', loading); loading ? this.startLoader() : this.endLoader(); }, }, |