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