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