diff options
author | Sandeepa Singh <sandeepa.singh@ibm.com> | 2021-07-26 12:35:39 +0300 |
---|---|---|
committer | Derick Montague <derick.montague@ibm.com> | 2021-08-10 22:20:42 +0300 |
commit | b440616c23b61166ae6d87839a70eec31bdca235 (patch) | |
tree | d72769d4aa425e96e47419515b85a8631d8e99d7 /src/store/modules/Settings | |
parent | f67f769f2304bca64d2b9758e22c21203960eef9 (diff) | |
download | webui-vue-b440616c23b61166ae6d87839a70eec31bdca235.tar.xz |
IA update: Update access and control section
This is the fifth commit of the information architecture changes and
has the following changes:
- The icon for access and control has been updated
- Access and control section has been updated to security and
access section
- Security settings page has been updated to policies page and moved to
security and access section
- Client sessions page has been updated to sessions page
- Local user management page has been updated to user management page
- SSL certificates page has been updated to certificates page
Signed-off-by: Sandeepa Singh <sandeepa.singh@ibm.com>
Change-Id: Ie93cee9002742ecf7d33615636f4f159f4395fc4
Diffstat (limited to 'src/store/modules/Settings')
-rw-r--r-- | src/store/modules/Settings/SecuritySettingsStore.js | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/src/store/modules/Settings/SecuritySettingsStore.js b/src/store/modules/Settings/SecuritySettingsStore.js deleted file mode 100644 index 5a885425..00000000 --- a/src/store/modules/Settings/SecuritySettingsStore.js +++ /dev/null @@ -1,95 +0,0 @@ -import api from '@/store/api'; -import i18n from '@/i18n'; - -const SecuritySettingsStore = { - namespaced: true, - state: { - sshProtocolEnabled: false, - ipmiProtocolEnabled: false, - }, - getters: { - sshProtocolEnabled: (state) => state.sshProtocolEnabled, - ipmiProtocolEnabled: (state) => state.ipmiProtocolEnabled, - }, - mutations: { - setSshProtocolEnabled: (state, sshProtocolEnabled) => - (state.sshProtocolEnabled = sshProtocolEnabled), - setIpmiProtocolEnabled: (state, ipmiProtocolEnabled) => - (state.ipmiProtocolEnabled = ipmiProtocolEnabled), - }, - actions: { - async getNetworkProtocolStatus({ commit }) { - return await api - .get('/redfish/v1/Managers/bmc/NetworkProtocol') - .then((response) => { - const sshProtocol = response.data.SSH.ProtocolEnabled; - const ipmiProtocol = response.data.IPMI.ProtocolEnabled; - commit('setSshProtocolEnabled', sshProtocol); - commit('setIpmiProtocolEnabled', ipmiProtocol); - }) - .catch((error) => console.log(error)); - }, - async saveIpmiProtocolState({ commit }, protocolEnabled) { - commit('setIpmiProtocolEnabled', protocolEnabled); - const ipmi = { - IPMI: { - ProtocolEnabled: protocolEnabled, - }, - }; - return await api - .patch('/redfish/v1/Managers/bmc/NetworkProtocol', ipmi) - .then(() => { - if (protocolEnabled) { - return i18n.t('pageSecuritySettings.toast.successIpmiEnabled'); - } else { - return i18n.t('pageSecuritySettings.toast.successIpmiDisabled'); - } - }) - .catch((error) => { - console.log(error); - commit('setIpmiProtocolEnabled', !protocolEnabled); - if (protocolEnabled) { - throw new Error( - i18n.t('pageSecuritySettings.toast.errorIpmiEnabled') - ); - } else { - throw new Error( - i18n.t('pageSecuritySettings.toast.errorIpmiDisabled') - ); - } - }); - }, - async saveSshProtocolState({ commit }, protocolEnabled) { - commit('setSshProtocolEnabled', protocolEnabled); - const ssh = { - SSH: { - ProtocolEnabled: protocolEnabled, - }, - }; - return await api - .patch('/redfish/v1/Managers/bmc/NetworkProtocol', ssh) - .then(() => { - if (protocolEnabled) { - return i18n.t('pageSecuritySettings.toast.successSshEnabled'); - } else { - return i18n.t('pageSecuritySettings.toast.successSshDisabled'); - } - }) - .catch((error) => { - console.log(error); - commit('setSshProtocolEnabled', !protocolEnabled); - if (protocolEnabled) { - throw new Error( - i18n.t('pageSecuritySettings.toast.errorSshEnabled') - ); - } else { - throw new Error( - i18n.t('pageSecuritySettings.toast.errorSshDisabled') - ); - } - }); - }, - }, -}; - -export default SecuritySettingsStore; |