summaryrefslogtreecommitdiff
path: root/src/views/_sila/Power/Dynamic/PowerTemp.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/views/_sila/Power/Dynamic/PowerTemp.vue')
-rw-r--r--src/views/_sila/Power/Dynamic/PowerTemp.vue29
1 files changed, 23 insertions, 6 deletions
diff --git a/src/views/_sila/Power/Dynamic/PowerTemp.vue b/src/views/_sila/Power/Dynamic/PowerTemp.vue
index 1a8a4b58..2b08abf5 100644
--- a/src/views/_sila/Power/Dynamic/PowerTemp.vue
+++ b/src/views/_sila/Power/Dynamic/PowerTemp.vue
@@ -148,7 +148,7 @@ export default {
loading,
warning: null,
critical: null,
- isBusy: true,
+ isBusy: false,
opened: false,
fields: [
{
@@ -246,6 +246,13 @@ export default {
},
},
watch: {
+ limits() {
+ if (this.limits && this.limits.length > 0) {
+ this.warning = this.warningLimit;
+ this.critical = this.criticalLimit;
+ }
+ },
+
timeScale() {
if (!this.opened) {
return;
@@ -281,18 +288,28 @@ export default {
if (this.timeScale === 'hour') {
payload.lastHour = true;
}
- this.$root.$emit('psu-temp', true);
- this.startLoader();
+
+ this.start();
this.$store.dispatch('powerSupply/getPsu', payload).finally(() => {
this.$store.dispatch('powerSupply/getLimitsTemp').finally(() => {
this.warning = this.warningLimit;
this.critical = this.criticalLimit;
- this.$root.$emit('psu-temp', false);
- this.endLoader();
- this.isBusy = false;
+ this.end();
});
});
},
+
+ start() {
+ this.startLoader();
+ this.isBusy = true;
+ this.$root.$emit('psu-temp', true);
+ },
+
+ end() {
+ this.endLoader();
+ this.isBusy = false;
+ this.$root.$emit('psu-temp', false);
+ },
},
};
</script>