diff options
author | Vitalii Lysak <v.lysak@dunice.net> | 2022-07-04 12:01:39 +0300 |
---|---|---|
committer | Vitalii Lysak <v.lysak@dunice.net> | 2022-07-04 12:01:39 +0300 |
commit | c8d25fd2b9ecb1395fa086a727d238489d568908 (patch) | |
tree | 3410499e78d3f1ce3225bca17f4903de4ee14f86 /src/store/modules/HardwareStatus/SensorsStore.js | |
parent | a1609142e4f59a1e731ab6472792d3cfe6014f40 (diff) | |
download | webui-vue-c8d25fd2b9ecb1395fa086a727d238489d568908.tar.xz |
fixs for cash of sensorstemplate-bugs
Diffstat (limited to 'src/store/modules/HardwareStatus/SensorsStore.js')
-rw-r--r-- | src/store/modules/HardwareStatus/SensorsStore.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/store/modules/HardwareStatus/SensorsStore.js b/src/store/modules/HardwareStatus/SensorsStore.js index f28c50ea..896297e3 100644 --- a/src/store/modules/HardwareStatus/SensorsStore.js +++ b/src/store/modules/HardwareStatus/SensorsStore.js @@ -5,14 +5,19 @@ const SensorsStore = { namespaced: true, state: { sensors: [], + fanSensors: [], }, getters: { sensors: (state) => state.sensors, + fanSensors: (state) => state.fanSensors, }, mutations: { setSensors: (state, sensors) => { state.sensors = uniqBy([...state.sensors, ...sensors], 'name'); }, + setFanSensors: (state, fanSensors) => { + state.fanSensors = uniqBy([...state.fanSensors, ...fanSensors], 'name'); + }, }, actions: { async getAllSensors({ dispatch }) { @@ -95,14 +100,10 @@ const SensorsStore = { name: data.Name, status: data.Status.Health, currentValue: data.Reading, - lowerCaution: data.Thresholds?.LowerCaution?.Reading, - upperCaution: data.Thresholds?.UpperCaution?.Reading, - lowerCritical: data.Thresholds?.LowerCritical?.Reading, - upperCritical: data.Thresholds?.UpperCritical?.Reading, units: data.ReadingUnits, }; }); - commit('setSensors', sensorData); + commit('setFanSensors', sensorData); }) ); }, |