1import AppLayout from '@/layouts/AppLayout.vue'; 2import ChangePassword from '@/views/ChangePassword'; 3import ConsoleLayout from '@/layouts/ConsoleLayout.vue'; 4import DateTimeSettings from '@/views/Configuration/DateTimeSettings'; 5import EventLogs from '@/views/Health/EventLogs'; 6import FactoryReset from '@/views/Control/FactoryReset'; 7import Firmware from '@/views/Configuration/Firmware'; 8import HardwareStatus from '@/views/Health/HardwareStatus'; 9import Kvm from '@/views/Control/Kvm'; 10import KvmConsole from '@/views/Control/Kvm/KvmConsole'; 11import ClientSessions from '../views/AccessControl/ClientSessions'; 12import Ldap from '@/views/AccessControl/Ldap'; 13import LocalUserManagement from '@/views/AccessControl/LocalUserManagement'; 14import Login from '@/views/Login'; 15import LoginLayout from '@/layouts/LoginLayout'; 16import ManagePowerUsage from '@/views/Control/ManagePowerUsage'; 17import NetworkSettings from '@/views/Configuration/NetworkSettings'; 18import Overview from '@/views/Overview'; 19import PageNotFound from '@/views/PageNotFound'; 20import PostCodeLogs from '@/views/Health/PostCodeLogs'; 21import PowerRestorePolicy from '@/views/Control/PowerRestorePolicy'; 22import ProfileSettings from '@/views/ProfileSettings'; 23import RebootBmc from '@/views/Control/RebootBmc'; 24import SecuritySettings from '@/views/Configuration/SecuritySettings'; 25import Sensors from '@/views/Health/Sensors'; 26import SerialOverLan from '@/views/Control/SerialOverLan'; 27import SerialOverLanConsole from '@/views/Control/SerialOverLan/SerialOverLanConsole'; 28import ServerLed from '@/views/Control/ServerLed'; 29import ServerPowerOperations from '@/views/Control/ServerPowerOperations'; 30import SslCertificates from '@/views/AccessControl/SslCertificates'; 31import VirtualMedia from '@/views/Control/VirtualMedia'; 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: '/health/event-logs', 108 name: 'event-logs', 109 component: EventLogs, 110 meta: { 111 title: i18n.t('appPageTitle.eventLogs'), 112 }, 113 }, 114 { 115 path: '/health/hardware-status', 116 name: 'hardware-status', 117 component: HardwareStatus, 118 meta: { 119 title: i18n.t('appPageTitle.hardwareStatus'), 120 }, 121 }, 122 { 123 path: '/health/post-code-logs', 124 name: 'post-code-logs', 125 component: PostCodeLogs, 126 meta: { 127 title: i18n.t('appPageTitle.postCodeLogs'), 128 }, 129 }, 130 { 131 path: '/health/sensors', 132 name: 'sensors', 133 component: Sensors, 134 meta: { 135 title: i18n.t('appPageTitle.sensors'), 136 }, 137 }, 138 { 139 path: '/access-control/client-sessions', 140 name: 'client-sessions', 141 component: ClientSessions, 142 meta: { 143 title: i18n.t('appPageTitle.clientSessions'), 144 }, 145 }, 146 { 147 path: '/access-control/ldap', 148 name: 'ldap', 149 component: Ldap, 150 meta: { 151 title: i18n.t('appPageTitle.ldap'), 152 }, 153 }, 154 { 155 path: '/access-control/local-user-management', 156 name: 'local-users', 157 component: LocalUserManagement, 158 meta: { 159 title: i18n.t('appPageTitle.localUserManagement'), 160 }, 161 }, 162 { 163 path: '/access-control/ssl-certificates', 164 name: 'ssl-certificates', 165 component: SslCertificates, 166 meta: { 167 title: i18n.t('appPageTitle.sslCertificates'), 168 }, 169 }, 170 { 171 path: '/configuration/date-time-settings', 172 name: 'date-time-settings', 173 component: DateTimeSettings, 174 meta: { 175 title: i18n.t('appPageTitle.dateTimeSettings'), 176 }, 177 }, 178 { 179 path: '/configuration/firmware', 180 name: 'firmware', 181 component: Firmware, 182 meta: { 183 title: i18n.t('appPageTitle.firmware'), 184 }, 185 }, 186 { 187 path: '/configuration/security-settings', 188 name: 'security-settings', 189 component: SecuritySettings, 190 meta: { 191 title: i18n.t('appPageTitle.securitySettings'), 192 }, 193 }, 194 { 195 path: '/control/factory-reset', 196 name: 'factory-reset', 197 component: FactoryReset, 198 meta: { 199 title: i18n.t('appPageTitle.factoryReset'), 200 }, 201 }, 202 { 203 path: '/control/kvm', 204 name: 'kvm', 205 component: Kvm, 206 meta: { 207 title: i18n.t('appPageTitle.kvm'), 208 }, 209 }, 210 { 211 path: '/control/manage-power-usage', 212 name: 'manage-power-usage', 213 component: ManagePowerUsage, 214 meta: { 215 title: i18n.t('appPageTitle.managePowerUsage'), 216 }, 217 }, 218 { 219 path: '/control/power-restore-policy', 220 name: 'power-restore-policy', 221 component: PowerRestorePolicy, 222 meta: { 223 title: i18n.t('appPageTitle.powerRestorePolicy'), 224 }, 225 }, 226 { 227 path: '/configuration/network-settings', 228 name: 'network-settings', 229 component: NetworkSettings, 230 meta: { 231 title: i18n.t('appPageTitle.networkSettings'), 232 }, 233 }, 234 { 235 path: '/control/reboot-bmc', 236 name: 'reboot-bmc', 237 component: RebootBmc, 238 meta: { 239 title: i18n.t('appPageTitle.rebootBmc'), 240 }, 241 }, 242 { 243 path: '/control/server-led', 244 name: 'server-led', 245 component: ServerLed, 246 meta: { 247 title: i18n.t('appPageTitle.serverLed'), 248 }, 249 }, 250 { 251 path: '/control/serial-over-lan', 252 name: 'serial-over-lan', 253 component: SerialOverLan, 254 meta: { 255 title: i18n.t('appPageTitle.serialOverLan'), 256 }, 257 }, 258 { 259 path: '/control/server-power-operations', 260 name: 'server-power-operations', 261 component: ServerPowerOperations, 262 meta: { 263 title: i18n.t('appPageTitle.serverPowerOperations'), 264 }, 265 }, 266 { 267 path: '/control/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