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