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 Firmware from '@/views/Configuration/Firmware'; 7import HardwareStatus from '@/views/Health/HardwareStatus'; 8import Kvm from '@/views/Control/Kvm'; 9import KvmConsole from '@/views/Control/Kvm/KvmConsole'; 10import LocalUserManagement from '@/views/AccessControl/LocalUserManagement'; 11import Login from '@/views/Login'; 12import LoginLayout from '@/layouts/LoginLayout'; 13import ManagePowerUsage from '@/views/Control/ManagePowerUsage'; 14import NetworkSettings from '@/views/Configuration/NetworkSettings'; 15import Overview from '@/views/Overview'; 16import PageNotFound from '@/views/PageNotFound'; 17import ProfileSettings from '@/views/ProfileSettings'; 18import RebootBmc from '@/views/Control/RebootBmc'; 19import Sensors from '@/views/Health/Sensors'; 20import SerialOverLan from '@/views/Control/SerialOverLan'; 21import SerialOverLanConsole from '@/views/Control/SerialOverLan/SerialOverLanConsole'; 22import ServerLed from '@/views/Control/ServerLed'; 23import ServerPowerOperations from '@/views/Control/ServerPowerOperations'; 24import SslCertificates from '@/views/AccessControl/SslCertificates'; 25import VirtualMedia from '@/views/Control/VirtualMedia'; 26import i18n from '@/i18n'; 27 28const routes = [ 29 { 30 path: '/login', 31 component: LoginLayout, 32 children: [ 33 { 34 path: '', 35 name: 'login', 36 component: Login, 37 meta: { 38 title: i18n.t('appPageTitle.login'), 39 }, 40 }, 41 { 42 path: '/change-password', 43 name: 'change-password', 44 component: ChangePassword, 45 meta: { 46 title: i18n.t('appPageTitle.changePassword'), 47 requiresAuth: true, 48 }, 49 }, 50 ], 51 }, 52 { 53 path: '/console', 54 component: ConsoleLayout, 55 meta: { 56 requiresAuth: true, 57 }, 58 children: [ 59 { 60 path: 'serial-over-lan-console', 61 name: 'serial-over-lan-console', 62 component: SerialOverLanConsole, 63 meta: { 64 title: i18n.t('appPageTitle.serialOverLan'), 65 }, 66 }, 67 { 68 path: 'kvm', 69 name: 'kvm-console', 70 component: KvmConsole, 71 meta: { 72 title: i18n.t('appPageTitle.kvm'), 73 }, 74 }, 75 ], 76 }, 77 { 78 path: '/', 79 meta: { 80 requiresAuth: true, 81 }, 82 component: AppLayout, 83 children: [ 84 { 85 path: '', 86 name: 'overview', 87 component: Overview, 88 meta: { 89 title: i18n.t('appPageTitle.overview'), 90 }, 91 }, 92 { 93 path: '/profile-settings', 94 name: 'profile-settings', 95 component: ProfileSettings, 96 meta: { 97 title: i18n.t('appPageTitle.profileSettings'), 98 }, 99 }, 100 { 101 path: '/health/event-logs', 102 name: 'event-logs', 103 component: EventLogs, 104 meta: { 105 title: i18n.t('appPageTitle.eventLogs'), 106 }, 107 }, 108 { 109 path: '/health/hardware-status', 110 name: 'hardware-status', 111 component: HardwareStatus, 112 meta: { 113 title: i18n.t('appPageTitle.hardwareStatus'), 114 }, 115 }, 116 { 117 path: '/health/sensors', 118 name: 'sensors', 119 component: Sensors, 120 meta: { 121 title: i18n.t('appPageTitle.sensors'), 122 }, 123 }, 124 { 125 path: '/access-control/local-user-management', 126 name: 'local-users', 127 component: LocalUserManagement, 128 meta: { 129 title: i18n.t('appPageTitle.localUserManagement'), 130 }, 131 }, 132 { 133 path: '/access-control/ssl-certificates', 134 name: 'ssl-certificates', 135 component: SslCertificates, 136 meta: { 137 title: i18n.t('appPageTitle.sslCertificates'), 138 }, 139 }, 140 { 141 path: '/configuration/date-time-settings', 142 name: 'date-time-settings', 143 component: DateTimeSettings, 144 meta: { 145 title: i18n.t('appPageTitle.dateTimeSettings'), 146 }, 147 }, 148 { 149 path: '/configuration/firmware', 150 name: 'firmware', 151 component: Firmware, 152 meta: { 153 title: i18n.t('appPageTitle.firmware'), 154 }, 155 }, 156 { 157 path: '/control/kvm', 158 name: 'kvm', 159 component: Kvm, 160 meta: { 161 title: i18n.t('appPageTitle.kvm'), 162 }, 163 }, 164 { 165 path: '/control/manage-power-usage', 166 name: 'manage-power-usage', 167 component: ManagePowerUsage, 168 meta: { 169 title: i18n.t('appPageTitle.managePowerUsage'), 170 }, 171 }, 172 { 173 path: '/configuration/network-settings', 174 name: 'network-settings', 175 component: NetworkSettings, 176 meta: { 177 title: i18n.t('appPageTitle.networkSettings'), 178 }, 179 }, 180 { 181 path: '/control/reboot-bmc', 182 name: 'reboot-bmc', 183 component: RebootBmc, 184 meta: { 185 title: i18n.t('appPageTitle.rebootBmc'), 186 }, 187 }, 188 { 189 path: '/control/server-led', 190 name: 'server-led', 191 component: ServerLed, 192 meta: { 193 title: i18n.t('appPageTitle.serverLed'), 194 }, 195 }, 196 { 197 path: '/control/serial-over-lan', 198 name: 'serial-over-lan', 199 component: SerialOverLan, 200 meta: { 201 title: i18n.t('appPageTitle.serialOverLan'), 202 }, 203 }, 204 { 205 path: '/control/server-power-operations', 206 name: 'server-power-operations', 207 component: ServerPowerOperations, 208 meta: { 209 title: i18n.t('appPageTitle.serverPowerOperations'), 210 }, 211 }, 212 { 213 path: '/control/virtual-media', 214 name: 'virtual-media', 215 component: VirtualMedia, 216 meta: { 217 title: i18n.t('appPageTitle.virtualMedia'), 218 }, 219 }, 220 { 221 path: '*', 222 name: 'page-not-found', 223 component: PageNotFound, 224 meta: { 225 title: i18n.t('appPageTitle.pageNotFound'), 226 }, 227 }, 228 ], 229 }, 230]; 231 232export default routes; 233