blob: 61230988113311667e6a8d513efd67ed0e0f71ec [file] [log] [blame]
Derick Montague828dda92021-06-28 15:52:22 -05001import IconDashboard from '@carbon/icons-vue/es/dashboard/16';
2import IconTextLinkAnalysis from '@carbon/icons-vue/es/text-link--analysis/16';
Yoshie Muranakad329ec82020-08-11 18:24:59 -07003import IconDataCheck from '@carbon/icons-vue/es/data--check/16';
4import IconSettingsAdjust from '@carbon/icons-vue/es/settings--adjust/16';
5import IconSettings from '@carbon/icons-vue/es/settings/16';
Sandeepa Singhb4406162021-07-26 15:05:39 +05306import IconSecurity from '@carbon/icons-vue/es/security/16';
Yoshie Muranakad329ec82020-08-11 18:24:59 -07007import IconChevronUp from '@carbon/icons-vue/es/chevron--up/16';
Sandeepa Singh6dba4be2021-07-28 15:25:14 +05308import IconDataBase from '@carbon/icons-vue/es/data--base--alt/16';
Damian Celicoaeb19812022-11-24 02:00:53 +01009const roles = {
10 administrator: 'Administrator',
11 operator: 'Operator',
12 readonly: 'ReadOnly',
13 noaccess: 'NoAccess',
14};
Yoshie Muranakad329ec82020-08-11 18:24:59 -070015
16const AppNavigationMixin = {
17 components: {
Derick Montague828dda92021-06-28 15:52:22 -050018 iconOverview: IconDashboard,
19 iconLogs: IconTextLinkAnalysis,
Yoshie Muranakad329ec82020-08-11 18:24:59 -070020 iconHealth: IconDataCheck,
21 iconControl: IconSettingsAdjust,
Sandeepa Singhf67f7692021-07-19 18:04:18 +053022 iconSettings: IconSettings,
Sandeepa Singhb4406162021-07-26 15:05:39 +053023 iconSecurityAndAccess: IconSecurity,
Derick Montague602e98a2020-10-21 16:20:00 -050024 iconExpand: IconChevronUp,
Sandeepa Singh6dba4be2021-07-28 15:25:14 +053025 iconResourceManagement: IconDataBase,
Yoshie Muranakad329ec82020-08-11 18:24:59 -070026 },
27 data() {
28 return {
29 navigationItems: [
30 {
31 id: 'overview',
32 label: this.$t('appNavigation.overview'),
33 route: '/',
Derick Montague602e98a2020-10-21 16:20:00 -050034 icon: 'iconOverview',
Yoshie Muranakad329ec82020-08-11 18:24:59 -070035 },
36 {
Derick Montague828dda92021-06-28 15:52:22 -050037 id: 'logs',
38 label: this.$t('appNavigation.logs'),
39 icon: 'iconLogs',
Yoshie Muranakad329ec82020-08-11 18:24:59 -070040 children: [
41 {
42 id: 'event-logs',
43 label: this.$t('appNavigation.eventLogs'),
Derick Montague828dda92021-06-28 15:52:22 -050044 route: '/logs/event-logs',
Yoshie Muranakad329ec82020-08-11 18:24:59 -070045 },
Yoshie Muranakad329ec82020-08-11 18:24:59 -070046 {
Sandeepa Singh06d53862021-05-24 13:51:09 +053047 id: 'post-code-logs',
48 label: this.$t('appNavigation.postCodeLogs'),
Sandeepa Singh7affc522021-07-06 16:29:10 +053049 route: '/logs/post-code-logs',
50 },
51 ],
52 },
53 {
54 id: 'hardware-status',
55 label: this.$t('appNavigation.hardwareStatus'),
56 icon: 'iconHealth',
57 children: [
58 {
59 id: 'inventory',
60 label: this.$t('appNavigation.inventory'),
61 route: '/hardware-status/inventory',
Sandeepa Singh06d53862021-05-24 13:51:09 +053062 },
63 {
Yoshie Muranakad329ec82020-08-11 18:24:59 -070064 id: 'sensors',
65 label: this.$t('appNavigation.sensors'),
Sandeepa Singh7affc522021-07-06 16:29:10 +053066 route: '/hardware-status/sensors',
Derick Montague602e98a2020-10-21 16:20:00 -050067 },
68 ],
Yoshie Muranakad329ec82020-08-11 18:24:59 -070069 },
70 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +053071 id: 'operations',
72 label: this.$t('appNavigation.operations'),
Yoshie Muranakad329ec82020-08-11 18:24:59 -070073 icon: 'iconControl',
74 children: [
75 {
Derick Montagueda9f0a62021-02-14 19:21:44 -060076 id: 'factory-reset',
77 label: this.$t('appNavigation.factoryReset'),
Sandeepa Singh68cbbe92021-07-14 16:02:22 +053078 route: '/operations/factory-reset',
Derick Montagueda9f0a62021-02-14 19:21:44 -060079 },
80 {
Yoshie Muranakad329ec82020-08-11 18:24:59 -070081 id: 'kvm',
82 label: this.$t('appNavigation.kvm'),
Sandeepa Singh68cbbe92021-07-14 16:02:22 +053083 route: '/operations/kvm',
84 },
85 {
Sandeepa Singh05887b52022-01-10 19:19:36 +053086 id: 'key-clear',
87 label: this.$t('appNavigation.keyClear'),
88 route: '/operations/key-clear',
89 },
90 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +053091 id: 'firmware',
92 label: this.$t('appNavigation.firmware'),
93 route: '/operations/firmware',
Yoshie Muranakad329ec82020-08-11 18:24:59 -070094 },
95 {
Yoshie Muranakad329ec82020-08-11 18:24:59 -070096 id: 'reboot-bmc',
97 label: this.$t('appNavigation.rebootBmc'),
Sandeepa Singh68cbbe92021-07-14 16:02:22 +053098 route: '/operations/reboot-bmc',
Yoshie Muranakad329ec82020-08-11 18:24:59 -070099 },
100 {
101 id: 'serial-over-lan',
102 label: this.$t('appNavigation.serialOverLan'),
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530103 route: '/operations/serial-over-lan',
Damian Celicoaeb19812022-11-24 02:00:53 +0100104 exclusiveToRoles: [roles.administrator],
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700105 },
106 {
107 id: 'server-power-operations',
108 label: this.$t('appNavigation.serverPowerOperations'),
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530109 route: '/operations/server-power-operations',
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700110 },
111 {
112 id: 'virtual-media',
113 label: this.$t('appNavigation.virtualMedia'),
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530114 route: '/operations/virtual-media',
Damian Celicoaeb19812022-11-24 02:00:53 +0100115 exclusiveToRoles: [roles.administrator],
Derick Montague602e98a2020-10-21 16:20:00 -0500116 },
117 ],
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700118 },
119 {
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530120 id: 'settings',
121 label: this.$t('appNavigation.settings'),
122 icon: 'iconSettings',
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700123 children: [
124 {
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530125 id: 'date-time',
126 label: this.$t('appNavigation.dateTime'),
127 route: '/settings/date-time',
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700128 },
129 {
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530130 id: 'network',
131 label: this.$t('appNavigation.network'),
132 route: '/settings/network',
133 },
134 {
135 id: 'power-restore-policy',
136 label: this.$t('appNavigation.powerRestorePolicy'),
137 route: '/settings/power-restore-policy',
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700138 },
Derick Montague602e98a2020-10-21 16:20:00 -0500139 ],
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700140 },
141 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530142 id: 'security-and-access',
143 label: this.$t('appNavigation.securityAndAccess'),
144 icon: 'iconSecurityAndAccess',
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700145 children: [
146 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530147 id: 'sessions',
148 label: this.$t('appNavigation.sessions'),
149 route: '/security-and-access/sessions',
Sukanya Pandey34efde22020-12-02 19:04:09 +0530150 },
151 {
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700152 id: 'ldap',
153 label: this.$t('appNavigation.ldap'),
Sandeepa Singhb4406162021-07-26 15:05:39 +0530154 route: '/security-and-access/ldap',
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700155 },
156 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530157 id: 'user-management',
158 label: this.$t('appNavigation.userManagement'),
159 route: '/security-and-access/user-management',
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700160 },
161 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530162 id: 'policies',
163 label: this.$t('appNavigation.policies'),
164 route: '/security-and-access/policies',
165 },
166 {
167 id: 'certificates',
168 label: this.$t('appNavigation.certificates'),
169 route: '/security-and-access/certificates',
Derick Montague602e98a2020-10-21 16:20:00 -0500170 },
171 ],
172 },
Sandeepa Singh6dba4be2021-07-28 15:25:14 +0530173 {
174 id: 'resource-management',
175 label: this.$t('appNavigation.resourceManagement'),
176 icon: 'iconResourceManagement',
177 children: [
178 {
179 id: 'power',
180 label: this.$t('appNavigation.power'),
181 route: '/resource-management/power',
182 },
183 ],
184 },
Derick Montague602e98a2020-10-21 16:20:00 -0500185 ],
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700186 };
Derick Montague602e98a2020-10-21 16:20:00 -0500187 },
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700188};
189
190export default AppNavigationMixin;