diff options
author | Vitalii Lysak <v.lysak@dunice.net> | 2022-07-22 12:16:07 +0300 |
---|---|---|
committer | Vitalii Lysak <v.lysak@dunice.net> | 2022-07-22 12:16:07 +0300 |
commit | 381cc079a34a56d3b6f1bd78e52086d94814df80 (patch) | |
tree | d82851fe97dd7459b5cfdc52380681b7e3f0d9ca /src/store/modules/_sila/HardwareStatus | |
parent | 7cba13534cda94a1efdbad2ff8dbe68de1fbeaa3 (diff) | |
download | webui-vue-381cc079a34a56d3b6f1bd78e52086d94814df80.tar.xz |
add motherboard6 fix others
Diffstat (limited to 'src/store/modules/_sila/HardwareStatus')
-rw-r--r-- | src/store/modules/_sila/HardwareStatus/MotherboardStore.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/store/modules/_sila/HardwareStatus/MotherboardStore.js b/src/store/modules/_sila/HardwareStatus/MotherboardStore.js new file mode 100644 index 00000000..93d655f9 --- /dev/null +++ b/src/store/modules/_sila/HardwareStatus/MotherboardStore.js @@ -0,0 +1,28 @@ +import api from '@/store/api'; + +const MotherboardStore = { + namespaced: true, + state: { + motherboard: [], + }, + getters: { + motherboard: (state) => state.motherboard, + }, + mutations: { + setMotherboardDynamic: (state, data) => { + state.motherboard = data; + }, + }, + actions: { + async getMotherboardDynamic({ commit }) { + return await api + .get('/redfish/v1/TelemetryService/MetricReports/hour_data&other_temp') + .then(({ data: { MetricValues = [] } }) => + commit('setMotherboardDynamic', MetricValues) + ) + .catch((error) => console.log(error)); + }, + }, +}; + +export default MotherboardStore; |