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