From 8132399c29a07b783d2b24ccd80da7676460dbf3 Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Tue, 27 Feb 2024 11:26:24 -0800 Subject: Reformat files with new linter All changes should be whitespace, and were done using npm run-script lint. Change-Id: I943c6b435c5c872841af5affc1e89910468b5ca6 Signed-off-by: Ed Tanous --- src/store/modules/Operations/BootSettingsStore.js | 22 +++++++++++++--------- src/store/modules/Operations/ControlStore.js | 2 +- src/store/modules/Operations/FactoryResetStore.js | 2 +- src/store/modules/Operations/FirmwareStore.js | 12 ++++++------ src/store/modules/Operations/KeyClearStore.js | 2 +- src/store/modules/Operations/VirtualMediaStore.js | 8 +++++--- 6 files changed, 27 insertions(+), 21 deletions(-) (limited to 'src/store/modules/Operations') 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; - }) + }), ); }, }, diff --git a/src/store/modules/Operations/ControlStore.js b/src/store/modules/Operations/ControlStore.js index 9b8bf73d..e76063ba 100644 --- a/src/store/modules/Operations/ControlStore.js +++ b/src/store/modules/Operations/ControlStore.js @@ -23,7 +23,7 @@ const checkForServerStatus = function (serverStatus) { unwatch(); clearTimeout(timer); } - } + }, ); }); }; diff --git a/src/store/modules/Operations/FactoryResetStore.js b/src/store/modules/Operations/FactoryResetStore.js index 8118cf7f..83bddeb0 100644 --- a/src/store/modules/Operations/FactoryResetStore.js +++ b/src/store/modules/Operations/FactoryResetStore.js @@ -13,7 +13,7 @@ const FactoryResetStore = { .catch((error) => { console.log('Factory Reset: ', error); throw new Error( - i18n.t('pageFactoryReset.toast.resetToDefaultsError') + i18n.t('pageFactoryReset.toast.resetToDefaultsError'), ); }); }, diff --git a/src/store/modules/Operations/FirmwareStore.js b/src/store/modules/Operations/FirmwareStore.js index afc12e92..43a8e079 100644 --- a/src/store/modules/Operations/FirmwareStore.js +++ b/src/store/modules/Operations/FirmwareStore.js @@ -17,22 +17,22 @@ const FirmwareStore = { isSingleFileUploadEnabled: (state) => state.hostFirmware.length === 0, activeBmcFirmware: (state) => { return state.bmcFirmware.find( - (firmware) => firmware.id === state.bmcActiveFirmwareId + (firmware) => firmware.id === state.bmcActiveFirmwareId, ); }, activeHostFirmware: (state) => { return state.hostFirmware.find( - (firmware) => firmware.id === state.hostActiveFirmwareId + (firmware) => firmware.id === state.hostActiveFirmwareId, ); }, backupBmcFirmware: (state) => { return state.bmcFirmware.find( - (firmware) => firmware.id !== state.bmcActiveFirmwareId + (firmware) => firmware.id !== state.bmcActiveFirmwareId, ); }, backupHostFirmware: (state) => { return state.hostFirmware.find( - (firmware) => firmware.id !== state.hostActiveFirmwareId + (firmware) => firmware.id !== state.hostActiveFirmwareId, ); }, }, @@ -74,7 +74,7 @@ const FirmwareStore = { const inventoryList = await api .get('/redfish/v1/UpdateService/FirmwareInventory') .then(({ data: { Members = [] } = {} }) => - Members.map((item) => api.get(item['@odata.id'])) + Members.map((item) => api.get(item['@odata.id'])), ) .catch((error) => console.log(error)); await api @@ -165,7 +165,7 @@ const FirmwareStore = { return await api .post( '/redfish/v1/UpdateService/Actions/UpdateService.SimpleUpdate', - data + data, ) .catch((error) => { console.log(error); diff --git a/src/store/modules/Operations/KeyClearStore.js b/src/store/modules/Operations/KeyClearStore.js index 1dc96e0f..78804e75 100644 --- a/src/store/modules/Operations/KeyClearStore.js +++ b/src/store/modules/Operations/KeyClearStore.js @@ -11,7 +11,7 @@ const KeyClearStore = { return await api .patch( '/redfish/v1/Systems/system/Bios/Settings', - selectedKeyForClearing + selectedKeyForClearing, ) .then(() => i18n.t('pageKeyClear.toast.selectedKeyClearedSuccess')) .catch((error) => { diff --git a/src/store/modules/Operations/VirtualMediaStore.js b/src/store/modules/Operations/VirtualMediaStore.js index 3ae08a11..1d27e215 100644 --- a/src/store/modules/Operations/VirtualMediaStore.js +++ b/src/store/modules/Operations/VirtualMediaStore.js @@ -51,7 +51,9 @@ const VirtualMediaStore = { return await api .get('/redfish/v1/Managers/bmc/VirtualMedia') .then((response) => - response.data.Members.map((virtualMedia) => virtualMedia['@odata.id']) + response.data.Members.map( + (virtualMedia) => virtualMedia['@odata.id'], + ), ) .then((devices) => api.all(devices.map((device) => api.get(device)))) .then((devices) => { @@ -94,7 +96,7 @@ const VirtualMediaStore = { return await api .post( `/redfish/v1/Managers/bmc/VirtualMedia/${id}/Actions/VirtualMedia.InsertMedia`, - data + data, ) .catch((error) => { console.log('Mount image:', error); @@ -104,7 +106,7 @@ const VirtualMediaStore = { async unmountImage(_, id) { return await api .post( - `/redfish/v1/Managers/bmc/VirtualMedia/${id}/Actions/VirtualMedia.EjectMedia` + `/redfish/v1/Managers/bmc/VirtualMedia/${id}/Actions/VirtualMedia.EjectMedia`, ) .catch((error) => { console.log('Unmount image:', error); -- cgit v1.2.3