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