blob: 89c1508b44bb12fac645f39123a3f1b5068b9d70 [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';
Ed Tanous883a0d52024-03-23 14:56:34 -07009import i18n from '@/i18n';
Damian Celicoaeb19812022-11-24 02:00:53 +010010const roles = {
11 administrator: 'Administrator',
12 operator: 'Operator',
13 readonly: 'ReadOnly',
14 noaccess: 'NoAccess',
15};
Yoshie Muranakad329ec82020-08-11 18:24:59 -070016
17const AppNavigationMixin = {
18 components: {
Derick Montague828dda92021-06-28 15:52:22 -050019 iconOverview: IconDashboard,
20 iconLogs: IconTextLinkAnalysis,
Yoshie Muranakad329ec82020-08-11 18:24:59 -070021 iconHealth: IconDataCheck,
22 iconControl: IconSettingsAdjust,
Sandeepa Singhf67f7692021-07-19 18:04:18 +053023 iconSettings: IconSettings,
Sandeepa Singhb4406162021-07-26 15:05:39 +053024 iconSecurityAndAccess: IconSecurity,
Derick Montague602e98a2020-10-21 16:20:00 -050025 iconExpand: IconChevronUp,
Sandeepa Singh6dba4be2021-07-28 15:25:14 +053026 iconResourceManagement: IconDataBase,
Yoshie Muranakad329ec82020-08-11 18:24:59 -070027 },
28 data() {
29 return {
30 navigationItems: [
31 {
32 id: 'overview',
Ed Tanous883a0d52024-03-23 14:56:34 -070033 label: i18n.global.t('appNavigation.overview'),
Yoshie Muranakad329ec82020-08-11 18:24:59 -070034 route: '/',
Derick Montague602e98a2020-10-21 16:20:00 -050035 icon: 'iconOverview',
Yoshie Muranakad329ec82020-08-11 18:24:59 -070036 },
37 {
Derick Montague828dda92021-06-28 15:52:22 -050038 id: 'logs',
Ed Tanous883a0d52024-03-23 14:56:34 -070039 label: i18n.global.t('appNavigation.logs'),
Derick Montague828dda92021-06-28 15:52:22 -050040 icon: 'iconLogs',
Yoshie Muranakad329ec82020-08-11 18:24:59 -070041 children: [
42 {
43 id: 'event-logs',
Ed Tanous883a0d52024-03-23 14:56:34 -070044 label: i18n.global.t('appNavigation.eventLogs'),
Derick Montague828dda92021-06-28 15:52:22 -050045 route: '/logs/event-logs',
Yoshie Muranakad329ec82020-08-11 18:24:59 -070046 },
Yoshie Muranakad329ec82020-08-11 18:24:59 -070047 {
Sandeepa Singh06d53862021-05-24 13:51:09 +053048 id: 'post-code-logs',
Ed Tanous883a0d52024-03-23 14:56:34 -070049 label: i18n.global.t('appNavigation.postCodeLogs'),
Sandeepa Singh7affc522021-07-06 16:29:10 +053050 route: '/logs/post-code-logs',
51 },
Paul Fertser6b1a1572025-01-21 17:22:20 +000052 {
53 id: 'dumps',
54 label: i18n.global.t('appNavigation.dumps'),
55 route: '/logs/dumps',
56 },
Sandeepa Singh7affc522021-07-06 16:29:10 +053057 ],
58 },
59 {
60 id: 'hardware-status',
Ed Tanous883a0d52024-03-23 14:56:34 -070061 label: i18n.global.t('appNavigation.hardwareStatus'),
Sandeepa Singh7affc522021-07-06 16:29:10 +053062 icon: 'iconHealth',
63 children: [
64 {
65 id: 'inventory',
Ed Tanous883a0d52024-03-23 14:56:34 -070066 label: i18n.global.t('appNavigation.inventory'),
Sandeepa Singh7affc522021-07-06 16:29:10 +053067 route: '/hardware-status/inventory',
Sandeepa Singh06d53862021-05-24 13:51:09 +053068 },
69 {
Yoshie Muranakad329ec82020-08-11 18:24:59 -070070 id: 'sensors',
Ed Tanous883a0d52024-03-23 14:56:34 -070071 label: i18n.global.t('appNavigation.sensors'),
Sandeepa Singh7affc522021-07-06 16:29:10 +053072 route: '/hardware-status/sensors',
Derick Montague602e98a2020-10-21 16:20:00 -050073 },
74 ],
Yoshie Muranakad329ec82020-08-11 18:24:59 -070075 },
76 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +053077 id: 'operations',
Ed Tanous883a0d52024-03-23 14:56:34 -070078 label: i18n.global.t('appNavigation.operations'),
Yoshie Muranakad329ec82020-08-11 18:24:59 -070079 icon: 'iconControl',
80 children: [
81 {
Derick Montagueda9f0a62021-02-14 19:21:44 -060082 id: 'factory-reset',
Ed Tanous883a0d52024-03-23 14:56:34 -070083 label: i18n.global.t('appNavigation.factoryReset'),
Sandeepa Singh68cbbe92021-07-14 16:02:22 +053084 route: '/operations/factory-reset',
Derick Montagueda9f0a62021-02-14 19:21:44 -060085 },
86 {
Yoshie Muranakad329ec82020-08-11 18:24:59 -070087 id: 'kvm',
Ed Tanous883a0d52024-03-23 14:56:34 -070088 label: i18n.global.t('appNavigation.kvm'),
Sandeepa Singh68cbbe92021-07-14 16:02:22 +053089 route: '/operations/kvm',
90 },
91 {
Sandeepa Singh05887b52022-01-10 19:19:36 +053092 id: 'key-clear',
Ed Tanous883a0d52024-03-23 14:56:34 -070093 label: i18n.global.t('appNavigation.keyClear'),
Sandeepa Singh05887b52022-01-10 19:19:36 +053094 route: '/operations/key-clear',
95 },
96 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +053097 id: 'firmware',
Ed Tanous883a0d52024-03-23 14:56:34 -070098 label: i18n.global.t('appNavigation.firmware'),
Sandeepa Singh68cbbe92021-07-14 16:02:22 +053099 route: '/operations/firmware',
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700100 },
101 {
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700102 id: 'reboot-bmc',
Ed Tanous883a0d52024-03-23 14:56:34 -0700103 label: i18n.global.t('appNavigation.rebootBmc'),
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530104 route: '/operations/reboot-bmc',
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700105 },
106 {
107 id: 'serial-over-lan',
Ed Tanous883a0d52024-03-23 14:56:34 -0700108 label: i18n.global.t('appNavigation.serialOverLan'),
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530109 route: '/operations/serial-over-lan',
Damian Celicoaeb19812022-11-24 02:00:53 +0100110 exclusiveToRoles: [roles.administrator],
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700111 },
112 {
113 id: 'server-power-operations',
Ed Tanous883a0d52024-03-23 14:56:34 -0700114 label: i18n.global.t('appNavigation.serverPowerOperations'),
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530115 route: '/operations/server-power-operations',
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700116 },
117 {
118 id: 'virtual-media',
Ed Tanous883a0d52024-03-23 14:56:34 -0700119 label: i18n.global.t('appNavigation.virtualMedia'),
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530120 route: '/operations/virtual-media',
Damian Celicoaeb19812022-11-24 02:00:53 +0100121 exclusiveToRoles: [roles.administrator],
Derick Montague602e98a2020-10-21 16:20:00 -0500122 },
123 ],
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700124 },
125 {
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530126 id: 'settings',
Ed Tanous883a0d52024-03-23 14:56:34 -0700127 label: i18n.global.t('appNavigation.settings'),
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530128 icon: 'iconSettings',
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700129 children: [
130 {
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530131 id: 'date-time',
Ed Tanous883a0d52024-03-23 14:56:34 -0700132 label: i18n.global.t('appNavigation.dateTime'),
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530133 route: '/settings/date-time',
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700134 },
135 {
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530136 id: 'network',
Ed Tanous883a0d52024-03-23 14:56:34 -0700137 label: i18n.global.t('appNavigation.network'),
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530138 route: '/settings/network',
139 },
140 {
141 id: 'power-restore-policy',
Ed Tanous883a0d52024-03-23 14:56:34 -0700142 label: i18n.global.t('appNavigation.powerRestorePolicy'),
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530143 route: '/settings/power-restore-policy',
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700144 },
Konstantin Aladyshev7c1cfe72023-05-16 09:03:25 +0000145 {
146 id: 'snmp-alerts',
Ed Tanous883a0d52024-03-23 14:56:34 -0700147 label: i18n.global.t('appNavigation.snmpAlerts'),
Konstantin Aladyshev7c1cfe72023-05-16 09:03:25 +0000148 route: '/settings/snmp-alerts',
149 },
Derick Montague602e98a2020-10-21 16:20:00 -0500150 ],
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700151 },
152 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530153 id: 'security-and-access',
Ed Tanous883a0d52024-03-23 14:56:34 -0700154 label: i18n.global.t('appNavigation.securityAndAccess'),
Sandeepa Singhb4406162021-07-26 15:05:39 +0530155 icon: 'iconSecurityAndAccess',
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700156 children: [
157 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530158 id: 'sessions',
Ed Tanous883a0d52024-03-23 14:56:34 -0700159 label: i18n.global.t('appNavigation.sessions'),
Sandeepa Singhb4406162021-07-26 15:05:39 +0530160 route: '/security-and-access/sessions',
Sukanya Pandey34efde22020-12-02 19:04:09 +0530161 },
162 {
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700163 id: 'ldap',
Ed Tanous883a0d52024-03-23 14:56:34 -0700164 label: i18n.global.t('appNavigation.ldap'),
Sandeepa Singhb4406162021-07-26 15:05:39 +0530165 route: '/security-and-access/ldap',
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700166 },
167 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530168 id: 'user-management',
Ed Tanous883a0d52024-03-23 14:56:34 -0700169 label: i18n.global.t('appNavigation.userManagement'),
Sandeepa Singhb4406162021-07-26 15:05:39 +0530170 route: '/security-and-access/user-management',
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700171 },
172 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530173 id: 'policies',
Ed Tanous883a0d52024-03-23 14:56:34 -0700174 label: i18n.global.t('appNavigation.policies'),
Sandeepa Singhb4406162021-07-26 15:05:39 +0530175 route: '/security-and-access/policies',
176 },
177 {
178 id: 'certificates',
Ed Tanous883a0d52024-03-23 14:56:34 -0700179 label: i18n.global.t('appNavigation.certificates'),
Sandeepa Singhb4406162021-07-26 15:05:39 +0530180 route: '/security-and-access/certificates',
Derick Montague602e98a2020-10-21 16:20:00 -0500181 },
182 ],
183 },
Sandeepa Singh6dba4be2021-07-28 15:25:14 +0530184 {
185 id: 'resource-management',
Ed Tanous883a0d52024-03-23 14:56:34 -0700186 label: i18n.global.t('appNavigation.resourceManagement'),
Sandeepa Singh6dba4be2021-07-28 15:25:14 +0530187 icon: 'iconResourceManagement',
188 children: [
189 {
190 id: 'power',
Ed Tanous883a0d52024-03-23 14:56:34 -0700191 label: i18n.global.t('appNavigation.power'),
Sandeepa Singh6dba4be2021-07-28 15:25:14 +0530192 route: '/resource-management/power',
193 },
194 ],
195 },
Derick Montague602e98a2020-10-21 16:20:00 -0500196 ],
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700197 };
Derick Montague602e98a2020-10-21 16:20:00 -0500198 },
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700199};
200
201export default AppNavigationMixin;