summaryrefslogtreecommitdiff
path: root/src/views/_sila/Fans/Dynamic/FanSpeedCpu.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/views/_sila/Fans/Dynamic/FanSpeedCpu.vue')
-rw-r--r--src/views/_sila/Fans/Dynamic/FanSpeedCpu.vue20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/views/_sila/Fans/Dynamic/FanSpeedCpu.vue b/src/views/_sila/Fans/Dynamic/FanSpeedCpu.vue
index c24bc8d7..b4c5dfdd 100644
--- a/src/views/_sila/Fans/Dynamic/FanSpeedCpu.vue
+++ b/src/views/_sila/Fans/Dynamic/FanSpeedCpu.vue
@@ -1,7 +1,9 @@
<template>
<collapse
id="collapse_FansCpu"
+ :class="{ disabledDiv: loading && opened }"
:title="$t('pageFans.speed')"
+ :opened="true"
@opened="onOpened"
>
<template #image>
@@ -153,6 +155,7 @@ export default {
warning: null,
critical: null,
isBusy: true,
+ opened: false,
fields: [
{
key: 'name',
@@ -258,8 +261,8 @@ export default {
allSensors() {
return this.timeScale === 'hour'
- ? this.$store.getters['fan/fansLastHour']
- : this.$store.getters['fan/fans'];
+ ? this.$store.getters['fan/fansCpuLastHour']
+ : this.$store.getters['fan/fansCpu'];
},
preFiltered() {
@@ -287,14 +290,14 @@ export default {
watch: {
timeScale() {
+ if (!this.opened) {
+ return;
+ }
+
this.loadData();
},
},
- created() {
- this.loadData();
- },
-
methods: {
saveLimit() {
this.$v.$touch();
@@ -326,6 +329,7 @@ export default {
if (state) {
this.loadData();
}
+ this.opened = state;
},
loadData() {
@@ -334,11 +338,13 @@ export default {
payload = { lastHour: true };
}
+ this.$root.$emit('fan-cpu', true);
this.startLoader();
- this.$store.dispatch('fan/getFansDynamic', payload).finally(() => {
+ this.$store.dispatch('fan/getFansCpu', payload).finally(() => {
this.$store.dispatch('fan/getLimits').finally(() => {
this.warning = this.warningLimit;
this.critical = this.criticalLimit;
+ this.$root.$emit('fan-cpu', false);
this.endLoader();
this.isBusy = false;
});