diff options
Diffstat (limited to 'src/store')
-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); }) ); }, |