summaryrefslogtreecommitdiff
path: root/src/store/modules/HardwareStatus/ProcessorStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/store/modules/HardwareStatus/ProcessorStore.js')
-rw-r--r--src/store/modules/HardwareStatus/ProcessorStore.js22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/store/modules/HardwareStatus/ProcessorStore.js b/src/store/modules/HardwareStatus/ProcessorStore.js
index 9a09dff4..9dede45e 100644
--- a/src/store/modules/HardwareStatus/ProcessorStore.js
+++ b/src/store/modules/HardwareStatus/ProcessorStore.js
@@ -87,19 +87,15 @@ const ProcessorStore = {
},
actions: {
async patchLimitsTemp({ dispatch }, { warning, groups }) {
- return Promise.all(
- groups.map(
- async (group) =>
- await api.patch('/redfish/v1/Chassis/SILA_Baseboard/Thermal', {
- Temperatures: [
- {
- MemberId: group,
- UpperThresholdNonCritical: warning,
- },
- ],
- })
- )
- )
+ return await api
+ .patch('/redfish/v1/Chassis/SILA_Baseboard/Thermal', {
+ Temperatures: groups.map((group) => {
+ return {
+ MemberId: group,
+ UpperThresholdNonCritical: warning,
+ };
+ }),
+ })
.catch((error) => {
console.log(error);
throw new Error(i18n.t('pageProcessor.toast.errorLimitUpdate'));