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