summaryrefslogtreecommitdiff
path: root/src/store/modules/HardwareStatus/PowerSupplyStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/store/modules/HardwareStatus/PowerSupplyStore.js')
-rw-r--r--src/store/modules/HardwareStatus/PowerSupplyStore.js42
1 files changed, 22 insertions, 20 deletions
diff --git a/src/store/modules/HardwareStatus/PowerSupplyStore.js b/src/store/modules/HardwareStatus/PowerSupplyStore.js
index 567908f2..e70d8dd0 100644
--- a/src/store/modules/HardwareStatus/PowerSupplyStore.js
+++ b/src/store/modules/HardwareStatus/PowerSupplyStore.js
@@ -132,23 +132,25 @@ const PowerSupplyStore = {
.catch((error) => console.log(error));
},
async patchLimitsVol({ dispatch }, { warning, critical, groups }) {
- return Promise.all(
- groups.map(
- async (group) =>
- await api.patch('/redfish/v1/Chassis/SILA_Baseboard/Power', {
- Voltages: [
- {
- MemberId: group,
- UpperThresholdNonCritical: warning,
- },
- {
- MemberId: group,
- UpperThresholdCritical: critical,
- },
- ],
- })
- )
- )
+ return await api
+ .patch('/redfish/v1/Chassis/SILA_Baseboard/Power', {
+ Voltages: groups.map((group) => {
+ return {
+ MemberId: group,
+ UpperThresholdNonCritical: warning,
+ };
+ }),
+ })
+ .then(async () => {
+ return await api.patch('/redfish/v1/Chassis/SILA_Baseboard/Power', {
+ Voltages: groups.map((group) => {
+ return {
+ MemberId: group,
+ UpperThresholdCritical: critical,
+ };
+ }),
+ });
+ })
.catch((error) => {
console.log(error);
throw new Error(i18n.t('pagePowerSup.toast.errorLimitUpdate'));
@@ -157,9 +159,9 @@ const PowerSupplyStore = {
},
async getLimitsVol({ commit }) {
return await api
- .get('/redfish/v1/Chassis/SILA_Baseboard/Thermal')
- .then(({ data: { Temperatures = [] } }) => {
- commit('setLimitsVol', Temperatures);
+ .get('/redfish/v1/Chassis/SILA_Baseboard/Power')
+ .then(({ data: { Voltages = [] } }) => {
+ commit('setLimitsVol', Voltages);
})
.catch((error) => console.log(error));
},