From f73b682a5cc44f2b4e60a4b22622b0c59a9b4a9a Mon Sep 17 00:00:00 2001 From: Vitalii Lysak Date: Wed, 17 Aug 2022 15:27:13 +0300 Subject: SILABMC-256: add validation and upd limits layout --- .../modules/HardwareStatus/MotherboardStore.js | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'src/store/modules/HardwareStatus/MotherboardStore.js') diff --git a/src/store/modules/HardwareStatus/MotherboardStore.js b/src/store/modules/HardwareStatus/MotherboardStore.js index e565eaa0..0f54b529 100644 --- a/src/store/modules/HardwareStatus/MotherboardStore.js +++ b/src/store/modules/HardwareStatus/MotherboardStore.js @@ -26,19 +26,15 @@ const MotherboardStore = { }, actions: { async patchLimits({ 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('pageMotherboard.toast.errorLimitUpdate')); -- cgit v1.2.3