blob: 5424cab802c92ce7cad130745e11ba884ea76353 [file] [log] [blame]
Yoshie Muranaka816d9472020-09-03 11:19:28 -07001import AppLayout from '@/layouts/AppLayout.vue';
2import ChangePassword from '@/views/ChangePassword';
3import ConsoleLayout from '@/layouts/ConsoleLayout.vue';
Sandeepa Singhf67f7692021-07-19 18:04:18 +05304import DateTime from '@/views/Settings/DateTime';
Derick Montague828dda92021-06-28 15:52:22 -05005import EventLogs from '@/views/Logs/EventLogs';
Sandeepa Singh68cbbe92021-07-14 16:02:22 +05306import FactoryReset from '@/views/Operations/FactoryReset';
7import Firmware from '@/views/Operations/Firmware';
Sandeepa Singh7affc522021-07-06 16:29:10 +05308import Inventory from '@/views/HardwareStatus/Inventory';
Sandeepa Singh68cbbe92021-07-14 16:02:22 +05309import Kvm from '@/views/Operations/Kvm';
10import KvmConsole from '@/views/Operations/Kvm/KvmConsole';
Sandeepa Singhb4406162021-07-26 15:05:39 +053011import Sessions from '../views/SecurityAndAccess/Sessions';
12import Ldap from '@/views/SecurityAndAccess/Ldap';
13import UserManagement from '@/views/SecurityAndAccess/UserManagement';
Yoshie Muranaka816d9472020-09-03 11:19:28 -070014import Login from '@/views/Login';
15import LoginLayout from '@/layouts/LoginLayout';
Sandeepa Singhf67f7692021-07-19 18:04:18 +053016import Network from '@/views/Settings/Network';
Yoshie Muranaka816d9472020-09-03 11:19:28 -070017import Overview from '@/views/Overview';
18import PageNotFound from '@/views/PageNotFound';
Sandeepa Singh7affc522021-07-06 16:29:10 +053019import PostCodeLogs from '@/views/Logs/PostCodeLogs';
Sandeepa Singhf67f7692021-07-19 18:04:18 +053020import PowerRestorePolicy from '@/views/Settings/PowerRestorePolicy';
Yoshie Muranaka816d9472020-09-03 11:19:28 -070021import ProfileSettings from '@/views/ProfileSettings';
Sandeepa Singh68cbbe92021-07-14 16:02:22 +053022import RebootBmc from '@/views/Operations/RebootBmc';
Sandeepa Singhb4406162021-07-26 15:05:39 +053023import Policies from '@/views/SecurityAndAccess/Policies';
Sandeepa Singh05887b52022-01-10 19:19:36 +053024import KeyClear from '@/views/Operations/KeyClear';
Sandeepa Singh7affc522021-07-06 16:29:10 +053025import Sensors from '@/views/HardwareStatus/Sensors';
Sandeepa Singh68cbbe92021-07-14 16:02:22 +053026import SerialOverLan from '@/views/Operations/SerialOverLan';
27import SerialOverLanConsole from '@/views/Operations/SerialOverLan/SerialOverLanConsole';
28import ServerPowerOperations from '@/views/Operations/ServerPowerOperations';
Sandeepa Singhb4406162021-07-26 15:05:39 +053029import Certificates from '@/views/SecurityAndAccess/Certificates';
Sandeepa Singh68cbbe92021-07-14 16:02:22 +053030import VirtualMedia from '@/views/Operations/VirtualMedia';
Sandeepa Singh6dba4be2021-07-28 15:25:14 +053031import Power from '@/views/ResourceManagement/Power';
Konstantin Aladyshev7c1cfe72023-05-16 09:03:25 +000032import SnmpAlerts from '@/views/Settings/SnmpAlerts';
Yoshie Muranakaf15cc7a2020-09-09 10:08:14 -070033import i18n from '@/i18n';
Yoshie Muranaka816d9472020-09-03 11:19:28 -070034
Damian Celicoaeb19812022-11-24 02:00:53 +010035const roles = {
36 administrator: 'Administrator',
37 operator: 'Operator',
38 readonly: 'ReadOnly',
39 noaccess: 'NoAccess',
40};
41
Yoshie Muranaka816d9472020-09-03 11:19:28 -070042const routes = [
43 {
44 path: '/login',
45 component: LoginLayout,
46 children: [
47 {
48 path: '',
49 name: 'login',
50 component: Login,
51 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -050052 title: i18n.t('appPageTitle.login'),
53 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -070054 },
55 {
56 path: '/change-password',
57 name: 'change-password',
58 component: ChangePassword,
59 meta: {
Yoshie Muranakaf15cc7a2020-09-09 10:08:14 -070060 title: i18n.t('appPageTitle.changePassword'),
Derick Montague602e98a2020-10-21 16:20:00 -050061 requiresAuth: true,
62 },
63 },
64 ],
Yoshie Muranaka816d9472020-09-03 11:19:28 -070065 },
66 {
67 path: '/console',
68 component: ConsoleLayout,
69 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -050070 requiresAuth: true,
Yoshie Muranaka816d9472020-09-03 11:19:28 -070071 },
72 children: [
73 {
74 path: 'serial-over-lan-console',
75 name: 'serial-over-lan-console',
76 component: SerialOverLanConsole,
77 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -050078 title: i18n.t('appPageTitle.serialOverLan'),
79 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -070080 },
81 {
82 path: 'kvm',
83 name: 'kvm-console',
84 component: KvmConsole,
85 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -050086 title: i18n.t('appPageTitle.kvm'),
87 },
88 },
89 ],
Yoshie Muranaka816d9472020-09-03 11:19:28 -070090 },
91 {
92 path: '/',
93 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -050094 requiresAuth: true,
Yoshie Muranaka816d9472020-09-03 11:19:28 -070095 },
96 component: AppLayout,
97 children: [
98 {
99 path: '',
100 name: 'overview',
101 component: Overview,
102 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -0500103 title: i18n.t('appPageTitle.overview'),
104 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700105 },
106 {
107 path: '/profile-settings',
108 name: 'profile-settings',
109 component: ProfileSettings,
110 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -0500111 title: i18n.t('appPageTitle.profileSettings'),
112 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700113 },
114 {
Derick Montague828dda92021-06-28 15:52:22 -0500115 path: '/logs/event-logs',
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700116 name: 'event-logs',
117 component: EventLogs,
118 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -0500119 title: i18n.t('appPageTitle.eventLogs'),
120 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700121 },
122 {
Sandeepa Singh7affc522021-07-06 16:29:10 +0530123 path: '/logs/post-code-logs',
Derick Montague512dfb72021-07-30 15:57:17 -0500124 name: 'post-code-logs',
Sandeepa Singh06d53862021-05-24 13:51:09 +0530125 component: PostCodeLogs,
126 meta: {
127 title: i18n.t('appPageTitle.postCodeLogs'),
128 },
129 },
130 {
Sandeepa Singh7affc522021-07-06 16:29:10 +0530131 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 Muranaka816d9472020-09-03 11:19:28 -0700140 name: 'sensors',
141 component: Sensors,
142 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -0500143 title: i18n.t('appPageTitle.sensors'),
144 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700145 },
146 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530147 path: '/security-and-access/sessions',
148 name: 'sessions',
149 component: Sessions,
Sukanya Pandey34efde22020-12-02 19:04:09 +0530150 meta: {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530151 title: i18n.t('appPageTitle.sessions'),
Sukanya Pandey34efde22020-12-02 19:04:09 +0530152 },
153 },
154 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530155 path: '/security-and-access/ldap',
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700156 name: 'ldap',
157 component: Ldap,
158 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -0500159 title: i18n.t('appPageTitle.ldap'),
160 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700161 },
162 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530163 path: '/security-and-access/user-management',
kirankumarb076ad19aa2023-03-21 19:19:02 +0530164 name: 'user-management',
Sandeepa Singhb4406162021-07-26 15:05:39 +0530165 component: UserManagement,
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700166 meta: {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530167 title: i18n.t('appPageTitle.userManagement'),
Derick Montague602e98a2020-10-21 16:20:00 -0500168 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700169 },
170 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530171 path: '/security-and-access/policies',
172 name: 'policies',
173 component: Policies,
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700174 meta: {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530175 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 Montague602e98a2020-10-21 16:20:00 -0500184 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700185 },
186 {
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530187 path: '/settings/date-time',
188 name: 'date-time',
189 component: DateTime,
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700190 meta: {
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530191 title: i18n.t('appPageTitle.dateTime'),
Derick Montague602e98a2020-10-21 16:20:00 -0500192 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700193 },
194 {
Konstantin Aladyshev7c1cfe72023-05-16 09:03:25 +0000195 path: '/settings/snmp-alerts',
196 name: 'snmp-alerts',
197 component: SnmpAlerts,
198 meta: {
199 title: i18n.t('appPageTitle.snmpAlerts'),
200 },
201 },
202 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530203 path: '/operations/factory-reset',
Derick Montagueda9f0a62021-02-14 19:21:44 -0600204 name: 'factory-reset',
205 component: FactoryReset,
206 meta: {
207 title: i18n.t('appPageTitle.factoryReset'),
208 },
209 },
210 {
Sandeepa Singh05887b52022-01-10 19:19:36 +0530211 path: '/operations/key-clear',
212 name: 'key-clear',
213 component: KeyClear,
214 meta: {
215 title: i18n.t('appPageTitle.keyClear'),
216 },
217 },
218 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530219 path: '/operations/kvm',
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700220 name: 'kvm',
221 component: Kvm,
222 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -0500223 title: i18n.t('appPageTitle.kvm'),
224 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700225 },
226 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530227 path: '/operations/firmware',
228 name: 'firmware',
229 component: Firmware,
230 meta: {
231 title: i18n.t('appPageTitle.firmware'),
232 },
233 },
234 {
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530235 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 Pandeybe6858c2020-12-16 20:08:01 +0530244 name: 'power-restore-policy',
245 component: PowerRestorePolicy,
246 meta: {
247 title: i18n.t('appPageTitle.powerRestorePolicy'),
248 },
249 },
250 {
Sandeepa Singh6dba4be2021-07-28 15:25:14 +0530251 path: '/resource-management/power',
252 name: 'power',
253 component: Power,
254 meta: {
255 title: i18n.t('appPageTitle.power'),
256 },
257 },
258 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530259 path: '/operations/reboot-bmc',
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700260 name: 'reboot-bmc',
261 component: RebootBmc,
262 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -0500263 title: i18n.t('appPageTitle.rebootBmc'),
264 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700265 },
266 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530267 path: '/operations/serial-over-lan',
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700268 name: 'serial-over-lan',
269 component: SerialOverLan,
270 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -0500271 title: i18n.t('appPageTitle.serialOverLan'),
Damian Celicoaeb19812022-11-24 02:00:53 +0100272 exclusiveToRoles: [roles.administrator],
Derick Montague602e98a2020-10-21 16:20:00 -0500273 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700274 },
275 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530276 path: '/operations/server-power-operations',
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700277 name: 'server-power-operations',
278 component: ServerPowerOperations,
279 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -0500280 title: i18n.t('appPageTitle.serverPowerOperations'),
281 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700282 },
283 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530284 path: '/operations/virtual-media',
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700285 name: 'virtual-media',
286 component: VirtualMedia,
287 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -0500288 title: i18n.t('appPageTitle.virtualMedia'),
Damian Celicoaeb19812022-11-24 02:00:53 +0100289 exclusiveToRoles: [roles.administrator],
Derick Montague602e98a2020-10-21 16:20:00 -0500290 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700291 },
292 {
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700293 path: '*',
294 name: 'page-not-found',
295 component: PageNotFound,
296 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -0500297 title: i18n.t('appPageTitle.pageNotFound'),
298 },
299 },
300 ],
301 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700302];
303
Paul Fertser2b335262024-04-11 10:51:41 +0000304export { routes as default, roles };