From 8e266a3de94343f789e28a5cc586426bc3b0c2dd Mon Sep 17 00:00:00 2001 From: Vitalii Lysak Date: Mon, 25 Jul 2022 16:45:04 +0300 Subject: add req for hour --- src/store/modules/HardwareStatus/MemoryStore.js | 10 ++++++++++ src/store/modules/HardwareStatus/ProcessorStore.js | 10 ++++++++++ src/store/modules/_sila/HardwareStatus/MotherboardStore.js | 10 ++++++++++ 3 files changed, 30 insertions(+) (limited to 'src/store') diff --git a/src/store/modules/HardwareStatus/MemoryStore.js b/src/store/modules/HardwareStatus/MemoryStore.js index 9d79ad10..2c8fc044 100644 --- a/src/store/modules/HardwareStatus/MemoryStore.js +++ b/src/store/modules/HardwareStatus/MemoryStore.js @@ -58,6 +58,16 @@ const MemoryStore = { }, }, actions: { + async getMemoryDynamicHour({ commit }) { + return await api + .get( + '/redfish/v1/TelemetryService/MetricReports/hour_data&id=dimm_temp&period=last_hour' + ) + .then(({ data: { MetricValues = [] } }) => + commit('setMemoryDynamic', MetricValues) + ) + .catch((error) => console.log(error)); + }, async getMemoryDynamic({ commit }) { return await api .get('/redfish/v1/TelemetryService/MetricReports/hour_data&dimm_temp') diff --git a/src/store/modules/HardwareStatus/ProcessorStore.js b/src/store/modules/HardwareStatus/ProcessorStore.js index 2309f536..a28cd00c 100644 --- a/src/store/modules/HardwareStatus/ProcessorStore.js +++ b/src/store/modules/HardwareStatus/ProcessorStore.js @@ -65,6 +65,16 @@ const ProcessorStore = { }, }, actions: { + async getProcessorsDynamicHour({ commit }) { + return await api + .get( + '/redfish/v1/TelemetryService/MetricReports/hour_data&id=cpu_temp&period=last_hour' + ) + .then(({ data: { MetricValues = [] } }) => + commit('setProcessorsDynamic', MetricValues) + ) + .catch((error) => console.log(error)); + }, async getProcessorsDynamic({ commit }) { return await api .get('/redfish/v1/TelemetryService/MetricReports/hour_data&cpu_temp') diff --git a/src/store/modules/_sila/HardwareStatus/MotherboardStore.js b/src/store/modules/_sila/HardwareStatus/MotherboardStore.js index 93d655f9..71b71065 100644 --- a/src/store/modules/_sila/HardwareStatus/MotherboardStore.js +++ b/src/store/modules/_sila/HardwareStatus/MotherboardStore.js @@ -14,6 +14,16 @@ const MotherboardStore = { }, }, actions: { + async getMotherboardDynamicHour({ commit }) { + return await api + .get( + '/redfish/v1/TelemetryService/MetricReports/hour_data&id=other_temp&period=last_hour' + ) + .then(({ data: { MetricValues = [] } }) => + commit('setMotherboardDynamic', MetricValues) + ) + .catch((error) => console.log(error)); + }, async getMotherboardDynamic({ commit }) { return await api .get('/redfish/v1/TelemetryService/MetricReports/hour_data&other_temp') -- cgit v1.2.3