diff options
Diffstat (limited to 'src/store')
-rw-r--r-- | src/store/index.js | 4 | ||||
-rw-r--r-- | src/store/modules/HardwareStatus/MemoryStore.js | 12 | ||||
-rw-r--r-- | src/store/modules/HardwareStatus/ProcessorStore.js | 12 | ||||
-rw-r--r-- | src/store/modules/_sila/HardwareStatus/FanStore.js | 12 | ||||
-rw-r--r-- | src/store/modules/_sila/HardwareStatus/MotherboardStore.js | 28 |
5 files changed, 67 insertions, 1 deletions
diff --git a/src/store/index.js b/src/store/index.js index 41eba75f..fa857b3a 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -19,7 +19,8 @@ import ServerLedStore from './modules/HardwareStatus/ServerLedStore'; import SystemStore from './modules/HardwareStatus/SystemStore'; import PowerSupplyStore from './modules/HardwareStatus/PowerSupplyStore'; import MemoryStore from './modules/HardwareStatus/MemoryStore'; -import FanStore from './modules/_sila//HardwareStatus/FanStore'; +import FanStore from './modules/_sila/HardwareStatus/FanStore'; +import MotherboardStore from './modules/_sila/HardwareStatus/MotherboardStore'; import ChassisStore from './modules/HardwareStatus/ChassisStore'; import BmcStore from './modules/HardwareStatus/BmcStore'; import ProcessorStore from './modules/HardwareStatus/ProcessorStore'; @@ -60,6 +61,7 @@ export default new Vuex.Store({ system: SystemStore, memory: MemoryStore, fan: FanStore, + motherboard: MotherboardStore, chassis: ChassisStore, bmc: BmcStore, processors: ProcessorStore, diff --git a/src/store/modules/HardwareStatus/MemoryStore.js b/src/store/modules/HardwareStatus/MemoryStore.js index fd8f0a91..9d79ad10 100644 --- a/src/store/modules/HardwareStatus/MemoryStore.js +++ b/src/store/modules/HardwareStatus/MemoryStore.js @@ -52,8 +52,20 @@ const MemoryStore = { }; }); }, + + setMemoryDynamic: (state, data) => { + state.dimms = data; + }, }, actions: { + async getMemoryDynamic({ commit }) { + return await api + .get('/redfish/v1/TelemetryService/MetricReports/hour_data&dimm_temp') + .then(({ data: { MetricValues = [] } }) => + commit('setMemoryDynamic', MetricValues) + ) + .catch((error) => console.log(error)); + }, async getDimms({ commit }) { return await api .get('/redfish/v1/Systems/system/Memory') diff --git a/src/store/modules/HardwareStatus/ProcessorStore.js b/src/store/modules/HardwareStatus/ProcessorStore.js index d4c99bce..2309f536 100644 --- a/src/store/modules/HardwareStatus/ProcessorStore.js +++ b/src/store/modules/HardwareStatus/ProcessorStore.js @@ -59,8 +59,20 @@ const ProcessorStore = { }; }); }, + + setProcessorsDynamic: (state, data) => { + state.processors = data; + }, }, actions: { + async getProcessorsDynamic({ commit }) { + return await api + .get('/redfish/v1/TelemetryService/MetricReports/hour_data&cpu_temp') + .then(({ data: { MetricValues = [] } }) => + commit('setProcessorsDynamic', MetricValues) + ) + .catch((error) => console.log(error)); + }, async getProcessorsInfo({ commit }) { return await api .get('/redfish/v1/Systems/system/Processors') 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') 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; |