diff options
author | Vitalii Lysak <v.lysak@dunice.net> | 2022-08-17 15:27:13 +0300 |
---|---|---|
committer | Vitalii Lysak <v.lysak@dunice.net> | 2022-08-17 15:27:13 +0300 |
commit | f73b682a5cc44f2b4e60a4b22622b0c59a9b4a9a (patch) | |
tree | 48a407a81c5bbaa71682d5b19f0265105a14b423 /src/store/modules/HardwareStatus/ProcessorStore.js | |
parent | 67dab376eb97139c5dba14b441c6d9cede62fb2e (diff) | |
download | webui-vue-f73b682a5cc44f2b4e60a4b22622b0c59a9b4a9a.tar.xz |
SILABMC-256: add validation and upd limits layout
Diffstat (limited to 'src/store/modules/HardwareStatus/ProcessorStore.js')
-rw-r--r-- | src/store/modules/HardwareStatus/ProcessorStore.js | 22 |
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')); |