diff options
Diffstat (limited to 'src/views/_sila/Power/Dynamic/PowerOutput.vue')
-rw-r--r-- | src/views/_sila/Power/Dynamic/PowerOutput.vue | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/views/_sila/Power/Dynamic/PowerOutput.vue b/src/views/_sila/Power/Dynamic/PowerOutput.vue index 851606d1..842cdd59 100644 --- a/src/views/_sila/Power/Dynamic/PowerOutput.vue +++ b/src/views/_sila/Power/Dynamic/PowerOutput.vue @@ -107,6 +107,7 @@ export default { warning: Infinity, shutdown: Infinity, isBusy: true, + opened: false, fields: [ { key: 'name', @@ -161,6 +162,13 @@ export default { }, }, watch: { + timeScale() { + if (!this.opened) { + return; + } + + this.loadData(); + }, items() { this.items.length ? (this.isBusy = false) : (this.isBusy = true); }, @@ -170,6 +178,7 @@ export default { if (state) { this.loadData(); } + this.opened = state; }, loadData() { @@ -178,9 +187,10 @@ export default { payload.lastHour = true; } + this.$root.$emit('psu-power-output', true); this.startLoader(); this.$store.dispatch('powerSupply/getPsu', payload).finally(() => { - this.$root.$emit('psu-power'); + this.$root.$emit('psu-power-output', false); this.isBusy = false; this.endLoader(); }); |