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
diff --git a/src/store/index.js b/src/store/index.js
index 2afadd0..608a027 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -3,10 +3,10 @@
 
 import GlobalStore from './modules/GlobalStore';
 import AuthenticationStore from './modules/Authentication/AuthenticanStore';
-import ClientSessions from './modules/AccessControl/ClientSessionsStore';
-import LdapStore from './modules/AccessControl/LdapStore';
-import LocalUserManagementStore from './modules/AccessControl/LocalUserMangementStore';
-import SslCertificatesStore from './modules/AccessControl/SslCertificatesStore';
+import SessionsStore from './modules/SecurityAndAccess/SessionsStore';
+import LdapStore from './modules/SecurityAndAccess/LdapStore';
+import UserManagementStore from './modules/SecurityAndAccess/UserManagementStore';
+import CertificatesStore from './modules/SecurityAndAccess/CertificatesStore';
 import FirmwareStore from './modules/Operations/FirmwareStore';
 import BootSettingsStore from './modules/Operations/BootSettingsStore';
 import ControlStore from './modules/Operations/ControlStore';
@@ -24,7 +24,7 @@
 import BmcStore from './modules/HardwareStatus/BmcStore';
 import ProcessorStore from './modules/HardwareStatus/ProcessorStore';
 import PostCodeLogsStore from './modules/Logs/PostCodeLogsStore';
-import SecuritySettingsStore from './modules/Settings/SecuritySettingsStore';
+import PoliciesStore from './modules/SecurityAndAccess/PoliciesStore';
 import FactoryResetStore from './modules/Operations/FactoryResetStore';
 
 import WebSocketPlugin from './plugins/WebSocketPlugin';
@@ -40,10 +40,10 @@
   modules: {
     global: GlobalStore,
     authentication: AuthenticationStore,
-    clientSessions: ClientSessions,
+    sessions: SessionsStore,
     dateTime: DateTimeStore,
     ldap: LdapStore,
-    localUsers: LocalUserManagementStore,
+    userManagement: UserManagementStore,
     firmware: FirmwareStore,
     serverBootSettings: BootSettingsStore,
     controls: ControlStore,
@@ -53,8 +53,8 @@
     network: NetworkStore,
     eventLog: EventLogStore,
     sensors: SensorsStore,
-    sslCertificates: SslCertificatesStore,
     serverLed: ServerLedStore,
+    certificates: CertificatesStore,
     system: SystemStore,
     memory: MemoryStore,
     fan: FanStore,
@@ -63,7 +63,7 @@
     processors: ProcessorStore,
     postCodeLogs: PostCodeLogsStore,
     virtualMedia: VirtualMediaStore,
-    securitySettings: SecuritySettingsStore,
+    policies: PoliciesStore,
     factoryReset: FactoryResetStore,
   },
   plugins: [WebSocketPlugin],
diff --git a/src/store/modules/AccessControl/SslCertificatesStore.js b/src/store/modules/SecurityAndAccess/CertificatesStore.js
similarity index 88%
rename from src/store/modules/AccessControl/SslCertificatesStore.js
rename to src/store/modules/SecurityAndAccess/CertificatesStore.js
index 752c212..97241f3 100644
--- a/src/store/modules/AccessControl/SslCertificatesStore.js
+++ b/src/store/modules/SecurityAndAccess/CertificatesStore.js
@@ -5,12 +5,12 @@
   {
     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 @@
     // 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 @@
   return certificate ? certificate[prop] : null;
 };
 
-const SslCertificatesStore = {
+const CertificatesStore = {
   namespaced: true,
   state: {
     allCertificates: [],
@@ -98,15 +98,13 @@
         })
         .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 @@
         )
         .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 @@
         .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 @@
   },
 };
 
-export default SslCertificatesStore;
+export default CertificatesStore;
diff --git a/src/store/modules/AccessControl/LdapStore.js b/src/store/modules/SecurityAndAccess/LdapStore.js
similarity index 100%
rename from src/store/modules/AccessControl/LdapStore.js
rename to src/store/modules/SecurityAndAccess/LdapStore.js
diff --git a/src/store/modules/Settings/SecuritySettingsStore.js b/src/store/modules/SecurityAndAccess/PoliciesStore.js
similarity index 72%
rename from src/store/modules/Settings/SecuritySettingsStore.js
rename to src/store/modules/SecurityAndAccess/PoliciesStore.js
index 5a88542..1e19552 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 @@
         .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 @@
         .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
