Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 1 | import AppLayout from '@/layouts/AppLayout.vue'; |
| 2 | import ChangePassword from '@/views/ChangePassword'; |
| 3 | import ConsoleLayout from '@/layouts/ConsoleLayout.vue'; |
Sandeepa Singh | f67f769 | 2021-07-19 18:04:18 +0530 | [diff] [blame] | 4 | import DateTime from '@/views/Settings/DateTime'; |
Derick Montague | 828dda9 | 2021-06-28 15:52:22 -0500 | [diff] [blame] | 5 | import EventLogs from '@/views/Logs/EventLogs'; |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 6 | import FactoryReset from '@/views/Operations/FactoryReset'; |
| 7 | import Firmware from '@/views/Operations/Firmware'; |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 8 | import Inventory from '@/views/HardwareStatus/Inventory'; |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 9 | import Kvm from '@/views/Operations/Kvm'; |
| 10 | import KvmConsole from '@/views/Operations/Kvm/KvmConsole'; |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 11 | import Sessions from '../views/SecurityAndAccess/Sessions'; |
| 12 | import Ldap from '@/views/SecurityAndAccess/Ldap'; |
| 13 | import UserManagement from '@/views/SecurityAndAccess/UserManagement'; |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 14 | import Login from '@/views/Login'; |
| 15 | import LoginLayout from '@/layouts/LoginLayout'; |
Sandeepa Singh | f67f769 | 2021-07-19 18:04:18 +0530 | [diff] [blame] | 16 | import Network from '@/views/Settings/Network'; |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 17 | import Overview from '@/views/Overview'; |
| 18 | import PageNotFound from '@/views/PageNotFound'; |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 19 | import PostCodeLogs from '@/views/Logs/PostCodeLogs'; |
Sandeepa Singh | f67f769 | 2021-07-19 18:04:18 +0530 | [diff] [blame] | 20 | import PowerRestorePolicy from '@/views/Settings/PowerRestorePolicy'; |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 21 | import ProfileSettings from '@/views/ProfileSettings'; |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 22 | import RebootBmc from '@/views/Operations/RebootBmc'; |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 23 | import Policies from '@/views/SecurityAndAccess/Policies'; |
Sandeepa Singh | 05887b5 | 2022-01-10 19:19:36 +0530 | [diff] [blame] | 24 | import KeyClear from '@/views/Operations/KeyClear'; |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 25 | import Sensors from '@/views/HardwareStatus/Sensors'; |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 26 | import SerialOverLan from '@/views/Operations/SerialOverLan'; |
| 27 | import SerialOverLanConsole from '@/views/Operations/SerialOverLan/SerialOverLanConsole'; |
| 28 | import ServerPowerOperations from '@/views/Operations/ServerPowerOperations'; |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 29 | import Certificates from '@/views/SecurityAndAccess/Certificates'; |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 30 | import VirtualMedia from '@/views/Operations/VirtualMedia'; |
Sandeepa Singh | 6dba4be | 2021-07-28 15:25:14 +0530 | [diff] [blame] | 31 | import Power from '@/views/ResourceManagement/Power'; |
Yoshie Muranaka | f15cc7a | 2020-09-09 10:08:14 -0700 | [diff] [blame] | 32 | import i18n from '@/i18n'; |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 33 | |
Damian Celico | aeb1981 | 2022-11-24 02:00:53 +0100 | [diff] [blame^] | 34 | const roles = { |
| 35 | administrator: 'Administrator', |
| 36 | operator: 'Operator', |
| 37 | readonly: 'ReadOnly', |
| 38 | noaccess: 'NoAccess', |
| 39 | }; |
| 40 | |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 41 | const routes = [ |
| 42 | { |
| 43 | path: '/login', |
| 44 | component: LoginLayout, |
| 45 | children: [ |
| 46 | { |
| 47 | path: '', |
| 48 | name: 'login', |
| 49 | component: Login, |
| 50 | meta: { |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 51 | title: i18n.t('appPageTitle.login'), |
| 52 | }, |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 53 | }, |
| 54 | { |
| 55 | path: '/change-password', |
| 56 | name: 'change-password', |
| 57 | component: ChangePassword, |
| 58 | meta: { |
Yoshie Muranaka | f15cc7a | 2020-09-09 10:08:14 -0700 | [diff] [blame] | 59 | title: i18n.t('appPageTitle.changePassword'), |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 60 | requiresAuth: true, |
| 61 | }, |
| 62 | }, |
| 63 | ], |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 64 | }, |
| 65 | { |
| 66 | path: '/console', |
| 67 | component: ConsoleLayout, |
| 68 | meta: { |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 69 | requiresAuth: true, |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 70 | }, |
| 71 | children: [ |
| 72 | { |
| 73 | path: 'serial-over-lan-console', |
| 74 | name: 'serial-over-lan-console', |
| 75 | component: SerialOverLanConsole, |
| 76 | meta: { |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 77 | title: i18n.t('appPageTitle.serialOverLan'), |
| 78 | }, |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 79 | }, |
| 80 | { |
| 81 | path: 'kvm', |
| 82 | name: 'kvm-console', |
| 83 | component: KvmConsole, |
| 84 | meta: { |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 85 | title: i18n.t('appPageTitle.kvm'), |
| 86 | }, |
| 87 | }, |
| 88 | ], |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 89 | }, |
| 90 | { |
| 91 | path: '/', |
| 92 | meta: { |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 93 | requiresAuth: true, |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 94 | }, |
| 95 | component: AppLayout, |
| 96 | children: [ |
| 97 | { |
| 98 | path: '', |
| 99 | name: 'overview', |
| 100 | component: Overview, |
| 101 | meta: { |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 102 | title: i18n.t('appPageTitle.overview'), |
| 103 | }, |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 104 | }, |
| 105 | { |
| 106 | path: '/profile-settings', |
| 107 | name: 'profile-settings', |
| 108 | component: ProfileSettings, |
| 109 | meta: { |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 110 | title: i18n.t('appPageTitle.profileSettings'), |
| 111 | }, |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 112 | }, |
| 113 | { |
Derick Montague | 828dda9 | 2021-06-28 15:52:22 -0500 | [diff] [blame] | 114 | path: '/logs/event-logs', |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 115 | name: 'event-logs', |
| 116 | component: EventLogs, |
| 117 | meta: { |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 118 | title: i18n.t('appPageTitle.eventLogs'), |
| 119 | }, |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 120 | }, |
| 121 | { |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 122 | path: '/logs/post-code-logs', |
Derick Montague | 512dfb7 | 2021-07-30 15:57:17 -0500 | [diff] [blame] | 123 | name: 'post-code-logs', |
Sandeepa Singh | 06d5386 | 2021-05-24 13:51:09 +0530 | [diff] [blame] | 124 | component: PostCodeLogs, |
| 125 | meta: { |
| 126 | title: i18n.t('appPageTitle.postCodeLogs'), |
| 127 | }, |
| 128 | }, |
| 129 | { |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 130 | path: '/hardware-status/inventory', |
| 131 | name: 'inventory', |
| 132 | component: Inventory, |
| 133 | meta: { |
| 134 | title: i18n.t('appPageTitle.inventory'), |
| 135 | }, |
| 136 | }, |
| 137 | { |
| 138 | path: '/hardware-status/sensors', |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 139 | name: 'sensors', |
| 140 | component: Sensors, |
| 141 | meta: { |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 142 | title: i18n.t('appPageTitle.sensors'), |
| 143 | }, |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 144 | }, |
| 145 | { |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 146 | path: '/security-and-access/sessions', |
| 147 | name: 'sessions', |
| 148 | component: Sessions, |
Sukanya Pandey | 34efde2 | 2020-12-02 19:04:09 +0530 | [diff] [blame] | 149 | meta: { |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 150 | title: i18n.t('appPageTitle.sessions'), |
Sukanya Pandey | 34efde2 | 2020-12-02 19:04:09 +0530 | [diff] [blame] | 151 | }, |
| 152 | }, |
| 153 | { |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 154 | path: '/security-and-access/ldap', |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 155 | name: 'ldap', |
| 156 | component: Ldap, |
| 157 | meta: { |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 158 | title: i18n.t('appPageTitle.ldap'), |
| 159 | }, |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 160 | }, |
| 161 | { |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 162 | path: '/security-and-access/user-management', |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 163 | name: 'local-users', |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 164 | component: UserManagement, |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 165 | meta: { |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 166 | title: i18n.t('appPageTitle.userManagement'), |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 167 | }, |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 168 | }, |
| 169 | { |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 170 | path: '/security-and-access/policies', |
| 171 | name: 'policies', |
| 172 | component: Policies, |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 173 | meta: { |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 174 | title: i18n.t('appPageTitle.policies'), |
| 175 | }, |
| 176 | }, |
| 177 | { |
| 178 | path: '/security-and-access/certificates', |
| 179 | name: 'certificates', |
| 180 | component: Certificates, |
| 181 | meta: { |
| 182 | title: i18n.t('appPageTitle.certificates'), |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 183 | }, |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 184 | }, |
| 185 | { |
Sandeepa Singh | f67f769 | 2021-07-19 18:04:18 +0530 | [diff] [blame] | 186 | path: '/settings/date-time', |
| 187 | name: 'date-time', |
| 188 | component: DateTime, |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 189 | meta: { |
Sandeepa Singh | f67f769 | 2021-07-19 18:04:18 +0530 | [diff] [blame] | 190 | title: i18n.t('appPageTitle.dateTime'), |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 191 | }, |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 192 | }, |
| 193 | { |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 194 | path: '/operations/factory-reset', |
Derick Montague | da9f0a6 | 2021-02-14 19:21:44 -0600 | [diff] [blame] | 195 | name: 'factory-reset', |
| 196 | component: FactoryReset, |
| 197 | meta: { |
| 198 | title: i18n.t('appPageTitle.factoryReset'), |
| 199 | }, |
| 200 | }, |
| 201 | { |
Sandeepa Singh | 05887b5 | 2022-01-10 19:19:36 +0530 | [diff] [blame] | 202 | path: '/operations/key-clear', |
| 203 | name: 'key-clear', |
| 204 | component: KeyClear, |
| 205 | meta: { |
| 206 | title: i18n.t('appPageTitle.keyClear'), |
| 207 | }, |
| 208 | }, |
| 209 | { |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 210 | path: '/operations/kvm', |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 211 | name: 'kvm', |
| 212 | component: Kvm, |
| 213 | meta: { |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 214 | title: i18n.t('appPageTitle.kvm'), |
| 215 | }, |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 216 | }, |
| 217 | { |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 218 | path: '/operations/firmware', |
| 219 | name: 'firmware', |
| 220 | component: Firmware, |
| 221 | meta: { |
| 222 | title: i18n.t('appPageTitle.firmware'), |
| 223 | }, |
| 224 | }, |
| 225 | { |
Sandeepa Singh | f67f769 | 2021-07-19 18:04:18 +0530 | [diff] [blame] | 226 | path: '/settings/network', |
| 227 | name: 'network', |
| 228 | component: Network, |
| 229 | meta: { |
| 230 | title: i18n.t('appPageTitle.network'), |
| 231 | }, |
| 232 | }, |
| 233 | { |
| 234 | path: '/settings/power-restore-policy', |
Sukanya Pandey | be6858c | 2020-12-16 20:08:01 +0530 | [diff] [blame] | 235 | name: 'power-restore-policy', |
| 236 | component: PowerRestorePolicy, |
| 237 | meta: { |
| 238 | title: i18n.t('appPageTitle.powerRestorePolicy'), |
| 239 | }, |
| 240 | }, |
| 241 | { |
Sandeepa Singh | 6dba4be | 2021-07-28 15:25:14 +0530 | [diff] [blame] | 242 | path: '/resource-management/power', |
| 243 | name: 'power', |
| 244 | component: Power, |
| 245 | meta: { |
| 246 | title: i18n.t('appPageTitle.power'), |
| 247 | }, |
| 248 | }, |
| 249 | { |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 250 | path: '/operations/reboot-bmc', |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 251 | name: 'reboot-bmc', |
| 252 | component: RebootBmc, |
| 253 | meta: { |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 254 | title: i18n.t('appPageTitle.rebootBmc'), |
| 255 | }, |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 256 | }, |
| 257 | { |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 258 | path: '/operations/serial-over-lan', |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 259 | name: 'serial-over-lan', |
| 260 | component: SerialOverLan, |
| 261 | meta: { |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 262 | title: i18n.t('appPageTitle.serialOverLan'), |
Damian Celico | aeb1981 | 2022-11-24 02:00:53 +0100 | [diff] [blame^] | 263 | exclusiveToRoles: [roles.administrator], |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 264 | }, |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 265 | }, |
| 266 | { |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 267 | path: '/operations/server-power-operations', |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 268 | name: 'server-power-operations', |
| 269 | component: ServerPowerOperations, |
| 270 | meta: { |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 271 | title: i18n.t('appPageTitle.serverPowerOperations'), |
| 272 | }, |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 273 | }, |
| 274 | { |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 275 | path: '/operations/virtual-media', |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 276 | name: 'virtual-media', |
| 277 | component: VirtualMedia, |
| 278 | meta: { |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 279 | title: i18n.t('appPageTitle.virtualMedia'), |
Damian Celico | aeb1981 | 2022-11-24 02:00:53 +0100 | [diff] [blame^] | 280 | exclusiveToRoles: [roles.administrator], |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 281 | }, |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 282 | }, |
| 283 | { |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 284 | path: '*', |
| 285 | name: 'page-not-found', |
| 286 | component: PageNotFound, |
| 287 | meta: { |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 288 | title: i18n.t('appPageTitle.pageNotFound'), |
| 289 | }, |
| 290 | }, |
| 291 | ], |
| 292 | }, |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 293 | ]; |
| 294 | |
| 295 | export default routes; |