diff options
author | Ed Tanous <ed@tanous.net> | 2024-03-24 00:56:34 +0300 |
---|---|---|
committer | Surya Venkatesan <suryav@ami.com> | 2024-07-18 09:00:10 +0300 |
commit | dbd37e04f9591094623fe723d8403e542199b989 (patch) | |
tree | 5239c6d6ad0d1919406766383f5198e9901a2144 /src/router/routes.js | |
parent | 9c7297932c0cc9e5ef7eb25268a8c8eed7c3757d (diff) | |
download | webui-vue-dbd37e04f9591094623fe723d8403e542199b989.tar.xz |
i18n, vue-router and vuex upgrade
1. Configuration of i18n legacy as false.
2. Translation function t is called using the useI18n.
3. Used the i18n.global.t() function from i18n instead of this.$t()
4. Event bus error that occurred during logout.
5. Implemented vue-router 4.4.0 and vuex upgrade to 4.1.0
Change-Id: I9464d82c76dcc1445ce271983ea3ab9d7b03d265
Signed-off-by: Surya Venkatesan <suryav@ami.com>
Diffstat (limited to 'src/router/routes.js')
-rw-r--r-- | src/router/routes.js | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/src/router/routes.js b/src/router/routes.js index 8b3ff178..d9e799a3 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -30,7 +30,7 @@ import Certificates from '@/views/SecurityAndAccess/Certificates'; import VirtualMedia from '@/views/Operations/VirtualMedia'; import Power from '@/views/ResourceManagement/Power'; import SnmpAlerts from '@/views/Settings/SnmpAlerts'; -//import { i18n } from '@/i18n'; +import i18n from '@/i18n'; const roles = { administrator: 'Administrator', @@ -49,7 +49,7 @@ const routes = [ name: 'login', component: Login, meta: { - //title: i18n.$t('appPageTitle.login'), + title: i18n.global.t('appPageTitle.login'), }, }, { @@ -57,7 +57,7 @@ const routes = [ name: 'change-password', component: ChangePassword, meta: { - //title: i18n.$t('appPageTitle.changePassword'), + title: i18n.global.t('appPageTitle.changePassword'), requiresAuth: true, }, }, @@ -75,7 +75,7 @@ const routes = [ name: 'serial-over-lan-console', component: SerialOverLanConsole, meta: { - //title: i18n.t('appPageTitle.serialOverLan'), + title: i18n.global.t('appPageTitle.serialOverLan'), }, }, { @@ -83,7 +83,7 @@ const routes = [ name: 'kvm-console', component: KvmConsole, meta: { - //title: i18n.t('appPageTitle.kvm'), + title: i18n.global.t('appPageTitle.kvm'), }, }, ], @@ -100,7 +100,7 @@ const routes = [ name: 'overview', component: Overview, meta: { - //title: i18n.t('appPageTitle.overview'), + title: i18n.global.t('appPageTitle.overview'), }, }, { @@ -108,7 +108,7 @@ const routes = [ name: 'profile-settings', component: ProfileSettings, meta: { - //title: i18n.t('appPageTitle.profileSettings'), + title: i18n.global.t('appPageTitle.profileSettings'), }, }, { @@ -116,7 +116,7 @@ const routes = [ name: 'event-logs', component: EventLogs, meta: { - //title: i18n.t('appPageTitle.eventLogs'), + title: i18n.global.t('appPageTitle.eventLogs'), }, }, { @@ -124,7 +124,7 @@ const routes = [ name: 'post-code-logs', component: PostCodeLogs, meta: { - //title: i18n.t('appPageTitle.postCodeLogs'), + title: i18n.global.t('appPageTitle.postCodeLogs'), }, }, { @@ -132,7 +132,7 @@ const routes = [ name: 'inventory', component: Inventory, meta: { - //title: i18n.t('appPageTitle.inventory'), + title: i18n.global.t('appPageTitle.inventory'), }, }, { @@ -140,7 +140,7 @@ const routes = [ name: 'sensors', component: Sensors, meta: { - //title: i18n.t('appPageTitle.sensors'), + title: i18n.global.t('appPageTitle.sensors'), }, }, { @@ -148,7 +148,7 @@ const routes = [ name: 'sessions', component: Sessions, meta: { - //title: i18n.t('appPageTitle.sessions'), + title: i18n.global.t('appPageTitle.sessions'), }, }, { @@ -156,7 +156,7 @@ const routes = [ name: 'ldap', component: Ldap, meta: { - //title: i18n.t('appPageTitle.ldap'), + title: i18n.global.t('appPageTitle.ldap'), }, }, { @@ -164,7 +164,7 @@ const routes = [ name: 'user-management', component: UserManagement, meta: { - //title: i18n.t('appPageTitle.userManagement'), + title: i18n.global.t('appPageTitle.userManagement'), }, }, { @@ -172,7 +172,7 @@ const routes = [ name: 'policies', component: Policies, meta: { - //title: i18n.t('appPageTitle.policies'), + title: i18n.global.t('appPageTitle.policies'), }, }, { @@ -180,7 +180,7 @@ const routes = [ name: 'certificates', component: Certificates, meta: { - //title: i18n.t('appPageTitle.certificates'), + title: i18n.global.t('appPageTitle.certificates'), }, }, { @@ -188,7 +188,7 @@ const routes = [ name: 'date-time', component: DateTime, meta: { - //title: i18n.t('appPageTitle.dateTime'), + title: i18n.global.t('appPageTitle.dateTime'), }, }, { @@ -196,7 +196,7 @@ const routes = [ name: 'snmp-alerts', component: SnmpAlerts, meta: { - //title: i18n.t('appPageTitle.snmpAlerts'), + title: i18n.global.t('appPageTitle.snmpAlerts'), }, }, { @@ -204,7 +204,7 @@ const routes = [ name: 'factory-reset', component: FactoryReset, meta: { - //title: i18n.t('appPageTitle.factoryReset'), + title: i18n.global.t('appPageTitle.factoryReset'), }, }, { @@ -212,7 +212,7 @@ const routes = [ name: 'key-clear', component: KeyClear, meta: { - //title: i18n.t('appPageTitle.keyClear'), + title: i18n.global.t('appPageTitle.keyClear'), }, }, { @@ -220,7 +220,7 @@ const routes = [ name: 'kvm', component: Kvm, meta: { - //title: i18n.t('appPageTitle.kvm'), + title: i18n.global.t('appPageTitle.kvm'), }, }, { @@ -228,7 +228,7 @@ const routes = [ name: 'firmware', component: Firmware, meta: { - //title: i18n.t('appPageTitle.firmware'), + title: i18n.global.t('appPageTitle.firmware'), }, }, { @@ -236,7 +236,7 @@ const routes = [ name: 'network', component: Network, meta: { - //title: i18n.t('appPageTitle.network'), + title: i18n.global.t('appPageTitle.network'), }, }, { @@ -244,7 +244,7 @@ const routes = [ name: 'power-restore-policy', component: PowerRestorePolicy, meta: { - //title: i18n.t('appPageTitle.powerRestorePolicy'), + title: i18n.global.t('appPageTitle.powerRestorePolicy'), }, }, { @@ -252,7 +252,7 @@ const routes = [ name: 'power', component: Power, meta: { - //title: i18n.t('appPageTitle.power'), + title: i18n.global.t('appPageTitle.power'), }, }, { @@ -260,7 +260,7 @@ const routes = [ name: 'reboot-bmc', component: RebootBmc, meta: { - //title: i18n.t('appPageTitle.rebootBmc'), + title: i18n.global.t('appPageTitle.rebootBmc'), }, }, { @@ -268,7 +268,7 @@ const routes = [ name: 'serial-over-lan', component: SerialOverLan, meta: { - //title: i18n.t('appPageTitle.serialOverLan'), + title: i18n.global.t('appPageTitle.serialOverLan'), exclusiveToRoles: [roles.administrator], }, }, @@ -277,7 +277,7 @@ const routes = [ name: 'server-power-operations', component: ServerPowerOperations, meta: { - //title: i18n.t('appPageTitle.serverPowerOperations'), + title: i18n.global.t('appPageTitle.serverPowerOperations'), }, }, { @@ -285,7 +285,7 @@ const routes = [ name: 'virtual-media', component: VirtualMedia, meta: { - //title: i18n.t('appPageTitle.virtualMedia'), + title: i18n.global.t('appPageTitle.virtualMedia'), exclusiveToRoles: [roles.administrator], }, }, @@ -294,7 +294,7 @@ const routes = [ name: 'page-not-found', component: PageNotFound, meta: { - //title: i18n.t('appPageTitle.pageNotFound'), + title: i18n.global.t('appPageTitle.pageNotFound'), }, }, ], |