blob: 1404da5e11dee75111cfaf45261fb721852a5b06 [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';
Yoshie Muranakaf15cc7a2020-09-09 10:08:14 -070032import i18n from '@/i18n';
Yoshie Muranaka816d9472020-09-03 11:19:28 -070033
Damian Celicoaeb19812022-11-24 02:00:53 +010034const roles = {
35 administrator: 'Administrator',
36 operator: 'Operator',
37 readonly: 'ReadOnly',
38 noaccess: 'NoAccess',
39};
40
Yoshie Muranaka816d9472020-09-03 11:19:28 -070041const routes = [
42 {
43 path: '/login',
44 component: LoginLayout,
45 children: [
46 {
47 path: '',
48 name: 'login',
49 component: Login,
50 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -050051 title: i18n.t('appPageTitle.login'),
52 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -070053 },
54 {
55 path: '/change-password',
56 name: 'change-password',
57 component: ChangePassword,
58 meta: {
Yoshie Muranakaf15cc7a2020-09-09 10:08:14 -070059 title: i18n.t('appPageTitle.changePassword'),
Derick Montague602e98a2020-10-21 16:20:00 -050060 requiresAuth: true,
61 },
62 },
63 ],
Yoshie Muranaka816d9472020-09-03 11:19:28 -070064 },
65 {
66 path: '/console',
67 component: ConsoleLayout,
68 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -050069 requiresAuth: true,
Yoshie Muranaka816d9472020-09-03 11:19:28 -070070 },
71 children: [
72 {
73 path: 'serial-over-lan-console',
74 name: 'serial-over-lan-console',
75 component: SerialOverLanConsole,
76 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -050077 title: i18n.t('appPageTitle.serialOverLan'),
78 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -070079 },
80 {
81 path: 'kvm',
82 name: 'kvm-console',
83 component: KvmConsole,
84 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -050085 title: i18n.t('appPageTitle.kvm'),
86 },
87 },
88 ],
Yoshie Muranaka816d9472020-09-03 11:19:28 -070089 },
90 {
91 path: '/',
92 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -050093 requiresAuth: true,
Yoshie Muranaka816d9472020-09-03 11:19:28 -070094 },
95 component: AppLayout,
96 children: [
97 {
98 path: '',
99 name: 'overview',
100 component: Overview,
101 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -0500102 title: i18n.t('appPageTitle.overview'),
103 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700104 },
105 {
106 path: '/profile-settings',
107 name: 'profile-settings',
108 component: ProfileSettings,
109 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -0500110 title: i18n.t('appPageTitle.profileSettings'),
111 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700112 },
113 {
Derick Montague828dda92021-06-28 15:52:22 -0500114 path: '/logs/event-logs',
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700115 name: 'event-logs',
116 component: EventLogs,
117 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -0500118 title: i18n.t('appPageTitle.eventLogs'),
119 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700120 },
121 {
Sandeepa Singh7affc522021-07-06 16:29:10 +0530122 path: '/logs/post-code-logs',
Derick Montague512dfb72021-07-30 15:57:17 -0500123 name: 'post-code-logs',
Sandeepa Singh06d53862021-05-24 13:51:09 +0530124 component: PostCodeLogs,
125 meta: {
126 title: i18n.t('appPageTitle.postCodeLogs'),
127 },
128 },
129 {
Sandeepa Singh7affc522021-07-06 16:29:10 +0530130 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 Muranaka816d9472020-09-03 11:19:28 -0700139 name: 'sensors',
140 component: Sensors,
141 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -0500142 title: i18n.t('appPageTitle.sensors'),
143 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700144 },
145 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530146 path: '/security-and-access/sessions',
147 name: 'sessions',
148 component: Sessions,
Sukanya Pandey34efde22020-12-02 19:04:09 +0530149 meta: {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530150 title: i18n.t('appPageTitle.sessions'),
Sukanya Pandey34efde22020-12-02 19:04:09 +0530151 },
152 },
153 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530154 path: '/security-and-access/ldap',
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700155 name: 'ldap',
156 component: Ldap,
157 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -0500158 title: i18n.t('appPageTitle.ldap'),
159 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700160 },
161 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530162 path: '/security-and-access/user-management',
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700163 name: 'local-users',
Sandeepa Singhb4406162021-07-26 15:05:39 +0530164 component: UserManagement,
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700165 meta: {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530166 title: i18n.t('appPageTitle.userManagement'),
Derick Montague602e98a2020-10-21 16:20:00 -0500167 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700168 },
169 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530170 path: '/security-and-access/policies',
171 name: 'policies',
172 component: Policies,
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700173 meta: {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530174 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 Montague602e98a2020-10-21 16:20:00 -0500183 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700184 },
185 {
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530186 path: '/settings/date-time',
187 name: 'date-time',
188 component: DateTime,
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700189 meta: {
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530190 title: i18n.t('appPageTitle.dateTime'),
Derick Montague602e98a2020-10-21 16:20:00 -0500191 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700192 },
193 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530194 path: '/operations/factory-reset',
Derick Montagueda9f0a62021-02-14 19:21:44 -0600195 name: 'factory-reset',
196 component: FactoryReset,
197 meta: {
198 title: i18n.t('appPageTitle.factoryReset'),
199 },
200 },
201 {
Sandeepa Singh05887b52022-01-10 19:19:36 +0530202 path: '/operations/key-clear',
203 name: 'key-clear',
204 component: KeyClear,
205 meta: {
206 title: i18n.t('appPageTitle.keyClear'),
207 },
208 },
209 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530210 path: '/operations/kvm',
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700211 name: 'kvm',
212 component: Kvm,
213 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -0500214 title: i18n.t('appPageTitle.kvm'),
215 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700216 },
217 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530218 path: '/operations/firmware',
219 name: 'firmware',
220 component: Firmware,
221 meta: {
222 title: i18n.t('appPageTitle.firmware'),
223 },
224 },
225 {
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530226 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 Pandeybe6858c2020-12-16 20:08:01 +0530235 name: 'power-restore-policy',
236 component: PowerRestorePolicy,
237 meta: {
238 title: i18n.t('appPageTitle.powerRestorePolicy'),
239 },
240 },
241 {
Sandeepa Singh6dba4be2021-07-28 15:25:14 +0530242 path: '/resource-management/power',
243 name: 'power',
244 component: Power,
245 meta: {
246 title: i18n.t('appPageTitle.power'),
247 },
248 },
249 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530250 path: '/operations/reboot-bmc',
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700251 name: 'reboot-bmc',
252 component: RebootBmc,
253 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -0500254 title: i18n.t('appPageTitle.rebootBmc'),
255 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700256 },
257 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530258 path: '/operations/serial-over-lan',
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700259 name: 'serial-over-lan',
260 component: SerialOverLan,
261 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -0500262 title: i18n.t('appPageTitle.serialOverLan'),
Damian Celicoaeb19812022-11-24 02:00:53 +0100263 exclusiveToRoles: [roles.administrator],
Derick Montague602e98a2020-10-21 16:20:00 -0500264 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700265 },
266 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530267 path: '/operations/server-power-operations',
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700268 name: 'server-power-operations',
269 component: ServerPowerOperations,
270 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -0500271 title: i18n.t('appPageTitle.serverPowerOperations'),
272 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700273 },
274 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530275 path: '/operations/virtual-media',
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700276 name: 'virtual-media',
277 component: VirtualMedia,
278 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -0500279 title: i18n.t('appPageTitle.virtualMedia'),
Damian Celicoaeb19812022-11-24 02:00:53 +0100280 exclusiveToRoles: [roles.administrator],
Derick Montague602e98a2020-10-21 16:20:00 -0500281 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700282 },
283 {
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700284 path: '*',
285 name: 'page-not-found',
286 component: PageNotFound,
287 meta: {
Derick Montague602e98a2020-10-21 16:20:00 -0500288 title: i18n.t('appPageTitle.pageNotFound'),
289 },
290 },
291 ],
292 },
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700293];
294
295export default routes;