similarity index 88%
rename from src/store/modules/AccessControl/ClientSessionsStore.js
rename to src/store/modules/SecurityAndAccess/SessionsStore.js
index 4295d57..54607ab 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 @@
       (state.allConnections = allConnections),
   },
   actions: {
-    async getClientSessionsData({ commit }) {
+    async getSessionsData({ commit }) {
       return await api
         .get('/redfish/v1/SessionService/Sessions')
         .then((response) =>
@@ -48,7 +48,7 @@
       return await api
         .all(promises)
         .then((response) => {
-          dispatch('getClientSessionsData');
+          dispatch('getSessionsData');
           return response;
         })
         .then(
@@ -58,7 +58,7 @@
 
             if (successCount) {
               const message = i18n.tc(
-                'pageClientSessions.toast.successDelete',
+                'pageSessions.toast.successDelete',
                 successCount
               );
               toastMessages.push({ type: 'success', message });
@@ -66,7 +66,7 @@
 
             if (errorCount) {
               const message = i18n.tc(
-                'pageClientSessions.toast.errorDelete',
+                'pageSessions.toast.errorDelete',
                 errorCount
               );
               toastMessages.push({ type: 'error', message });
@@ -77,4 +77,4 @@
     },
   },
 };
-export default ClientSessionsStore;
+export default SessionsStore;
diff --git a/src/store/modules/AccessControl/LocalUserMangementStore.js b/src/store/modules/SecurityAndAccess/UserManagementStore.js
similarity index 84%
rename from src/store/modules/AccessControl/LocalUserMangementStore.js
rename to src/store/modules/SecurityAndAccess/UserManagementStore.js
index 6bc6ec5..362f3f6 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 @@
         })
         .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 @@
         .catch((error) => {
           console.log(error);
           const message = i18n.t(
-            'pageLocalUserManagement.toast.errorLoadAccountSettings'
+            'pageUserManagement.toast.errorLoadAccountSettings'
           );
           throw new Error(message);
         });
@@ -110,16 +108,15 @@
         .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 @@
         .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 @@
         .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 @@
 
             if (successCount) {
               const message = i18n.tc(
-                'pageLocalUserManagement.toast.successBatchDelete',
+                'pageUserManagement.toast.successBatchDelete',
                 successCount
               );
               toastMessages.push({ type: 'success', message });
@@ -198,7 +193,7 @@
 
             if (errorCount) {
               const message = i18n.tc(
-                'pageLocalUserManagement.toast.errorBatchDelete',
+                'pageUserManagement.toast.errorBatchDelete',
                 errorCount
               );
               toastMessages.push({ type: 'error', message });
@@ -233,7 +228,7 @@
 
             if (successCount) {
               const message = i18n.tc(
-                'pageLocalUserManagement.toast.successBatchEnable',
+                'pageUserManagement.toast.successBatchEnable',
                 successCount
               );
               toastMessages.push({ type: 'success', message });
@@ -241,7 +236,7 @@
 
             if (errorCount) {
               const message = i18n.tc(
-                'pageLocalUserManagement.toast.errorBatchEnable',
+                'pageUserManagement.toast.errorBatchEnable',
                 errorCount
               );
               toastMessages.push({ type: 'error', message });
@@ -276,7 +271,7 @@
 
             if (successCount) {
               const message = i18n.tc(
-                'pageLocalUserManagement.toast.successBatchDisable',
+                'pageUserManagement.toast.successBatchDisable',
                 successCount
               );
               toastMessages.push({ type: 'success', message });
@@ -284,7 +279,7 @@
 
             if (errorCount) {
               const message = i18n.tc(
-                'pageLocalUserManagement.toast.errorBatchDisable',
+                'pageUserManagement.toast.errorBatchDisable',
                 errorCount
               );
               toastMessages.push({ type: 'error', message });
@@ -310,16 +305,14 @@
         .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;