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