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 | |
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')
-rw-r--r-- | src/store/modules/SecurityAndAccess/CertificatesStore.js (renamed from src/store/modules/AccessControl/SslCertificatesStore.js) | 24 | ||||
-rw-r--r-- | src/store/modules/SecurityAndAccess/LdapStore.js (renamed from src/store/modules/AccessControl/LdapStore.js) | 0 | ||||
-rw-r--r-- | src/store/modules/SecurityAndAccess/PoliciesStore.js (renamed from src/store/modules/Settings/SecuritySettingsStore.js) | 28 | ||||
-rw-r--r-- | src/store/modules/SecurityAndAccess/SessionsStore.js (renamed from src/store/modules/AccessControl/ClientSessionsStore.js) | 12 | ||||
-rw-r--r-- | src/store/modules/SecurityAndAccess/UserManagementStore.js (renamed from src/store/modules/AccessControl/LocalUserMangementStore.js) | 55 |
5 files changed, 51 insertions, 68 deletions
diff --git a/src/store/modules/AccessControl/SslCertificatesStore.js b/src/store/modules/SecurityAndAccess/CertificatesStore.js index 752c2124..97241f34 100644 --- a/src/store/modules/AccessControl/SslCertificatesStore.js +++ b/src/store/modules/SecurityAndAccess/CertificatesStore.js @@ -5,12 +5,12 @@ export const CERTIFICATE_TYPES = [ { type: 'HTTPS Certificate', location: '/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/', - label: i18n.t('pageSslCertificates.httpsCertificate'), + label: i18n.t('pageCertificates.httpsCertificate'), }, { type: 'LDAP Certificate', location: '/redfish/v1/AccountService/LDAP/Certificates/', - label: i18n.t('pageSslCertificates.ldapCertificate'), + label: i18n.t('pageCertificates.ldapCertificate'), }, { type: 'TrustStore Certificate', @@ -18,7 +18,7 @@ export const CERTIFICATE_TYPES = [ // Web UI will show 'CA Certificate' instead of // 'TrustStore Certificate' after user testing revealed // the term 'TrustStore Certificate' wasn't recognized/was unfamilar - label: i18n.t('pageSslCertificates.caCertificate'), + label: i18n.t('pageCertificates.caCertificate'), }, ]; @@ -29,7 +29,7 @@ const getCertificateProp = (type, prop) => { return certificate ? certificate[prop] : null; }; -const SslCertificatesStore = { +const CertificatesStore = { namespaced: true, state: { allCertificates: [], @@ -98,15 +98,13 @@ const SslCertificatesStore = { }) .then(() => dispatch('getCertificates')) .then(() => - i18n.t('pageSslCertificates.toast.successAddCertificate', { + i18n.t('pageCertificates.toast.successAddCertificate', { certificate: getCertificateProp(type, 'label'), }) ) .catch((error) => { console.log(error); - throw new Error( - i18n.t('pageSslCertificates.toast.errorAddCertificate') - ); + throw new Error(i18n.t('pageCertificates.toast.errorAddCertificate')); }); }, async replaceCertificate( @@ -125,14 +123,14 @@ const SslCertificatesStore = { ) .then(() => dispatch('getCertificates')) .then(() => - i18n.t('pageSslCertificates.toast.successReplaceCertificate', { + i18n.t('pageCertificates.toast.successReplaceCertificate', { certificate: getCertificateProp(type, 'label'), }) ) .catch((error) => { console.log(error); throw new Error( - i18n.t('pageSslCertificates.toast.errorReplaceCertificate') + i18n.t('pageCertificates.toast.errorReplaceCertificate') ); }); }, @@ -141,14 +139,14 @@ const SslCertificatesStore = { .delete(location) .then(() => dispatch('getCertificates')) .then(() => - i18n.t('pageSslCertificates.toast.successDeleteCertificate', { + i18n.t('pageCertificates.toast.successDeleteCertificate', { certificate: getCertificateProp(type, 'label'), }) ) .catch((error) => { console.log(error); throw new Error( - i18n.t('pageSslCertificates.toast.errorDeleteCertificate') + i18n.t('pageCertificates.toast.errorDeleteCertificate') ); }); }, @@ -201,4 +199,4 @@ const SslCertificatesStore = { }, }; -export default SslCertificatesStore; +export default CertificatesStore; diff --git a/src/store/modules/AccessControl/LdapStore.js b/src/store/modules/SecurityAndAccess/LdapStore.js index 5aa31c2d..5aa31c2d 100644 --- a/src/store/modules/AccessControl/LdapStore.js +++ b/src/store/modules/SecurityAndAccess/LdapStore.js diff --git a/src/store/modules/Settings/SecuritySettingsStore.js b/src/store/modules/SecurityAndAccess/PoliciesStore.js index 5a885425..1e195527 100644 --- a/src/store/modules/Settings/SecuritySettingsStore.js +++ b/src/store/modules/SecurityAndAccess/PoliciesStore.js @@ -1,7 +1,7 @@ import api from '@/store/api'; import i18n from '@/i18n'; -const SecuritySettingsStore = { +const PoliciesStore = { namespaced: true, state: { sshProtocolEnabled: false, @@ -40,22 +40,18 @@ const SecuritySettingsStore = { .patch('/redfish/v1/Managers/bmc/NetworkProtocol', ipmi) .then(() => { if (protocolEnabled) { - return i18n.t('pageSecuritySettings.toast.successIpmiEnabled'); + return i18n.t('pagePolicies.toast.successIpmiEnabled'); } else { - return i18n.t('pageSecuritySettings.toast.successIpmiDisabled'); + return i18n.t('pagePolicies.toast.successIpmiDisabled'); } }) .catch((error) => { console.log(error); commit('setIpmiProtocolEnabled', !protocolEnabled); if (protocolEnabled) { - throw new Error( - i18n.t('pageSecuritySettings.toast.errorIpmiEnabled') - ); + throw new Error(i18n.t('pagePolicies.toast.errorIpmiEnabled')); } else { - throw new Error( - i18n.t('pageSecuritySettings.toast.errorIpmiDisabled') - ); + throw new Error(i18n.t('pagePolicies.toast.errorIpmiDisabled')); } }); }, @@ -70,26 +66,22 @@ const SecuritySettingsStore = { .patch('/redfish/v1/Managers/bmc/NetworkProtocol', ssh) .then(() => { if (protocolEnabled) { - return i18n.t('pageSecuritySettings.toast.successSshEnabled'); + return i18n.t('pagePolicies.toast.successSshEnabled'); } else { - return i18n.t('pageSecuritySettings.toast.successSshDisabled'); + return i18n.t('pagePolicies.toast.successSshDisabled'); } }) .catch((error) => { console.log(error); commit('setSshProtocolEnabled', !protocolEnabled); if (protocolEnabled) { - throw new Error( - i18n.t('pageSecuritySettings.toast.errorSshEnabled') - ); + throw new Error(i18n.t('pagePolicies.toast.errorSshEnabled')); } else { - throw new Error( - i18n.t('pageSecuritySettings.toast.errorSshDisabled') - ); + throw new Error(i18n.t('pagePolicies.toast.errorSshDisabled')); } }); }, }, }; -export default SecuritySettingsStore; +export default PoliciesStore; diff --git a/src/store/modules/AccessControl/ClientSessionsStore.js b/src/store/modules/SecurityAndAccess/SessionsStore.js index 4295d578..54607ab6 100644 --- a/src/store/modules/AccessControl/ClientSessionsStore.js +++ b/src/store/modules/SecurityAndAccess/SessionsStore.js @@ -1,7 +1,7 @@ import api, { getResponseCount } from '@/store/api'; import i18n from '@/i18n'; -const ClientSessionsStore = { +const SessionsStore = { namespaced: true, state: { allConnections: [], @@ -14,7 +14,7 @@ const ClientSessionsStore = { (state.allConnections = allConnections), }, actions: { - async getClientSessionsData({ commit }) { + async getSessionsData({ commit }) { return await api .get('/redfish/v1/SessionService/Sessions') .then((response) => @@ -48,7 +48,7 @@ const ClientSessionsStore = { return await api .all(promises) .then((response) => { - dispatch('getClientSessionsData'); + dispatch('getSessionsData'); return response; }) .then( @@ -58,7 +58,7 @@ const ClientSessionsStore = { if (successCount) { const message = i18n.tc( - 'pageClientSessions.toast.successDelete', + 'pageSessions.toast.successDelete', successCount ); toastMessages.push({ type: 'success', message }); @@ -66,7 +66,7 @@ const ClientSessionsStore = { if (errorCount) { const message = i18n.tc( - 'pageClientSessions.toast.errorDelete', + 'pageSessions.toast.errorDelete', errorCount ); toastMessages.push({ type: 'error', message }); @@ -77,4 +77,4 @@ const ClientSessionsStore = { }, }, }; -export default ClientSessionsStore; +export default SessionsStore; diff --git a/src/store/modules/AccessControl/LocalUserMangementStore.js b/src/store/modules/SecurityAndAccess/UserManagementStore.js index 6bc6ec5d..362f3f64 100644 --- a/src/store/modules/AccessControl/LocalUserMangementStore.js +++ b/src/store/modules/SecurityAndAccess/UserManagementStore.js @@ -1,7 +1,7 @@ import api, { getResponseCount } from '@/store/api'; import i18n from '@/i18n'; -const LocalUserManagementStore = { +const UserManagementStore = { namespaced: true, state: { allUsers: [], @@ -65,9 +65,7 @@ const LocalUserManagementStore = { }) .catch((error) => { console.log(error); - const message = i18n.t( - 'pageLocalUserManagement.toast.errorLoadUsers' - ); + const message = i18n.t('pageUserManagement.toast.errorLoadUsers'); throw new Error(message); }); }, @@ -83,7 +81,7 @@ const LocalUserManagementStore = { .catch((error) => { console.log(error); const message = i18n.t( - 'pageLocalUserManagement.toast.errorLoadAccountSettings' + 'pageUserManagement.toast.errorLoadAccountSettings' ); throw new Error(message); }); @@ -110,16 +108,15 @@ const LocalUserManagementStore = { .post('/redfish/v1/AccountService/Accounts', data) .then(() => dispatch('getUsers')) .then(() => - i18n.t('pageLocalUserManagement.toast.successCreateUser', { + i18n.t('pageUserManagement.toast.successCreateUser', { username, }) ) .catch((error) => { console.log(error); - const message = i18n.t( - 'pageLocalUserManagement.toast.errorCreateUser', - { username } - ); + const message = i18n.t('pageUserManagement.toast.errorCreateUser', { + username, + }); throw new Error(message); }); }, @@ -137,16 +134,15 @@ const LocalUserManagementStore = { .patch(`/redfish/v1/AccountService/Accounts/${originalUsername}`, data) .then(() => dispatch('getUsers')) .then(() => - i18n.t('pageLocalUserManagement.toast.successUpdateUser', { + i18n.t('pageUserManagement.toast.successUpdateUser', { username: originalUsername, }) ) .catch((error) => { console.log(error); - const message = i18n.t( - 'pageLocalUserManagement.toast.errorUpdateUser', - { username: originalUsername } - ); + const message = i18n.t('pageUserManagement.toast.errorUpdateUser', { + username: originalUsername, + }); throw new Error(message); }); }, @@ -155,16 +151,15 @@ const LocalUserManagementStore = { .delete(`/redfish/v1/AccountService/Accounts/${username}`) .then(() => dispatch('getUsers')) .then(() => - i18n.t('pageLocalUserManagement.toast.successDeleteUser', { + i18n.t('pageUserManagement.toast.successDeleteUser', { username, }) ) .catch((error) => { console.log(error); - const message = i18n.t( - 'pageLocalUserManagement.toast.errorDeleteUser', - { username } - ); + const message = i18n.t('pageUserManagement.toast.errorDeleteUser', { + username, + }); throw new Error(message); }); }, @@ -190,7 +185,7 @@ const LocalUserManagementStore = { if (successCount) { const message = i18n.tc( - 'pageLocalUserManagement.toast.successBatchDelete', + 'pageUserManagement.toast.successBatchDelete', successCount ); toastMessages.push({ type: 'success', message }); @@ -198,7 +193,7 @@ const LocalUserManagementStore = { if (errorCount) { const message = i18n.tc( - 'pageLocalUserManagement.toast.errorBatchDelete', + 'pageUserManagement.toast.errorBatchDelete', errorCount ); toastMessages.push({ type: 'error', message }); @@ -233,7 +228,7 @@ const LocalUserManagementStore = { if (successCount) { const message = i18n.tc( - 'pageLocalUserManagement.toast.successBatchEnable', + 'pageUserManagement.toast.successBatchEnable', successCount ); toastMessages.push({ type: 'success', message }); @@ -241,7 +236,7 @@ const LocalUserManagementStore = { if (errorCount) { const message = i18n.tc( - 'pageLocalUserManagement.toast.errorBatchEnable', + 'pageUserManagement.toast.errorBatchEnable', errorCount ); toastMessages.push({ type: 'error', message }); @@ -276,7 +271,7 @@ const LocalUserManagementStore = { if (successCount) { const message = i18n.tc( - 'pageLocalUserManagement.toast.successBatchDisable', + 'pageUserManagement.toast.successBatchDisable', successCount ); toastMessages.push({ type: 'success', message }); @@ -284,7 +279,7 @@ const LocalUserManagementStore = { if (errorCount) { const message = i18n.tc( - 'pageLocalUserManagement.toast.errorBatchDisable', + 'pageUserManagement.toast.errorBatchDisable', errorCount ); toastMessages.push({ type: 'error', message }); @@ -310,16 +305,14 @@ const LocalUserManagementStore = { .patch('/redfish/v1/AccountService', data) //GET new settings to update view .then(() => dispatch('getAccountSettings')) - .then(() => i18n.t('pageLocalUserManagement.toast.successSaveSettings')) + .then(() => i18n.t('pageUserManagement.toast.successSaveSettings')) .catch((error) => { console.log(error); - const message = i18n.t( - 'pageLocalUserManagement.toast.errorSaveSettings' - ); + const message = i18n.t('pageUserManagement.toast.errorSaveSettings'); throw new Error(message); }); }, }, }; -export default LocalUserManagementStore; +export default UserManagementStore; |