diff options
Diffstat (limited to 'src/store/modules/_sila')
-rw-r--r-- | src/store/modules/_sila/HardwareStatus/FanStore.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/store/modules/_sila/HardwareStatus/FanStore.js b/src/store/modules/_sila/HardwareStatus/FanStore.js index 1399710b..a7647f3d 100644 --- a/src/store/modules/_sila/HardwareStatus/FanStore.js +++ b/src/store/modules/_sila/HardwareStatus/FanStore.js @@ -39,8 +39,20 @@ const FanStore = { }; }); }, + + setFansDynamic: (state, data) => { + state.fans = data; + }, }, actions: { + async getFansDynamic({ commit }) { + return await api + .get('/redfish/v1/TelemetryService/MetricReports/hour_data&fans') + .then(({ data: { MetricValues = [] } }) => + commit('setFansDynamic', MetricValues) + ) + .catch((error) => console.log(error)); + }, async getFanInfo({ commit }) { return await api .get('/redfish/v1/Chassis/chassis/Thermal') |