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 HardwareStatus from '@/views/Health/HardwareStatus'; 7import Ldap from '@/views/AccessControl/Ldap'; 8import LocalUserManagement from '@/views/AccessControl/LocalUserManagement'; 9import Login from '@/views/Login'; 10import LoginLayout from '@/layouts/LoginLayout'; 11import ManagePowerUsage from '@/views/Control/ManagePowerUsage'; 12import NetworkSettings from '@/views/Configuration/NetworkSettings'; 13import Overview from '@/views/Overview'; 14import PageNotFound from '@/views/PageNotFound'; 15import ProfileSettings from '@/views/ProfileSettings'; 16import RebootBmc from '@/views/Control/RebootBmc'; 17import Sensors from '@/views/Health/Sensors'; 18import SerialOverLan from '@/views/Control/SerialOverLan'; 19import SerialOverLanConsole from '@/views/Control/SerialOverLan/SerialOverLanConsole'; 20import ServerLed from '@/views/Control/ServerLed'; 21import ServerPowerOperations from '@/views/Control/ServerPowerOperations'; 22import SslCertificates from '@/views/AccessControl/SslCertificates'; 23import i18n from '@/i18n'; 24 25// Custom components 26import FirmwareSingleImage from '../components/FirmwareSingleImage'; 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 }, 69 { 70 path: '/', 71 meta: { 72 requiresAuth: true 73 }, 74 component: AppLayout, 75 children: [ 76 { 77 path: '', 78 name: 'overview', 79 component: Overview, 80 meta: { 81 title: i18n.t('appPageTitle.overview') 82 } 83 }, 84 { 85 path: '/profile-settings', 86 name: 'profile-settings', 87 component: ProfileSettings, 88 meta: { 89 title: i18n.t('appPageTitle.profileSettings') 90 } 91 }, 92 { 93 path: '/health/event-logs', 94 name: 'event-logs', 95 component: EventLogs, 96 meta: { 97 title: i18n.t('appPageTitle.eventLogs') 98 } 99 }, 100 { 101 path: '/health/hardware-status', 102 name: 'hardware-status', 103 component: HardwareStatus, 104 meta: { 105 title: i18n.t('appPageTitle.hardwareStatus') 106 } 107 }, 108 { 109 path: '/health/sensors', 110 name: 'sensors', 111 component: Sensors, 112 meta: { 113 title: i18n.t('appPageTitle.sensors') 114 } 115 }, 116 { 117 path: '/access-control/ldap', 118 name: 'ldap', 119 component: Ldap, 120 meta: { 121 title: i18n.t('appPageTitle.ldap') 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: FirmwareSingleImage, 152 meta: { 153 title: i18n.t('appPageTitle.firmware') 154 } 155 }, 156 { 157 path: '/control/manage-power-usage', 158 name: 'manage-power-usage', 159 component: ManagePowerUsage, 160 meta: { 161 title: i18n.t('appPageTitle.managePowerUsage') 162 } 163 }, 164 { 165 path: '/configuration/network-settings', 166 name: 'network-settings', 167 component: NetworkSettings, 168 meta: { 169 title: i18n.t('appPageTitle.networkSettings') 170 } 171 }, 172 { 173 path: '/control/reboot-bmc', 174 name: 'reboot-bmc', 175 component: RebootBmc, 176 meta: { 177 title: i18n.t('appPageTitle.rebootBmc') 178 } 179 }, 180 { 181 path: '/control/server-led', 182 name: 'server-led', 183 component: ServerLed, 184 meta: { 185 title: i18n.t('appPageTitle.serverLed') 186 } 187 }, 188 { 189 path: '/control/serial-over-lan', 190 name: 'serial-over-lan', 191 component: SerialOverLan, 192 meta: { 193 title: i18n.t('appPageTitle.serialOverLan') 194 } 195 }, 196 { 197 path: '/control/server-power-operations', 198 name: 'server-power-operations', 199 component: ServerPowerOperations, 200 meta: { 201 title: i18n.t('appPageTitle.serverPowerOperations') 202 } 203 }, 204 { 205 path: '*', 206 name: 'page-not-found', 207 component: PageNotFound, 208 meta: { 209 title: i18n.t('appPageTitle.pageNotFound') 210 } 211 } 212 ] 213 } 214]; 215 216export default routes; 217