summaryrefslogtreecommitdiff
path: root/src/store/modules/Operations/BootSettingsStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/store/modules/Operations/BootSettingsStore.js')
-rw-r--r--src/store/modules/Operations/BootSettingsStore.js22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/store/modules/Operations/BootSettingsStore.js b/src/store/modules/Operations/BootSettingsStore.js
index 7a36dd84..1f5a628f 100644
--- a/src/store/modules/Operations/BootSettingsStore.js
+++ b/src/store/modules/Operations/BootSettingsStore.js
@@ -36,7 +36,7 @@ const BootSettingsStore = {
.then(({ data: { Boot } }) => {
commit(
'setBootSourceOptions',
- Boot['BootSourceOverrideTarget@Redfish.AllowableValues']
+ Boot['BootSourceOverrideTarget@Redfish.AllowableValues'],
);
commit('setOverrideEnabled', Boot.BootSourceOverrideEnabled);
commit('setBootSource', Boot.BootSourceOverrideTarget);
@@ -74,8 +74,12 @@ const BootSettingsStore = {
// TODO: switch to Redfish when available
return await api
.get('/xyz/openbmc_project/control/host0/TPMEnable')
- .then(({ data: { data: { TPMEnable } } }) =>
- commit('setTpmPolicy', TPMEnable)
+ .then(
+ ({
+ data: {
+ data: { TPMEnable },
+ },
+ }) => commit('setTpmPolicy', TPMEnable),
)
.catch((error) => console.log(error));
},
@@ -85,7 +89,7 @@ const BootSettingsStore = {
return api
.put(
'/xyz/openbmc_project/control/host0/TPMEnable/attr/TPMEnable',
- data
+ data,
)
.then((response) => {
// If request success, commit the values
@@ -101,13 +105,13 @@ const BootSettingsStore = {
},
async saveSettings(
{ dispatch },
- { bootSource, overrideEnabled, tpmEnabled }
+ { bootSource, overrideEnabled, tpmEnabled },
) {
const promises = [];
if (bootSource !== null || overrideEnabled !== null) {
promises.push(
- dispatch('saveBootSettings', { bootSource, overrideEnabled })
+ dispatch('saveBootSettings', { bootSource, overrideEnabled }),
);
}
if (tpmEnabled !== null) {
@@ -117,17 +121,17 @@ const BootSettingsStore = {
return await api.all(promises).then(
api.spread((...responses) => {
let message = i18n.t(
- 'pageServerPowerOperations.toast.successSaveSettings'
+ 'pageServerPowerOperations.toast.successSaveSettings',
);
responses.forEach((response) => {
if (response instanceof Error) {
throw new Error(
- i18n.t('pageServerPowerOperations.toast.errorSaveSettings')
+ i18n.t('pageServerPowerOperations.toast.errorSaveSettings'),
);
}
});
return message;
- })
+ }),
);
},
},