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