xref: /openbmc/webui-vue/src/env/router/ibm.js (revision 84ec88f9)
1import AppLayout from '@/layouts/AppLayout.vue';
2import ChangePassword from '@/views/ChangePassword';
3import Sessions from '@/views/SecurityAndAccess/Sessions';
4import ConsoleLayout from '@/layouts/ConsoleLayout.vue';
5import DateTime from '@/views/Settings/DateTime';
6import EventLogs from '@/views/Logs/EventLogs';
7import FactoryReset from '@/views/Operations/FactoryReset';
8import Firmware from '@/views/Operations/Firmware';
9import Inventory from '@/views/HardwareStatus/Inventory';
10import Ldap from '@/views/SecurityAndAccess/Ldap';
11import UserManagement from '@/views/SecurityAndAccess/UserManagement';
12import Login from '@/views/Login';
13import LoginLayout from '@/layouts/LoginLayout';
14import Network from '@/views/Settings/Network';
15import Overview from '@/views/Overview';
16import PageNotFound from '@/views/PageNotFound';
17import PostCodeLogs from '@/views/Logs/PostCodeLogs';
18import PowerRestorePolicy from '@/views/Settings/PowerRestorePolicy';
19import ProfileSettings from '@/views/ProfileSettings';
20import RebootBmc from '@/views/Operations/RebootBmc';
21import Policies from '@/views/SecurityAndAccess/Policies';
22import Sensors from '@/views/HardwareStatus/Sensors';
23import SerialOverLan from '@/views/Operations/SerialOverLan';
24import SerialOverLanConsole from '@/views/Operations/SerialOverLan/SerialOverLanConsole';
25import ServerPowerOperations from '@/views/Operations/ServerPowerOperations';
26import Certificates from '@/views/SecurityAndAccess/Certificates';
27import Power from '@/views/ResourceManagement/Power';
28import i18n from '@/i18n';
29
30// Custom components
31import Dumps from '@/views/Logs/Dumps';
32
33const routes = [
34  {
35    path: '/login',
36    component: LoginLayout,
37    children: [
38      {
39        path: '',
40        name: 'login',
41        component: Login,
42        meta: {
43          title: i18n.t('appPageTitle.login'),
44        },
45      },
46      {
47        path: '/change-password',
48        name: 'change-password',
49        component: ChangePassword,
50        meta: {
51          title: i18n.t('appPageTitle.changePassword'),
52          requiresAuth: true,
53        },
54      },
55    ],
56  },
57  {
58    path: '/console',
59    component: ConsoleLayout,
60    meta: {
61      requiresAuth: true,
62    },
63    children: [
64      {
65        path: 'serial-over-lan-console',
66        name: 'serial-over-lan-console',
67        component: SerialOverLanConsole,
68        meta: {
69          title: i18n.t('appPageTitle.serialOverLan'),
70        },
71      },
72    ],
73  },
74  {
75    path: '/',
76    meta: {
77      requiresAuth: true,
78    },
79    component: AppLayout,
80    children: [
81      {
82        path: '',
83        name: 'overview',
84        component: Overview,
85        meta: {
86          title: i18n.t('appPageTitle.overview'),
87        },
88      },
89      {
90        path: '/profile-settings',
91        name: 'profile-settings',
92        component: ProfileSettings,
93        meta: {
94          title: i18n.t('appPageTitle.profileSettings'),
95        },
96      },
97      {
98        path: '/logs/dumps',
99        name: 'dumps',
100        component: Dumps,
101        meta: {
102          title: i18n.t('appPageTitle.dumps'),
103        },
104      },
105      {
106        path: '/logs/event-logs',
107        name: 'event-logs',
108        component: EventLogs,
109        meta: {
110          title: i18n.t('appPageTitle.eventLogs'),
111        },
112      },
113      {
114        path: '/logs/post-code-logs',
115        name: 'post-code-logs',
116        component: PostCodeLogs,
117        meta: {
118          title: i18n.t('appPageTitle.postCodeLogs'),
119        },
120      },
121      {
122        path: '/hardware-status/inventory',
123        name: 'inventory',
124        component: Inventory,
125        meta: {
126          title: i18n.t('appPageTitle.inventory'),
127        },
128      },
129      {
130        path: '/hardware-status/sensors',
131        name: 'sensors',
132        component: Sensors,
133        meta: {
134          title: i18n.t('appPageTitle.sensors'),
135        },
136      },
137      {
138        path: '/security-and-access/sessions',
139        name: 'sessions',
140        component: Sessions,
141        meta: {
142          title: i18n.t('appPageTitle.sessions'),
143        },
144      },
145      {
146        path: '/security-and-access/ldap',
147        name: 'ldap',
148        component: Ldap,
149        meta: {
150          title: i18n.t('appPageTitle.ldap'),
151        },
152      },
153      {
154        path: '/security-and-access/user-management',
155        name: 'user-management',
156        component: UserManagement,
157        meta: {
158          title: i18n.t('appPageTitle.userManagement'),
159        },
160      },
161      {
162        path: '/security-and-access/policies',
163        name: 'policies',
164        component: Policies,
165        meta: {
166          title: i18n.t('appPageTitle.policies'),
167        },
168      },
169      {
170        path: '/security-and-access/certificates',
171        name: 'certificates',
172        component: Certificates,
173        meta: {
174          title: i18n.t('appPageTitle.certificates'),
175        },
176      },
177      {
178        path: '/settings/date-time',
179        name: 'date-time',
180        component: DateTime,
181        meta: {
182          title: i18n.t('appPageTitle.dateTime'),
183        },
184      },
185      {
186        path: '/operations/firmware',
187        name: 'firmware',
188        component: Firmware,
189        meta: {
190          title: i18n.t('appPageTitle.firmware'),
191        },
192      },
193      {
194        path: '/settings/network',
195        name: 'network',
196        component: Network,
197        meta: {
198          title: i18n.t('appPageTitle.network'),
199        },
200      },
201      {
202        path: '/settings/power-restore-policy',
203        name: 'power-restore-policy',
204        component: PowerRestorePolicy,
205        meta: {
206          title: i18n.t('appPageTitle.powerRestorePolicy'),
207        },
208      },
209      {
210        path: '/resource-management/power',
211        name: 'power',
212        component: Power,
213        meta: {
214          title: i18n.t('appPageTitle.power'),
215        },
216      },
217      {
218        path: '/operations/factory-reset',
219        name: 'factory-reset',
220        component: FactoryReset,
221        meta: {
222          title: i18n.t('appPageTitle.factoryReset'),
223        },
224      },
225      {
226        path: '/operations/reboot-bmc',
227        name: 'reboot-bmc',
228        component: RebootBmc,
229        meta: {
230          title: i18n.t('appPageTitle.rebootBmc'),
231        },
232      },
233      {
234        path: '/operations/serial-over-lan',
235        name: 'serial-over-lan',
236        component: SerialOverLan,
237        meta: {
238          title: i18n.t('appPageTitle.serialOverLan'),
239        },
240      },
241      {
242        path: '/operations/server-power-operations',
243        name: 'server-power-operations',
244        component: ServerPowerOperations,
245        meta: {
246          title: i18n.t('appPageTitle.serverPowerOperations'),
247        },
248      },
249      {
250        path: '*',
251        name: 'page-not-found',
252        component: PageNotFound,
253        meta: {
254          title: i18n.t('appPageTitle.pageNotFound'),
255        },
256      },
257    ],
258  },
259];
260
261export default routes;
262