1import AppLayout from '@/layouts/AppLayout.vue'; 2import ChangePassword from '@/views/ChangePassword'; 3import ConsoleLayout from '@/layouts/ConsoleLayout.vue'; 4import DateTime from '@/views/Settings/DateTime'; 5import EventLogs from '@/views/Logs/EventLogs'; 6import FactoryReset from '@/views/Operations/FactoryReset'; 7import Firmware from '@/views/Operations/Firmware'; 8import Inventory from '@/views/HardwareStatus/Inventory'; 9import Kvm from '@/views/Operations/Kvm'; 10import KvmConsole from '@/views/Operations/Kvm/KvmConsole'; 11import Sessions from '../views/SecurityAndAccess/Sessions'; 12import Ldap from '@/views/SecurityAndAccess/Ldap'; 13import UserManagement from '@/views/SecurityAndAccess/UserManagement'; 14import Login from '@/views/Login'; 15import LoginLayout from '@/layouts/LoginLayout'; 16import Network from '@/views/Settings/Network'; 17import Overview from '@/views/Overview'; 18import PageNotFound from '@/views/PageNotFound'; 19import PostCodeLogs from '@/views/Logs/PostCodeLogs'; 20import PowerRestorePolicy from '@/views/Settings/PowerRestorePolicy'; 21import ProfileSettings from '@/views/ProfileSettings'; 22import RebootBmc from '@/views/Operations/RebootBmc'; 23import Policies from '@/views/SecurityAndAccess/Policies'; 24import KeyClear from '@/views/Operations/KeyClear'; 25import Sensors from '@/views/HardwareStatus/Sensors'; 26import SerialOverLan from '@/views/Operations/SerialOverLan'; 27import SerialOverLanConsole from '@/views/Operations/SerialOverLan/SerialOverLanConsole'; 28import ServerPowerOperations from '@/views/Operations/ServerPowerOperations'; 29import Certificates from '@/views/SecurityAndAccess/Certificates'; 30import VirtualMedia from '@/views/Operations/VirtualMedia'; 31import Power from '@/views/ResourceManagement/Power'; 32import i18n from '@/i18n'; 33 34const routes = [ 35 { 36 path: '/login', 37 component: LoginLayout, 38 children: [ 39 { 40 path: '', 41 name: 'login', 42 component: Login, 43 meta: { 44 title: i18n.t('appPageTitle.login'), 45 }, 46 }, 47 { 48 path: '/change-password', 49 name: 'change-password', 50 component: ChangePassword, 51 meta: { 52 title: i18n.t('appPageTitle.changePassword'), 53 requiresAuth: true, 54 }, 55 }, 56 ], 57 }, 58 { 59 path: '/console', 60 component: ConsoleLayout, 61 meta: { 62 requiresAuth: true, 63 }, 64 children: [ 65 { 66 path: 'serial-over-lan-console', 67 name: 'serial-over-lan-console', 68 component: SerialOverLanConsole, 69 meta: { 70 title: i18n.t('appPageTitle.serialOverLan'), 71 }, 72 }, 73 { 74 path: 'kvm', 75 name: 'kvm-console', 76 component: KvmConsole, 77 meta: { 78 title: i18n.t('appPageTitle.kvm'), 79 }, 80 }, 81 ], 82 }, 83 { 84 path: '/', 85 meta: { 86 requiresAuth: true, 87 }, 88 component: AppLayout, 89 children: [ 90 { 91 path: '', 92 name: 'overview', 93 component: Overview, 94 meta: { 95 title: i18n.t('appPageTitle.overview'), 96 }, 97 }, 98 { 99 path: '/profile-settings', 100 name: 'profile-settings', 101 component: ProfileSettings, 102 meta: { 103 title: i18n.t('appPageTitle.profileSettings'), 104 }, 105 }, 106 { 107 path: '/logs/event-logs', 108 name: 'event-logs', 109 component: EventLogs, 110 meta: { 111 title: i18n.t('appPageTitle.eventLogs'), 112 }, 113 }, 114 { 115 path: '/logs/post-code-logs', 116 name: 'post-code-logs', 117 component: PostCodeLogs, 118 meta: { 119 title: i18n.t('appPageTitle.postCodeLogs'), 120 }, 121 }, 122 { 123 path: '/hardware-status/inventory', 124 name: 'inventory', 125 component: Inventory, 126 meta: { 127 title: i18n.t('appPageTitle.inventory'), 128 }, 129 }, 130 { 131 path: '/hardware-status/sensors', 132 name: 'sensors', 133 component: Sensors, 134 meta: { 135 title: i18n.t('appPageTitle.sensors'), 136 }, 137 }, 138 { 139 path: '/security-and-access/sessions', 140 name: 'sessions', 141 component: Sessions, 142 meta: { 143 title: i18n.t('appPageTitle.sessions'), 144 }, 145 }, 146 { 147 path: '/security-and-access/ldap', 148 name: 'ldap', 149 component: Ldap, 150 meta: { 151 title: i18n.t('appPageTitle.ldap'), 152 }, 153 }, 154 { 155 path: '/security-and-access/user-management', 156 name: 'local-users', 157 component: UserManagement, 158 meta: { 159 title: i18n.t('appPageTitle.userManagement'), 160 }, 161 }, 162 { 163 path: '/security-and-access/policies', 164 name: 'policies', 165 component: Policies, 166 meta: { 167 title: i18n.t('appPageTitle.policies'), 168 }, 169 }, 170 { 171 path: '/security-and-access/certificates', 172 name: 'certificates', 173 component: Certificates, 174 meta: { 175 title: i18n.t('appPageTitle.certificates'), 176 }, 177 }, 178 { 179 path: '/settings/date-time', 180 name: 'date-time', 181 component: DateTime, 182 meta: { 183 title: i18n.t('appPageTitle.dateTime'), 184 }, 185 }, 186 { 187 path: '/operations/factory-reset', 188 name: 'factory-reset', 189 component: FactoryReset, 190 meta: { 191 title: i18n.t('appPageTitle.factoryReset'), 192 }, 193 }, 194 { 195 path: '/operations/key-clear', 196 name: 'key-clear', 197 component: KeyClear, 198 meta: { 199 title: i18n.t('appPageTitle.keyClear'), 200 }, 201 }, 202 { 203 path: '/operations/kvm', 204 name: 'kvm', 205 component: Kvm, 206 meta: { 207 title: i18n.t('appPageTitle.kvm'), 208 }, 209 }, 210 { 211 path: '/operations/firmware', 212 name: 'firmware', 213 component: Firmware, 214 meta: { 215 title: i18n.t('appPageTitle.firmware'), 216 }, 217 }, 218 { 219 path: '/settings/network', 220 name: 'network', 221 component: Network, 222 meta: { 223 title: i18n.t('appPageTitle.network'), 224 }, 225 }, 226 { 227 path: '/settings/power-restore-policy', 228 name: 'power-restore-policy', 229 component: PowerRestorePolicy, 230 meta: { 231 title: i18n.t('appPageTitle.powerRestorePolicy'), 232 }, 233 }, 234 { 235 path: '/resource-management/power', 236 name: 'power', 237 component: Power, 238 meta: { 239 title: i18n.t('appPageTitle.power'), 240 }, 241 }, 242 { 243 path: '/operations/reboot-bmc', 244 name: 'reboot-bmc', 245 component: RebootBmc, 246 meta: { 247 title: i18n.t('appPageTitle.rebootBmc'), 248 }, 249 }, 250 { 251 path: '/operations/serial-over-lan', 252 name: 'serial-over-lan', 253 component: SerialOverLan, 254 meta: { 255 title: i18n.t('appPageTitle.serialOverLan'), 256 }, 257 }, 258 { 259 path: '/operations/server-power-operations', 260 name: 'server-power-operations', 261 component: ServerPowerOperations, 262 meta: { 263 title: i18n.t('appPageTitle.serverPowerOperations'), 264 }, 265 }, 266 { 267 path: '/operations/virtual-media', 268 name: 'virtual-media', 269 component: VirtualMedia, 270 meta: { 271 title: i18n.t('appPageTitle.virtualMedia'), 272 }, 273 }, 274 { 275 path: '*', 276 name: 'page-not-found', 277 component: PageNotFound, 278 meta: { 279 title: i18n.t('appPageTitle.pageNotFound'), 280 }, 281 }, 282 ], 283 }, 284]; 285 286export default routes; 287