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