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