From 286b7d1cde65672d56b6a3f969dee054a9f81858 Mon Sep 17 00:00:00 2001 From: Nikhil Ashoka Date: Mon, 21 Jul 2025 12:40:45 +0530 Subject: [PATCH 1/7] Updated env based configuration - Updated env based config in Vue3 Signed-off-by: Nikhil Ashoka --- src/env/router/ibm.js | 83 +++++----- src/router/routes.js | 371 +++++++++++++++++------------------------- vite.config.js | 2 +- 3 files changed, 192 insertions(+), 264 deletions(-) diff --git a/src/env/router/ibm.js b/src/env/router/ibm.js index e3b25f8480..840cec4eed 100644 --- a/src/env/router/ibm.js +++ b/src/env/router/ibm.js @@ -1,4 +1,3 @@ -// TODO: Work Requird --> import AppLayout from '@/layouts/AppLayout.vue'; import AuditLogs from '@/views/Logs/AuditLogs'; import ChangePassword from '@/views/ChangePassword'; @@ -58,7 +57,7 @@ const routes = [ name: 'login', component: Login, meta: { - title: i18n.t('appPageTitle.login'), + title: i18n.global.t('appPageTitle.login'), }, }, { @@ -66,7 +65,7 @@ const routes = [ name: 'change-password', component: ChangePassword, meta: { - title: i18n.t('appPageTitle.changePassword'), + title: i18n.global.t('appPageTitle.changePassword'), requiresAuth: true, }, }, @@ -84,7 +83,7 @@ const routes = [ name: 'service-login-consoles', component: ServiceLoginConsoles, meta: { - title: i18n.t('appPageTitle.serviceLogin'), + title: i18n.global.t('appPageTitle.serviceLogin'), }, }, { @@ -92,7 +91,7 @@ const routes = [ name: 'host-console-console', component: HostConsoleConsole, meta: { - title: i18n.t('appPageTitle.hostConsole'), + title: i18n.global.t('appPageTitle.hostConsole'), }, }, { @@ -100,7 +99,7 @@ const routes = [ name: 'post-codes', component: PostCodes, meta: { - title: i18n.t('appPageTitle.postCodes'), + title: i18n.global.t('appPageTitle.postCodes'), }, }, ], @@ -117,7 +116,7 @@ const routes = [ name: 'overview', component: Overview, meta: { - title: i18n.t('appPageTitle.overview'), + title: i18n.global.t('appPageTitle.overview'), }, }, { @@ -125,7 +124,7 @@ const routes = [ name: 'notices', component: Notices, meta: { - title: i18n.t('appPageTitle.notices'), + title: i18n.global.t('appPageTitle.notices'), }, }, { @@ -133,7 +132,7 @@ const routes = [ name: 'profile-settings', component: ProfileSettings, meta: { - title: i18n.t('appPageTitle.profileSettings'), + title: i18n.global.t('appPageTitle.profileSettings'), }, }, { @@ -141,7 +140,7 @@ const routes = [ name: 'deconfiguration-records', component: DeconfigurationRecords, meta: { - title: i18n.t('appPageTitle.deconfigurationRecords'), + title: i18n.global.t('appPageTitle.deconfigurationRecords'), }, }, { @@ -149,7 +148,7 @@ const routes = [ name: 'dumps', component: Dumps, meta: { - title: i18n.t('appPageTitle.dumps'), + title: i18n.global.t('appPageTitle.dumps'), }, }, { @@ -157,7 +156,7 @@ const routes = [ name: 'ibmiServiceFunctions', component: IBMiServiceFunctions, meta: { - title: i18n.t('appPageTitle.ibmiServiceFunctions'), + title: i18n.global.t('appPageTitle.ibmiServiceFunctions'), }, }, { @@ -165,7 +164,7 @@ const routes = [ name: 'event-logs', component: EventLogs, meta: { - title: i18n.t('appPageTitle.eventLogs'), + title: i18n.global.t('appPageTitle.eventLogs'), }, }, { @@ -173,7 +172,7 @@ const routes = [ name: 'audit-logs', component: AuditLogs, meta: { - title: i18n.t('appPageTitle.auditLogs'), + title: i18n.global.t('appPageTitle.auditLogs'), }, }, { @@ -181,7 +180,7 @@ const routes = [ name: 'post-code-logs', component: PostCodeLogs, meta: { - title: i18n.t('appPageTitle.postCodeLogs'), + title: i18n.global.t('appPageTitle.postCodeLogs'), }, }, { @@ -189,7 +188,7 @@ const routes = [ name: 'inventory', component: Inventory, meta: { - title: i18n.t('appPageTitle.inventory'), + title: i18n.global.t('appPageTitle.inventory'), }, }, { @@ -197,7 +196,7 @@ const routes = [ name: 'sensors', component: Sensors, meta: { - title: i18n.t('appPageTitle.sensors'), + title: i18n.global.t('appPageTitle.sensors'), }, }, { @@ -205,7 +204,7 @@ const routes = [ name: 'pcie-topology', component: PcieTopology, meta: { - title: i18n.t('appPageTitle.pcieTopology'), + title: i18n.global.t('appPageTitle.pcieTopology'), }, }, { @@ -213,7 +212,7 @@ const routes = [ name: 'concurrent-maintenance', component: ConcurrentMaintenance, meta: { - title: i18n.t('appPageTitle.concurrentMaintenance'), + title: i18n.global.t('appPageTitle.concurrentMaintenance'), }, }, { @@ -221,7 +220,7 @@ const routes = [ name: 'sessions', component: Sessions, meta: { - title: i18n.t('appPageTitle.sessions'), + title: i18n.global.t('appPageTitle.sessions'), }, }, { @@ -229,7 +228,7 @@ const routes = [ name: 'ldap', component: Ldap, meta: { - title: i18n.t('appPageTitle.ldap'), + title: i18n.global.t('appPageTitle.ldap'), }, }, { @@ -237,7 +236,7 @@ const routes = [ name: 'user-management', component: UserManagement, meta: { - title: i18n.t('appPageTitle.userManagement'), + title: i18n.global.t('appPageTitle.userManagement'), }, }, { @@ -245,7 +244,7 @@ const routes = [ name: 'policies', component: Policies, meta: { - title: i18n.t('appPageTitle.policies'), + title: i18n.global.t('appPageTitle.policies'), }, }, { @@ -253,7 +252,7 @@ const routes = [ name: 'certificates', component: Certificates, meta: { - title: i18n.t('appPageTitle.certificates'), + title: i18n.global.t('appPageTitle.certificates'), }, }, { @@ -261,7 +260,7 @@ const routes = [ name: 'date-time', component: DateTime, meta: { - title: i18n.t('appPageTitle.dateTime'), + title: i18n.global.t('appPageTitle.dateTime'), }, }, { @@ -269,7 +268,7 @@ const routes = [ name: 'firmware', component: Firmware, meta: { - title: i18n.t('appPageTitle.firmware'), + title: i18n.global.t('appPageTitle.firmware'), }, }, { @@ -277,7 +276,7 @@ const routes = [ name: 'hardware-deconfiguration', component: HardwareDeconfiguration, meta: { - title: i18n.t('appPageTitle.deconfigurationHardware'), + title: i18n.global.t('appPageTitle.deconfigurationHardware'), }, }, { @@ -285,7 +284,7 @@ const routes = [ name: 'network', component: Network, meta: { - title: i18n.t('appPageTitle.network'), + title: i18n.global.t('appPageTitle.network'), }, }, { @@ -293,7 +292,7 @@ const routes = [ name: 'power-restore-policy', component: PowerRestorePolicy, meta: { - title: i18n.t('appPageTitle.powerRestorePolicy'), + title: i18n.global.t('appPageTitle.powerRestorePolicy'), }, }, { @@ -301,7 +300,7 @@ const routes = [ name: 'snmp-alerts', component: SnmpAlerts, meta: { - title: i18n.t('appPageTitle.snmpAlerts'), + title: i18n.global.t('appPageTitle.snmpAlerts'), }, }, { @@ -309,7 +308,7 @@ const routes = [ name: 'system-parameters', component: SystemParameters, meta: { - title: i18n.t('appPageTitle.systemParameters'), + title: i18n.global.t('appPageTitle.systemParameters'), }, }, { @@ -317,7 +316,7 @@ const routes = [ name: 'memory', component: Memory, meta: { - title: i18n.t('appPageTitle.memory'), + title: i18n.global.t('appPageTitle.memory'), }, }, { @@ -325,7 +324,7 @@ const routes = [ name: 'power', component: Power, meta: { - title: i18n.t('appPageTitle.power'), + title: i18n.global.t('appPageTitle.power'), }, }, { @@ -333,7 +332,7 @@ const routes = [ name: 'capacity-on-demand', component: CapacityOnDemand, meta: { - title: i18n.t('appPageTitle.capacityOnDemand'), + title: i18n.global.t('appPageTitle.capacityOnDemand'), }, }, { @@ -341,7 +340,7 @@ const routes = [ name: 'field-core-override', component: FieldCoreOverride, meta: { - title: i18n.t('appPageTitle.fieldCoreOverride'), + title: i18n.global.t('appPageTitle.fieldCoreOverride'), }, }, { @@ -349,7 +348,7 @@ const routes = [ name: 'factory-reset', component: FactoryReset, meta: { - title: i18n.t('appPageTitle.factoryReset'), + title: i18n.global.t('appPageTitle.factoryReset'), }, }, { @@ -357,7 +356,7 @@ const routes = [ name: 'key-clear', component: KeyClear, meta: { - title: i18n.t('appPageTitle.keyClear'), + title: i18n.global.t('appPageTitle.keyClear'), }, }, { @@ -365,7 +364,7 @@ const routes = [ name: 'reboot-bmc', component: RebootBmc, meta: { - title: i18n.t('appPageTitle.rebootBmc'), + title: i18n.global.t('appPageTitle.rebootBmc'), }, }, { @@ -373,7 +372,7 @@ const routes = [ name: 'service-login', component: ServiceLogin, meta: { - title: i18n.t('appPageTitle.serviceLogin'), + title: i18n.global.t('appPageTitle.serviceLogin'), }, }, { @@ -381,7 +380,7 @@ const routes = [ name: 'host-console', component: HostConsole, meta: { - title: i18n.t('appPageTitle.hostConsole'), + title: i18n.global.t('appPageTitle.hostConsole'), }, }, { @@ -389,7 +388,7 @@ const routes = [ name: 'server-power-operations', component: ServerPowerOperations, meta: { - title: i18n.t('appPageTitle.serverPowerOperations'), + title: i18n.global.t('appPageTitle.serverPowerOperations'), }, }, { @@ -397,7 +396,7 @@ const routes = [ name: 'page-not-found', component: PageNotFound, meta: { - title: i18n.t('appPageTitle.pageNotFound'), + title: i18n.global.t('appPageTitle.pageNotFound'), }, }, ], diff --git a/src/router/routes.js b/src/router/routes.js index ba87d69742..4029c6bc37 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -1,75 +1,63 @@ -//TODO: Work Requird --> - -import i18n from '@/i18n'; -import LoginLayout from '@/layouts/LoginLayout.vue'; -import LoginPage from '@/views/Login/Login.vue'; import AppLayout from '@/layouts/AppLayout.vue'; -import Overview from '@/views/Overview/Overview.vue'; -import VirtualMedia from '@/views/Operations/VirtualMedia/VirtualMedia.vue'; +import AuditLogs from '@/views/Logs/AuditLogs'; +import ChangePassword from '@/views/ChangePassword'; +import ConsoleLayout from '@/layouts/ConsoleLayout.vue'; +import ConcurrentMaintenance from '@/views/HardwareStatus/ConcurrentMaintenance'; +import DateTime from '@/views/Settings/DateTime'; +import EventLogs from '@/views/Logs/EventLogs'; +import FactoryReset from '@/views/Operations/FactoryReset'; +import Firmware from '@/views/Operations/Firmware'; +import Inventory from '@/views/HardwareStatus/Inventory'; import Kvm from '@/views/Operations/Kvm'; +import KvmConsole from '@/views/Operations/Kvm/KvmConsole'; +import Sessions from '../views/SecurityAndAccess/Sessions'; +import Ldap from '@/views/SecurityAndAccess/Ldap'; +import UserManagement from '@/views/SecurityAndAccess/UserManagement'; +import Login from '@/views/Login'; +import LoginLayout from '@/layouts/LoginLayout'; +import HardwareDeconfiguration from '@/views/Settings/HardwareDeconfiguration'; +import Network from '@/views/Settings/Network'; +import Overview from '@/views/Overview'; +import PageNotFound from '@/views/PageNotFound'; +import PostCodes from '@/views/Logs/PostCodeLogs/PostCodes'; +import PostCodeLogs from '@/views/Logs/PostCodeLogs'; +import PowerRestorePolicy from '@/views/Settings/PowerRestorePolicy'; +import ProfileSettings from '@/views/ProfileSettings'; +import RebootBmc from '@/views/Operations/RebootBmc'; import Policies from '@/views/SecurityAndAccess/Policies'; +import KeyClear from '@/views/Operations/KeyClear'; +import PcieTopology from '@/views/HardwareStatus/PcieTopology'; import Sensors from '@/views/HardwareStatus/Sensors'; -import AuditLogs from '@/views/Logs/AuditLogs'; -import PageNotFound from '@/views/PageNotFound/PageNotFound.vue'; -import KeyClear from '@/views/Operations/KeyClear/KeyClear.vue'; -import RebootBmc from '@/views/Operations/RebootBmc'; -import FactoryReset from '@/views/Operations/FactoryReset'; +import HostConsole from '@/views/Operations/HostConsole'; +import HostConsoleConsole from '@/views/Operations/HostConsole/HostConsoleConsole'; +import ServerPowerOperations from '@/views/Operations/ServerPowerOperations'; +import Certificates from '@/views/SecurityAndAccess/Certificates'; +import VirtualMedia from '@/views/Operations/VirtualMedia'; import Memory from '@/views/ResourceManagement/Memory'; -import PostCodes from '@/views/Logs/PostCodeLogs/PostCodes.vue'; -import PostCodeLogs from '@/views/Logs/PostCodeLogs/PostCodeLogs.vue'; import Power from '@/views/ResourceManagement/Power'; -import PowerRestorePolicy from '@/views/Settings/PowerRestorePolicy'; -import ConcurrentMaintenance from '../views/HardwareStatus/ConcurrentMaintenance/ConcurrentMaintenance.vue'; -import PcieTopology from '../views/HardwareStatus/PcieTopology/PcieTopology.vue'; -import IBMiServiceFunctions from '@/views/Logs/IBMiServiceFunctions'; -import Notices from '@/views/Notices/Notices.vue'; -import Sessions from '@/views/SecurityAndAccess/Sessions'; -import UserManagement from '@/views/SecurityAndAccess/UserManagement'; -import Firmware from '@/views/Operations/Firmware'; -import Certificates from '@/views/SecurityAndAccess/Certificates'; -import Inventory from '../views/HardwareStatus/Inventory/Inventory.vue'; import SystemParameters from '@/views/ResourceManagement/SystemParameters'; -import HardwareDeconfiguration from '../views/Settings/HardwareDeconfiguration/HardwareDeconfiguration.vue'; -import HostConsole from '@/views/Operations/HostConsole'; -import HostConsoleConsole from '@/views/Operations/HostConsole/HostConsoleConsole.vue'; -import CapacityOnDemand from '../views/ResourceManagement/CapacityOnDemand/CapacityOnDemand.vue'; -import DeconfigurationRecords from '../views/Logs/DeconfigurationRecords/DeconfigurationRecords.vue'; -import ServerPowerOperations from '@/views/Operations/ServerPowerOperations'; -import Ldap from '../views/SecurityAndAccess/Ldap/Ldap.vue'; -import EventLogs from '@/views/Logs/EventLogs'; -import FieldCoreOverride from '@/views/ResourceManagement/FieldCoreOverride'; -import ServiceLoginConsoles from '@/views/Operations/ServiceLoginConsoles/ServiceLoginConsoles.vue'; -import ServiceLogin from '@/views/Operations/ServiceLoginConsoles'; -import ProfileSettings from '@/views/ProfileSettings'; -import Network from '@/views/Settings/Network'; -import Dumps from '@/views/Logs/Dumps'; -import DateTime from '@/views/Settings/DateTime/DateTime.vue'; -import ChangePassword from '@/views/ChangePassword'; import SnmpAlerts from '@/views/Settings/SnmpAlerts'; -import ConsoleLayout from '@/layouts/ConsoleLayout.vue'; +import i18n from '@/i18n'; -const roles = { - administrator: 'Administrator', - operator: 'Operator', - readonly: 'ReadOnly', - noaccess: 'NoAccess', -}; -export const routes = [ +const routes = [ { path: '/login', component: LoginLayout, children: [ { path: '', - name: 'LoginPage', - component: LoginPage, + name: 'login', + component: Login, + meta: { + title: i18n.t('appPageTitle.login'), + }, }, { path: '/change-password', name: 'change-password', component: ChangePassword, meta: { - title: i18n.global.t('appPageTitle.changePassword'), + title: i18n.t('appPageTitle.changePassword'), requiresAuth: true, }, }, @@ -82,20 +70,12 @@ export const routes = [ requiresAuth: true, }, children: [ - { - path: 'service-login-consoles', - name: 'service-login-consoles', - component: ServiceLoginConsoles, - meta: { - title: i18n.global.t('appPageTitle.serviceLogin'), - }, - }, { path: 'host-console-console', - name: 'host-console-console', + name: 'host-console', component: HostConsoleConsole, meta: { - title: i18n.global.t('appPageTitle.hostConsole'), + title: i18n.t('appPageTitle.hostConsole'), }, }, { @@ -103,7 +83,15 @@ export const routes = [ name: 'post-codes', component: PostCodes, meta: { - title: i18n.global.t('appPageTitle.postCodes'), + title: i18n.t('appPageTitle.postCodes'), + }, + }, + { + path: 'kvm', + name: 'kvm-console', + component: KvmConsole, + meta: { + title: i18n.t('appPageTitle.kvm'), }, }, ], @@ -120,7 +108,7 @@ export const routes = [ name: 'overview', component: Overview, meta: { - title: i18n.global.t('appPageTitle.overview'), + title: i18n.t('appPageTitle.overview'), }, }, { @@ -128,64 +116,31 @@ export const routes = [ name: 'profile-settings', component: ProfileSettings, meta: { - title: i18n.global.t('appPageTitle.profileSettings'), - }, - }, - { - path: '/operations/virtual-media', - name: 'virtual-media', - component: VirtualMedia, - meta: { - title: i18n.global.t('appPageTitle.virtualMedia'), - exclusiveToRoles: [roles.administrator], - }, - }, - { - path: '/operations/server-power-operations', - name: 'server-power-operations', - component: ServerPowerOperations, - meta: { - title: i18n.global.t('appPageTitle.serverPowerOperations'), - }, - }, - { - path: '/operations/service-login', - name: 'service-login', - component: ServiceLogin, - meta: { - title: i18n.global.t('appPageTitle.serviceLogin'), - }, - }, - { - path: '/hardware-status/sensors', - name: 'sensors', - component: Sensors, - meta: { - title: i18n.global.t('appPageTitle.sensors'), + title: i18n.t('appPageTitle.profileSettings'), }, }, { - path: '/hardware-status/concurrent-maintenance', - name: 'concurrent-maintenance', - component: ConcurrentMaintenance, + path: '/logs/event-logs', + name: 'event-logs', + component: EventLogs, meta: { - title: i18n.global.t('appPageTitle.concurrentMaintenance'), + title: i18n.t('appPageTitle.eventLogs'), }, }, { - path: '/hardware-status/inventory', - name: 'inventory', - component: Inventory, + path: '/logs/audit-logs', + name: 'audit-logs', + component: AuditLogs, meta: { - title: i18n.global.t('appPageTitle.inventory'), + title: i18n.t('appPageTitle.auditLogs'), }, }, { - path: '/hardware-status/pcie-topology', - name: 'pcie-topology', - component: PcieTopology, + path: '/logs/post-code-logs', + name: 'post-code-logs', + component: PostCodeLogs, meta: { - title: i18n.global.t('appPageTitle.pcieTopology'), + title: i18n.t('appPageTitle.postCodeLogs'), }, }, { @@ -193,55 +148,55 @@ export const routes = [ name: 'inventory', component: Inventory, meta: { - title: i18n.global.t('appPageTitle.inventory'), + title: i18n.t('appPageTitle.inventory'), }, }, { - path: '/logs/ibmi-service-functions', - name: 'ibmiServiceFunctions', - component: IBMiServiceFunctions, + path: '/hardware-status/sensors', + name: 'sensors', + component: Sensors, meta: { - title: i18n.global.t('appPageTitle.ibmiServiceFunctions'), + title: i18n.t('appPageTitle.sensors'), }, }, { - path: '/logs/event-logs', - name: 'event-logs', - component: EventLogs, + path: '/hardware-status/pcie-topology', + name: 'pcie-topology', + component: PcieTopology, meta: { - title: i18n.global.t('appPageTitle.eventLogs'), + title: i18n.t('appPageTitle.pcieTopology'), }, }, { - path: '/logs/audit-logs', - name: 'audit-logs', - component: AuditLogs, + path: '/hardware-status/concurrent-maintenance', + name: 'concurrent-maintenance', + component: ConcurrentMaintenance, meta: { - title: i18n.global.t('appPageTitle.auditLogs'), + title: i18n.t('appPageTitle.concurrentMaintenance'), }, }, { - path: '/logs/dumps', - name: 'dumps', - component: Dumps, + path: '/security-and-access/sessions', + name: 'sessions', + component: Sessions, meta: { - title: i18n.global.t('appPageTitle.dumps'), + title: i18n.t('appPageTitle.sessions'), }, }, { - path: '/logs/post-code-logs', - name: 'post-code-logs', - component: PostCodeLogs, + path: '/security-and-access/ldap', + name: 'ldap', + component: Ldap, meta: { - title: i18n.global.t('appPageTitle.postCodeLogs'), + title: i18n.t('appPageTitle.ldap'), }, }, { - path: '/operations/kvm', - name: 'kvm', - component: Kvm, + path: '/security-and-access/user-management', + name: 'local-users', + component: UserManagement, meta: { - title: i18n.global.t('appPageTitle.kvm'), + title: i18n.t('appPageTitle.userManagement'), }, }, { @@ -249,73 +204,63 @@ export const routes = [ name: 'policies', component: Policies, meta: { - title: i18n.global.t('appPageTitle.policies'), + title: i18n.t('appPageTitle.policies'), }, }, - { path: '/operations/key-clear', name: 'key-clear', component: KeyClear }, { - path: '/operations/reboot-bmc', - name: 'reboot-bmc', - component: RebootBmc, - meta: { - title: i18n.global.t('appPageTitle.rebootBmc'), - }, - }, - - { - path: '/operations/factory-reset', - name: 'factory-reset', - component: FactoryReset, + path: '/security-and-access/certificates', + name: 'certificates', + component: Certificates, meta: { - title: i18n.global.t('appPageTitle.factoryReset'), + title: i18n.t('appPageTitle.certificates'), }, }, { - path: '/operations/firmware', - name: 'firmware', - component: Firmware, + path: '/settings/date-time', + name: 'date-time', + component: DateTime, meta: { - title: i18n.global.t('appPageTitle.firmware'), + title: i18n.t('appPageTitle.dateTime'), }, }, { - path: '/operations/host-console', - name: 'host-console', - component: HostConsole, + path: '/settings/snmp-alerts', + name: 'snmp-alerts', + component: SnmpAlerts, meta: { - title: i18n.global.t('appPageTitle.hostConsole'), + title: i18n.t('appPageTitle.snmpAlerts'), }, }, { - path: '/logs/deconfiguration-records', - name: 'deconfiguration-records', - component: DeconfigurationRecords, + path: '/operations/factory-reset', + name: 'factory-reset', + component: FactoryReset, meta: { - title: i18n.global.t('appPageTitle.deconfigurationRecords'), + title: i18n.t('appPageTitle.factoryReset'), }, }, { - path: '/settings/power-restore-policy', - name: 'power-restore-policy', - component: PowerRestorePolicy, + path: '/operations/key-clear', + name: 'key-clear', + component: KeyClear, meta: { - title: i18n.global.t('appPageTitle.powerRestorePolicy'), + title: i18n.t('appPageTitle.keyClear'), }, }, { - path: '/settings/snmp-alerts', - name: 'snmp-alerts', - component: SnmpAlerts, + path: '/operations/kvm', + name: 'kvm', + component: Kvm, meta: { - title: i18n.global.t('appPageTitle.snmpAlerts'), + title: i18n.t('appPageTitle.kvm'), }, }, { - path: '/settings/date-time', - name: 'date-time', - component: DateTime, + path: '/operations/firmware', + name: 'firmware', + component: Firmware, meta: { - title: i18n.global.t('appPageTitle.dateTime'), + title: i18n.t('appPageTitle.firmware'), }, }, { @@ -323,7 +268,7 @@ export const routes = [ name: 'hardware-deconfiguration', component: HardwareDeconfiguration, meta: { - title: i18n.global.t('appPageTitle.deconfigurationHardware'), + title: i18n.t('appPageTitle.deconfigurationHardware'), }, }, { @@ -331,15 +276,15 @@ export const routes = [ name: 'network', component: Network, meta: { - title: i18n.global.t('appPageTitle.network'), + title: i18n.t('appPageTitle.network'), }, }, { - path: '/resource-management/power', - name: 'power', - component: Power, + path: '/settings/power-restore-policy', + name: 'power-restore-policy', + component: PowerRestorePolicy, meta: { - title: i18n.global.t('appPageTitle.power'), + title: i18n.t('appPageTitle.powerRestorePolicy'), }, }, { @@ -347,23 +292,7 @@ export const routes = [ name: 'system-parameters', component: SystemParameters, meta: { - title: i18n.global.t('appPageTitle.systemParameters'), - }, - }, - { - path: '/resource-management/capacity-on-demand', - name: 'capacity-on-demand', - component: CapacityOnDemand, - meta: { - title: i18n.global.t('appPageTitle.capacityOnDemand'), - }, - }, - { - path: '/resource-management/field-core-override', - name: 'field-core-override', - component: FieldCoreOverride, - meta: { - title: i18n.global.t('appPageTitle.fieldCoreOverride'), + title: i18n.t('appPageTitle.systemParameters'), }, }, { @@ -371,55 +300,55 @@ export const routes = [ name: 'memory', component: Memory, meta: { - title: i18n.global.t('appPageTitle.memory'), + title: i18n.t('appPageTitle.memory'), }, }, { - path: '/security-and-access/sessions', - name: 'sessions', - component: Sessions, + path: '/resource-management/power', + name: 'power', + component: Power, meta: { - title: i18n.global.t('appPageTitle.sessions'), + title: i18n.t('appPageTitle.power'), }, }, { - path: '/security-and-access/user-management', - name: 'local-users', - component: UserManagement, + path: '/operations/reboot-bmc', + name: 'reboot-bmc', + component: RebootBmc, meta: { - title: i18n.global.t('appPageTitle.userManagement'), + title: i18n.t('appPageTitle.rebootBmc'), }, }, { - path: '/security-and-access/certificates', - name: 'certificates', - component: Certificates, + path: '/operations/host-console', + name: 'host-console', + component: HostConsole, meta: { - title: i18n.global.t('appPageTitle.certificates'), + title: i18n.t('appPageTitle.hostConsole'), }, }, { - path: '/:pathMatch(.*)*', - name: 'page-not-found', - component: PageNotFound, + path: '/operations/server-power-operations', + name: 'server-power-operations', + component: ServerPowerOperations, meta: { - title: i18n.global.t('appPageTitle.pageNotFound'), + title: i18n.t('appPageTitle.serverPowerOperations'), }, }, { - path: '/security-and-access/ldap', - name: 'ldap', - component: Ldap, + path: '/operations/virtual-media', + name: 'virtual-media', + component: VirtualMedia, meta: { - title: i18n.global.t('appPageTitle.ldap'), + title: i18n.t('appPageTitle.virtualMedia'), }, }, { - path: '/notices', - name: 'notices', - component: Notices, + path: '*', + name: 'page-not-found', + component: PageNotFound, meta: { - title: i18n.global.t('appPageTitle.notices'), + title: i18n.t('appPageTitle.pageNotFound'), }, }, ], diff --git a/vite.config.js b/vite.config.js index 14384b298d..45cee2abd3 100644 --- a/vite.config.js +++ b/vite.config.js @@ -79,7 +79,7 @@ export default defineConfig({ }, // { find: /^\.\/store$/, replacement: path.resolve(__dirname, `src/env/store/${VITE_APP_ENV_NAME}.js`) }, // { find: /^\.\.\/store$/, replacement: path.resolve(__dirname, `src/env/store/${VITE_APP_ENV_NAME}.js`) }, - // { find: /^\.\/routes$/, replacement: path.resolve(__dirname, `src/env/router/${VITE_APP_ENV_NAME}.js`) }, + { find: /^\.\/routes$/, replacement: path.resolve(__dirname, `src/env/router/${VITE_APP_ENV_NAME}.js`) }, // { find: /^\.\/AppNavigationData$/, replacement: path.resolve(__dirname, `src/env/components/AppNavigation/${VITE_APP_ENV_NAME}.js`) }, ], }, From f77a6ac0d756a07f53393ff991be16bdc46b72ec Mon Sep 17 00:00:00 2001 From: Nikhil Ashoka Date: Mon, 21 Jul 2025 14:33:40 +0530 Subject: [PATCH 2/7] Updated routes.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Updated routes.js to match 1060’s routes.js --- src/router/routes.js | 115 ++++++++++++++++++++++--------------------- 1 file changed, 58 insertions(+), 57 deletions(-) diff --git a/src/router/routes.js b/src/router/routes.js index 4029c6bc37..716acab388 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -2,52 +2,52 @@ import AppLayout from '@/layouts/AppLayout.vue'; import AuditLogs from '@/views/Logs/AuditLogs'; import ChangePassword from '@/views/ChangePassword'; import ConsoleLayout from '@/layouts/ConsoleLayout.vue'; -import ConcurrentMaintenance from '@/views/HardwareStatus/ConcurrentMaintenance'; -import DateTime from '@/views/Settings/DateTime'; +import ConcurrentMaintenance from '../views/HardwareStatus/ConcurrentMaintenance/ConcurrentMaintenance.vue'; +import DateTime from '@/views/Settings/DateTime/DateTime.vue'; import EventLogs from '@/views/Logs/EventLogs'; import FactoryReset from '@/views/Operations/FactoryReset'; import Firmware from '@/views/Operations/Firmware'; -import Inventory from '@/views/HardwareStatus/Inventory'; +import Inventory from '../views/HardwareStatus/Inventory/Inventory.vue'; import Kvm from '@/views/Operations/Kvm'; import KvmConsole from '@/views/Operations/Kvm/KvmConsole'; -import Sessions from '../views/SecurityAndAccess/Sessions'; -import Ldap from '@/views/SecurityAndAccess/Ldap'; +import Sessions from '@/views/SecurityAndAccess/Sessions'; +import Ldap from '../views/SecurityAndAccess/Ldap/Ldap.vue'; import UserManagement from '@/views/SecurityAndAccess/UserManagement'; -import Login from '@/views/Login'; -import LoginLayout from '@/layouts/LoginLayout'; -import HardwareDeconfiguration from '@/views/Settings/HardwareDeconfiguration'; +import LoginPage from '@/views/Login/Login.vue'; +import LoginLayout from '@/layouts/LoginLayout.vue'; +import HardwareDeconfiguration from '../views/Settings/HardwareDeconfiguration/HardwareDeconfiguration.vue'; import Network from '@/views/Settings/Network'; -import Overview from '@/views/Overview'; -import PageNotFound from '@/views/PageNotFound'; -import PostCodes from '@/views/Logs/PostCodeLogs/PostCodes'; -import PostCodeLogs from '@/views/Logs/PostCodeLogs'; +import Overview from '@/views/Overview/Overview.vue'; +import PageNotFound from '@/views/PageNotFound/PageNotFound.vue'; +import PostCodes from '@/views/Logs/PostCodeLogs/PostCodes.vue'; +import PostCodeLogs from '@/views/Logs/PostCodeLogs/PostCodeLogs.vue'; import PowerRestorePolicy from '@/views/Settings/PowerRestorePolicy'; import ProfileSettings from '@/views/ProfileSettings'; import RebootBmc from '@/views/Operations/RebootBmc'; import Policies from '@/views/SecurityAndAccess/Policies'; -import KeyClear from '@/views/Operations/KeyClear'; -import PcieTopology from '@/views/HardwareStatus/PcieTopology'; +import KeyClear from '@/views/Operations/KeyClear/KeyClear.vue'; +import PcieTopology from '../views/HardwareStatus/PcieTopology/PcieTopology.vue'; import Sensors from '@/views/HardwareStatus/Sensors'; import HostConsole from '@/views/Operations/HostConsole'; -import HostConsoleConsole from '@/views/Operations/HostConsole/HostConsoleConsole'; +import HostConsoleConsole from '@/views/Operations/HostConsole/HostConsoleConsole.vue'; import ServerPowerOperations from '@/views/Operations/ServerPowerOperations'; import Certificates from '@/views/SecurityAndAccess/Certificates'; -import VirtualMedia from '@/views/Operations/VirtualMedia'; +import VirtualMedia from '@/views/Operations/VirtualMedia/VirtualMedia.vue'; import Memory from '@/views/ResourceManagement/Memory'; import Power from '@/views/ResourceManagement/Power'; import SystemParameters from '@/views/ResourceManagement/SystemParameters'; import SnmpAlerts from '@/views/Settings/SnmpAlerts'; import i18n from '@/i18n'; -const routes = [ +export const routes = [ { path: '/login', component: LoginLayout, children: [ { path: '', - name: 'login', - component: Login, + name: 'LoginPage', + component: LoginPage, meta: { title: i18n.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, }, }, @@ -72,10 +72,10 @@ const routes = [ children: [ { path: 'host-console-console', - name: 'host-console', + name: 'host-console-console', component: HostConsoleConsole, meta: { - title: i18n.t('appPageTitle.hostConsole'), + title: i18n.global.t('appPageTitle.hostConsole'), }, }, { @@ -83,15 +83,15 @@ const routes = [ name: 'post-codes', component: PostCodes, meta: { - title: i18n.t('appPageTitle.postCodes'), + title: i18n.global.t('appPageTitle.postCodes'), }, }, - { + { path: 'kvm', name: 'kvm-console', component: KvmConsole, meta: { - title: i18n.t('appPageTitle.kvm'), + title: i18n.global.t('appPageTitle.kvm'), }, }, ], @@ -108,7 +108,7 @@ const routes = [ name: 'overview', component: Overview, meta: { - title: i18n.t('appPageTitle.overview'), + title: i18n.global.t('appPageTitle.overview'), }, }, { @@ -116,7 +116,7 @@ const routes = [ name: 'profile-settings', component: ProfileSettings, meta: { - title: i18n.t('appPageTitle.profileSettings'), + title: i18n.global.t('appPageTitle.profileSettings'), }, }, { @@ -124,7 +124,7 @@ const routes = [ name: 'event-logs', component: EventLogs, meta: { - title: i18n.t('appPageTitle.eventLogs'), + title: i18n.global.t('appPageTitle.eventLogs'), }, }, { @@ -132,7 +132,7 @@ const routes = [ name: 'audit-logs', component: AuditLogs, meta: { - title: i18n.t('appPageTitle.auditLogs'), + title: i18n.global.t('appPageTitle.auditLogs'), }, }, { @@ -140,7 +140,7 @@ const routes = [ name: 'post-code-logs', component: PostCodeLogs, meta: { - title: i18n.t('appPageTitle.postCodeLogs'), + title: i18n.global.t('appPageTitle.postCodeLogs'), }, }, { @@ -148,7 +148,7 @@ const routes = [ name: 'inventory', component: Inventory, meta: { - title: i18n.t('appPageTitle.inventory'), + title: i18n.global.t('appPageTitle.inventory'), }, }, { @@ -156,7 +156,7 @@ const routes = [ name: 'sensors', component: Sensors, meta: { - title: i18n.t('appPageTitle.sensors'), + title: i18n.global.t('appPageTitle.sensors'), }, }, { @@ -164,7 +164,7 @@ const routes = [ name: 'pcie-topology', component: PcieTopology, meta: { - title: i18n.t('appPageTitle.pcieTopology'), + title: i18n.global.t('appPageTitle.pcieTopology'), }, }, { @@ -172,7 +172,7 @@ const routes = [ name: 'concurrent-maintenance', component: ConcurrentMaintenance, meta: { - title: i18n.t('appPageTitle.concurrentMaintenance'), + title: i18n.global.t('appPageTitle.concurrentMaintenance'), }, }, { @@ -180,7 +180,7 @@ const routes = [ name: 'sessions', component: Sessions, meta: { - title: i18n.t('appPageTitle.sessions'), + title: i18n.global.t('appPageTitle.sessions'), }, }, { @@ -188,7 +188,7 @@ const routes = [ name: 'ldap', component: Ldap, meta: { - title: i18n.t('appPageTitle.ldap'), + title: i18n.global.t('appPageTitle.ldap'), }, }, { @@ -196,7 +196,7 @@ const routes = [ name: 'local-users', component: UserManagement, meta: { - title: i18n.t('appPageTitle.userManagement'), + title: i18n.global.t('appPageTitle.userManagement'), }, }, { @@ -204,7 +204,7 @@ const routes = [ name: 'policies', component: Policies, meta: { - title: i18n.t('appPageTitle.policies'), + title: i18n.global.t('appPageTitle.policies'), }, }, { @@ -212,7 +212,7 @@ const routes = [ name: 'certificates', component: Certificates, meta: { - title: i18n.t('appPageTitle.certificates'), + title: i18n.global.t('appPageTitle.certificates'), }, }, { @@ -220,7 +220,7 @@ const routes = [ name: 'date-time', component: DateTime, meta: { - title: i18n.t('appPageTitle.dateTime'), + title: i18n.global.t('appPageTitle.dateTime'), }, }, { @@ -228,7 +228,7 @@ const routes = [ name: 'snmp-alerts', component: SnmpAlerts, meta: { - title: i18n.t('appPageTitle.snmpAlerts'), + title: i18n.global.t('appPageTitle.snmpAlerts'), }, }, { @@ -236,15 +236,15 @@ const routes = [ name: 'factory-reset', component: FactoryReset, meta: { - title: i18n.t('appPageTitle.factoryReset'), + title: i18n.global.t('appPageTitle.factoryReset'), }, }, - { + { path: '/operations/key-clear', name: 'key-clear', component: KeyClear, meta: { - title: i18n.t('appPageTitle.keyClear'), + title: i18n.global.t('appPageTitle.keyClear'), }, }, { @@ -252,7 +252,7 @@ const routes = [ name: 'kvm', component: Kvm, meta: { - title: i18n.t('appPageTitle.kvm'), + title: i18n.global.t('appPageTitle.kvm'), }, }, { @@ -260,7 +260,7 @@ const routes = [ name: 'firmware', component: Firmware, meta: { - title: i18n.t('appPageTitle.firmware'), + title: i18n.global.t('appPageTitle.firmware'), }, }, { @@ -268,7 +268,7 @@ const routes = [ name: 'hardware-deconfiguration', component: HardwareDeconfiguration, meta: { - title: i18n.t('appPageTitle.deconfigurationHardware'), + title: i18n.global.t('appPageTitle.deconfigurationHardware'), }, }, { @@ -276,7 +276,7 @@ const routes = [ name: 'network', component: Network, meta: { - title: i18n.t('appPageTitle.network'), + title: i18n.global.t('appPageTitle.network'), }, }, { @@ -284,7 +284,7 @@ const routes = [ name: 'power-restore-policy', component: PowerRestorePolicy, meta: { - title: i18n.t('appPageTitle.powerRestorePolicy'), + title: i18n.global.t('appPageTitle.powerRestorePolicy'), }, }, { @@ -292,7 +292,7 @@ const routes = [ name: 'system-parameters', component: SystemParameters, meta: { - title: i18n.t('appPageTitle.systemParameters'), + title: i18n.global.t('appPageTitle.systemParameters'), }, }, { @@ -300,7 +300,7 @@ const routes = [ name: 'memory', component: Memory, meta: { - title: i18n.t('appPageTitle.memory'), + title: i18n.global.t('appPageTitle.memory'), }, }, { @@ -308,7 +308,7 @@ const routes = [ name: 'power', component: Power, meta: { - title: i18n.t('appPageTitle.power'), + title: i18n.global.t('appPageTitle.power'), }, }, { @@ -316,7 +316,7 @@ const routes = [ name: 'reboot-bmc', component: RebootBmc, meta: { - title: i18n.t('appPageTitle.rebootBmc'), + title: i18n.global.t('appPageTitle.rebootBmc'), }, }, { @@ -324,7 +324,7 @@ const routes = [ name: 'host-console', component: HostConsole, meta: { - title: i18n.t('appPageTitle.hostConsole'), + title: i18n.global.t('appPageTitle.hostConsole'), }, }, { @@ -332,7 +332,7 @@ const routes = [ name: 'server-power-operations', component: ServerPowerOperations, meta: { - title: i18n.t('appPageTitle.serverPowerOperations'), + title: i18n.global.t('appPageTitle.serverPowerOperations'), }, }, { @@ -340,15 +340,16 @@ const routes = [ name: 'virtual-media', component: VirtualMedia, meta: { - title: i18n.t('appPageTitle.virtualMedia'), + title: i18n.global.t('appPageTitle.virtualMedia'), }, }, { + // path: '/:pathMatch(.*)*', path: '*', name: 'page-not-found', component: PageNotFound, meta: { - title: i18n.t('appPageTitle.pageNotFound'), + title: i18n.global.t('appPageTitle.pageNotFound'), }, }, ], From 172b57e08566056d84f0cec47142bbd084852935 Mon Sep 17 00:00:00 2001 From: Nikhil Ashoka Date: Mon, 21 Jul 2025 17:07:27 +0530 Subject: [PATCH 3/7] Implemented AppNavigation - Implemented AppNavigation -> AppNavigationData and ibm.js --- .../AppNavigation/AppNavigation.vue | 79 +- .../AppNavigation/AppNavigationData.js | 615 +++----- src/env/components/AppNavigation/ibm.js | 1234 ++++------------- vite.config.js | 2 +- 4 files changed, 486 insertions(+), 1444 deletions(-) diff --git a/src/components/AppNavigation/AppNavigation.vue b/src/components/AppNavigation/AppNavigation.vue index cc8f85a4cd..b22f12da64 100644 --- a/src/components/AppNavigation/AppNavigation.vue +++ b/src/components/AppNavigation/AppNavigation.vue @@ -1,6 +1,7 @@ -