blob: 5f3ee6eb90a36138475fed2577a0711a5cbebcfc [file] [log] [blame]
MichalX Szopinski842b5db2020-11-24 13:12:50 +01001import AppLayout from '@/layouts/AppLayout.vue';
2import ChangePassword from '@/views/ChangePassword';
Sandeepa Singhb4406162021-07-26 15:05:39 +05303import Sessions from '@/views/SecurityAndAccess/Sessions';
MichalX Szopinski842b5db2020-11-24 13:12:50 +01004import ConsoleLayout from '@/layouts/ConsoleLayout.vue';
Sandeepa Singhf67f7692021-07-19 18:04:18 +05305import DateTime from '@/views/Settings/DateTime';
Derick Montague828dda92021-06-28 15:52:22 -05006import EventLogs from '@/views/Logs/EventLogs';
Sandeepa Singh68cbbe92021-07-14 16:02:22 +05307import 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 UserManagement from '@/views/SecurityAndAccess/UserManagement';
MichalX Szopinski842b5db2020-11-24 13:12:50 +010012import Login from '@/views/Login';
13import LoginLayout from '@/layouts/LoginLayout';
Sandeepa Singhf67f7692021-07-19 18:04:18 +053014import Network from '@/views/Settings/Network';
MichalX Szopinski842b5db2020-11-24 13:12:50 +010015import Overview from '@/views/Overview';
16import PageNotFound from '@/views/PageNotFound';
MichalX Szopinski2a2e1022021-11-05 15:54:29 +010017import PostCodeLogs from '@/views/Logs/PostCodeLogs';
MichalX Szopinski842b5db2020-11-24 13:12:50 +010018import ProfileSettings from '@/views/ProfileSettings';
Sandeepa Singh68cbbe92021-07-14 16:02:22 +053019import RebootBmc from '@/views/Operations/RebootBmc';
Sandeepa Singhb4406162021-07-26 15:05:39 +053020import Policies from '@/views/SecurityAndAccess/Policies';
Sandeepa Singh7affc522021-07-06 16:29:10 +053021import Sensors from '@/views/HardwareStatus/Sensors';
Sandeepa Singh68cbbe92021-07-14 16:02:22 +053022import SerialOverLan from '@/views/Operations/SerialOverLan';
23import SerialOverLanConsole from '@/views/Operations/SerialOverLan/SerialOverLanConsole';
24import ServerPowerOperations from '@/views/Operations/ServerPowerOperations';
Sandeepa Singhb4406162021-07-26 15:05:39 +053025import Certificates from '@/views/SecurityAndAccess/Certificates';
Sandeepa Singh68cbbe92021-07-14 16:02:22 +053026import VirtualMedia from '@/views/Operations/VirtualMedia';
Sandeepa Singh6dba4be2021-07-28 15:25:14 +053027import Power from '@/views/ResourceManagement/Power';
MichalX Szopinski842b5db2020-11-24 13:12:50 +010028import i18n from '@/i18n';
29
Damian Celicoaeb19812022-11-24 02:00:53 +010030const roles = {
31 administrator: 'Administrator',
32 operator: 'Operator',
33 readonly: 'ReadOnly',
34 noaccess: 'NoAccess',
35};
36
MichalX Szopinski842b5db2020-11-24 13:12:50 +010037const routes = [
38 {
39 path: '/login',
40 component: LoginLayout,
41 children: [
42 {
43 path: '',
44 name: 'login',
45 component: Login,
46 meta: {
47 title: i18n.t('appPageTitle.login'),
48 },
49 },
50 {
51 path: '/change-password',
52 name: 'change-password',
53 component: ChangePassword,
54 meta: {
55 title: i18n.t('appPageTitle.changePassword'),
56 requiresAuth: true,
57 },
58 },
59 ],
60 },
61 {
62 path: '/console',
63 component: ConsoleLayout,
64 meta: {
65 requiresAuth: true,
66 },
67 children: [
68 {
69 path: 'serial-over-lan-console',
70 name: 'serial-over-lan-console',
71 component: SerialOverLanConsole,
72 meta: {
73 title: i18n.t('appPageTitle.serialOverLan'),
74 },
75 },
76 {
77 path: 'kvm',
78 name: 'kvm-console',
79 component: KvmConsole,
80 meta: {
81 title: i18n.t('appPageTitle.kvm'),
82 },
83 },
84 ],
85 },
86 {
87 path: '/',
88 meta: {
89 requiresAuth: true,
90 },
91 component: AppLayout,
92 children: [
93 {
94 path: '',
95 name: 'overview',
96 component: Overview,
97 meta: {
98 title: i18n.t('appPageTitle.overview'),
99 },
100 },
101 {
102 path: '/profile-settings',
103 name: 'profile-settings',
104 component: ProfileSettings,
105 meta: {
106 title: i18n.t('appPageTitle.profileSettings'),
107 },
108 },
109 {
Derick Montague828dda92021-06-28 15:52:22 -0500110 path: '/logs/event-logs',
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100111 name: 'event-logs',
112 component: EventLogs,
113 meta: {
114 title: i18n.t('appPageTitle.eventLogs'),
115 },
116 },
117 {
MichalX Szopinski2a2e1022021-11-05 15:54:29 +0100118 path: '/logs/post-code-logs',
119 name: 'post-code-logs',
120 component: PostCodeLogs,
121 meta: {
122 title: i18n.t('appPageTitle.postCodeLogs'),
123 },
124 },
125 {
Sandeepa Singh7affc522021-07-06 16:29:10 +0530126 path: '/hardware-status/inventory',
127 name: 'inventory',
128 component: Inventory,
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100129 meta: {
MichalX Szopinski6225f642021-10-11 16:31:49 +0200130 title: i18n.t('appPageTitle.inventory'),
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100131 },
132 },
133 {
Sandeepa Singh7affc522021-07-06 16:29:10 +0530134 path: '/hardware-status/sensors',
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100135 name: 'sensors',
136 component: Sensors,
137 meta: {
138 title: i18n.t('appPageTitle.sensors'),
139 },
140 },
141 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530142 path: '/security-and-access/sessions',
143 name: 'sessions',
144 component: Sessions,
MichalX Szopinskid6752692021-03-01 13:59:55 +0100145 meta: {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530146 title: i18n.t('appPageTitle.sessions'),
MichalX Szopinskid6752692021-03-01 13:59:55 +0100147 },
148 },
149 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530150 path: '/security-and-access/user-management',
151 name: 'user-management',
152 component: UserManagement,
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100153 meta: {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530154 title: i18n.t('appPageTitle.userManagement'),
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100155 },
156 },
157 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530158 path: '/security-and-access/policies',
159 name: 'policies',
160 component: Policies,
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100161 meta: {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530162 title: i18n.t('appPageTitle.policies'),
163 },
164 },
165 {
166 path: '/security-and-access/certificates',
167 name: 'certificates',
168 component: Certificates,
169 meta: {
170 title: i18n.t('appPageTitle.certificates'),
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100171 },
172 },
173 {
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530174 path: '/settings/date-time',
175 name: 'date-time',
176 component: DateTime,
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100177 meta: {
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530178 title: i18n.t('appPageTitle.dateTime'),
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100179 },
180 },
181 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530182 path: '/operations/kvm',
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100183 name: 'kvm',
184 component: Kvm,
185 meta: {
186 title: i18n.t('appPageTitle.kvm'),
187 },
188 },
189 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530190 path: '/operations/firmware',
191 name: 'firmware',
192 component: Firmware,
193 meta: {
194 title: i18n.t('appPageTitle.firmware'),
195 },
196 },
197 {
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530198 path: '/settings/network',
199 name: 'network',
200 component: Network,
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100201 meta: {
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530202 title: i18n.t('appPageTitle.network'),
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100203 },
204 },
205 {
Sandeepa Singh6dba4be2021-07-28 15:25:14 +0530206 path: '/resource-management/power',
207 name: 'power',
208 component: Power,
209 meta: {
210 title: i18n.t('appPageTitle.power'),
211 },
212 },
213 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530214 path: '/operations/reboot-bmc',
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100215 name: 'reboot-bmc',
216 component: RebootBmc,
217 meta: {
218 title: i18n.t('appPageTitle.rebootBmc'),
219 },
220 },
221 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530222 path: '/operations/serial-over-lan',
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100223 name: 'serial-over-lan',
224 component: SerialOverLan,
225 meta: {
226 title: i18n.t('appPageTitle.serialOverLan'),
Damian Celicoaeb19812022-11-24 02:00:53 +0100227 exclusiveToRoles: [roles.administrator],
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100228 },
229 },
230 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530231 path: '/operations/server-power-operations',
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100232 name: 'server-power-operations',
233 component: ServerPowerOperations,
234 meta: {
235 title: i18n.t('appPageTitle.serverPowerOperations'),
236 },
237 },
238 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530239 path: '/operations/virtual-media',
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100240 name: 'virtual-media',
241 component: VirtualMedia,
242 meta: {
243 title: i18n.t('appPageTitle.virtualMedia'),
Damian Celicoaeb19812022-11-24 02:00:53 +0100244 exclusiveToRoles: [roles.administrator],
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100245 },
246 },
247 {
248 path: '*',
249 name: 'page-not-found',
250 component: PageNotFound,
251 meta: {
252 title: i18n.t('appPageTitle.pageNotFound'),
253 },
254 },
255 ],
256 },
257];
Mateusz Gapski03505912020-06-25 08:16:51 +0200258
Yoshie Muranaka816d9472020-09-03 11:19:28 -0700259export default routes;