diff options
author | Derick Montague <derick.montague@ibm.com> | 2020-10-22 00:20:00 +0300 |
---|---|---|
committer | Derick Montague <derick.montague@ibm.com> | 2020-11-03 19:47:51 +0300 |
commit | 602e98aa32f82fd3b0c3d250c7cc1f8da971db24 (patch) | |
tree | 2894194868ff987718a8b19f112b8106d662aa83 /src/store/modules/Configuration/NetworkSettingsStore.js | |
parent | 47165201c79b3d2c4ccc62a49a9c75d038ee8fe6 (diff) | |
download | webui-vue-602e98aa32f82fd3b0c3d250c7cc1f8da971db24.tar.xz |
Update linting packages to use latest
- 99% of changes were small syntax changes that were changed by the
lint command. There were a couple of small manual changes to meet the
property order patterns established as part of the vue:recommended
guidelines.
There are rules that were set from errors to warnings and new stories
are being opened to address those issues.
Testing:
- Successfully ran npm run serve
- Successfully ran npm run lint
- Verified functionality works as expected, e.g. success and failure use cases
- Resolved any JavaScript errors thrown to the console
Signed-off-by: Derick Montague <derick.montague@ibm.com>
Change-Id: Ie082f31c73ccbe8a60afa8f88a9ef6dbf33d9fd2
Diffstat (limited to 'src/store/modules/Configuration/NetworkSettingsStore.js')
-rw-r--r-- | src/store/modules/Configuration/NetworkSettingsStore.js | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/store/modules/Configuration/NetworkSettingsStore.js b/src/store/modules/Configuration/NetworkSettingsStore.js index ae1de3d2..9cdcd415 100644 --- a/src/store/modules/Configuration/NetworkSettingsStore.js +++ b/src/store/modules/Configuration/NetworkSettingsStore.js @@ -7,12 +7,12 @@ const NetworkSettingsStore = { state: { defaultGateway: '', ethernetData: [], - interfaceOptions: [] + interfaceOptions: [], }, getters: { - defaultGateway: state => state.defaultGateway, - ethernetData: state => state.ethernetData, - interfaceOptions: state => state.interfaceOptions + defaultGateway: (state) => state.defaultGateway, + ethernetData: (state) => state.ethernetData, + interfaceOptions: (state) => state.interfaceOptions, }, mutations: { setDefaultGateway: (state, defaultGateway) => @@ -20,35 +20,35 @@ const NetworkSettingsStore = { setEthernetData: (state, ethernetData) => (state.ethernetData = ethernetData), setInterfaceOptions: (state, interfaceOptions) => - (state.interfaceOptions = interfaceOptions) + (state.interfaceOptions = interfaceOptions), }, actions: { async getEthernetData({ commit }) { return await api .get('/redfish/v1/Managers/bmc/EthernetInterfaces') - .then(response => + .then((response) => response.data.Members.map( - ethernetInterface => ethernetInterface['@odata.id'] + (ethernetInterface) => ethernetInterface['@odata.id'] ) ) - .then(ethernetInterfaceIds => + .then((ethernetInterfaceIds) => api.all( - ethernetInterfaceIds.map(ethernetInterface => + ethernetInterfaceIds.map((ethernetInterface) => api.get(ethernetInterface) ) ) ) - .then(ethernetInterfaces => { + .then((ethernetInterfaces) => { const ethernetData = ethernetInterfaces.map( - ethernetInterface => ethernetInterface.data + (ethernetInterface) => ethernetInterface.data ); const interfaceOptions = ethernetInterfaces.map( - ethernetName => ethernetName.data.Id + (ethernetName) => ethernetName.data.Id ); const addresses = ethernetData[0].IPv4StaticAddresses; // Default gateway manually set to first gateway saved on the first interface. Default gateway property is WIP on backend - const defaultGateway = addresses.map(ipv4 => { + const defaultGateway = addresses.map((ipv4) => { return ipv4.Gateway; }); @@ -56,7 +56,7 @@ const NetworkSettingsStore = { commit('setEthernetData', ethernetData); commit('setInterfaceOptions', interfaceOptions); }) - .catch(error => { + .catch((error) => { console.log('Network Data:', error); }); }, @@ -67,10 +67,10 @@ const NetworkSettingsStore = { state.ethernetData[networkSettingsForm.selectedInterfaceIndex] .IPv4StaticAddresses; - const addressArray = originalAddresses.map(item => { + const addressArray = originalAddresses.map((item) => { const address = item.Address; if (find(updatedAddresses, { Address: address })) { - remove(updatedAddresses, item => { + remove(updatedAddresses, (item) => { return item.Address === address; }); return {}; @@ -81,7 +81,7 @@ const NetworkSettingsStore = { const data = { HostName: networkSettingsForm.hostname, - MACAddress: networkSettingsForm.macAddress + MACAddress: networkSettingsForm.macAddress, }; // If DHCP disabled, update static DNS or static ipv4 @@ -99,14 +99,14 @@ const NetworkSettingsStore = { .then(() => { return i18n.t('pageNetworkSettings.toast.successSaveNetworkSettings'); }) - .catch(error => { + .catch((error) => { console.log(error); throw new Error( i18n.t('pageNetworkSettings.toast.errorSaveNetworkSettings') ); }); - } - } + }, + }, }; export default NetworkSettingsStore; |