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