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 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'src/views/_sila/Processors/Dynamic/CpuTemp.vue') 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); + }, }, }; -- cgit v1.2.3