From 53c1b2579c12181f949b56f9242e53043875ae4d Mon Sep 17 00:00:00 2001 From: Vitalii Lysak Date: Tue, 30 Aug 2022 09:42:32 +0300 Subject: upd processors, dynamic --- src/views/_sila/Processors/Dynamic/CpuTemp.vue | 21 +++++++++++++++------ .../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); + }, }, }; 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(); }, }, -- cgit v1.2.3