blob: c00e984391cadb8ddd65ce658150551f740bf91e [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 Tanousdbd37e02024-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 Tanousdbd37e02024-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 Tanousdbd37e02024-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 Tanousdbd37e02024-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 Tanousdbd37e02024-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 },
52 ],
53 },
54 {
55 id: 'hardware-status',
Ed Tanousdbd37e02024-03-23 14:56:34 -070056 label: i18n.global.t('appNavigation.hardwareStatus'),
Sandeepa Singh7affc522021-07-06 16:29:10 +053057 icon: 'iconHealth',
58 children: [
59 {
60 id: 'inventory',
Ed Tanousdbd37e02024-03-23 14:56:34 -070061 label: i18n.global.t('appNavigation.inventory'),
Sandeepa Singh7affc522021-07-06 16:29:10 +053062 route: '/hardware-status/inventory',
Sandeepa Singh06d53862021-05-24 13:51:09 +053063 },
64 {
Yoshie Muranakad329ec82020-08-11 18:24:59 -070065 id: 'sensors',
Ed Tanousdbd37e02024-03-23 14:56:34 -070066 label: i18n.global.t('appNavigation.sensors'),
Sandeepa Singh7affc522021-07-06 16:29:10 +053067 route: '/hardware-status/sensors',
Derick Montague602e98a2020-10-21 16:20:00 -050068 },
69 ],
Yoshie Muranakad329ec82020-08-11 18:24:59 -070070 },
71 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +053072 id: 'operations',
Ed Tanousdbd37e02024-03-23 14:56:34 -070073 label: i18n.global.t('appNavigation.operations'),
Yoshie Muranakad329ec82020-08-11 18:24:59 -070074 icon: 'iconControl',
75 children: [
76 {
Derick Montagueda9f0a62021-02-14 19:21:44 -060077 id: 'factory-reset',
Ed Tanousdbd37e02024-03-23 14:56:34 -070078 label: i18n.global.t('appNavigation.factoryReset'),
Sandeepa Singh68cbbe92021-07-14 16:02:22 +053079 route: '/operations/factory-reset',
Derick Montagueda9f0a62021-02-14 19:21:44 -060080 },
81 {
Yoshie Muranakad329ec82020-08-11 18:24:59 -070082 id: 'kvm',
Ed Tanousdbd37e02024-03-23 14:56:34 -070083 label: i18n.global.t('appNavigation.kvm'),
Sandeepa Singh68cbbe92021-07-14 16:02:22 +053084 route: '/operations/kvm',
85 },
86 {
Sandeepa Singh05887b52022-01-10 19:19:36 +053087 id: 'key-clear',
Ed Tanousdbd37e02024-03-23 14:56:34 -070088 label: i18n.global.t('appNavigation.keyClear'),
Sandeepa Singh05887b52022-01-10 19:19:36 +053089 route: '/operations/key-clear',
90 },
91 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +053092 id: 'firmware',
Ed Tanousdbd37e02024-03-23 14:56:34 -070093 label: i18n.global.t('appNavigation.firmware'),
Sandeepa Singh68cbbe92021-07-14 16:02:22 +053094 route: '/operations/firmware',
Yoshie Muranakad329ec82020-08-11 18:24:59 -070095 },
96 {
Yoshie Muranakad329ec82020-08-11 18:24:59 -070097 id: 'reboot-bmc',
Ed Tanousdbd37e02024-03-23 14:56:34 -070098 label: i18n.global.t('appNavigation.rebootBmc'),
Sandeepa Singh68cbbe92021-07-14 16:02:22 +053099 route: '/operations/reboot-bmc',
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700100 },
101 {
102 id: 'serial-over-lan',
Ed Tanousdbd37e02024-03-23 14:56:34 -0700103 label: i18n.global.t('appNavigation.serialOverLan'),
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530104 route: '/operations/serial-over-lan',
Damian Celicoaeb19812022-11-24 02:00:53 +0100105 exclusiveToRoles: [roles.administrator],
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700106 },
107 {
108 id: 'server-power-operations',
Ed Tanousdbd37e02024-03-23 14:56:34 -0700109 label: i18n.global.t('appNavigation.serverPowerOperations'),
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530110 route: '/operations/server-power-operations',
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700111 },
112 {
113 id: 'virtual-media',
Ed Tanousdbd37e02024-03-23 14:56:34 -0700114 label: i18n.global.t('appNavigation.virtualMedia'),
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530115 route: '/operations/virtual-media',
Damian Celicoaeb19812022-11-24 02:00:53 +0100116 exclusiveToRoles: [roles.administrator],
Derick Montague602e98a2020-10-21 16:20:00 -0500117 },
118 ],
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700119 },
120 {
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530121 id: 'settings',
Ed Tanousdbd37e02024-03-23 14:56:34 -0700122 label: i18n.global.t('appNavigation.settings'),
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530123 icon: 'iconSettings',
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700124 children: [
125 {
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530126 id: 'date-time',
Ed Tanousdbd37e02024-03-23 14:56:34 -0700127 label: i18n.global.t('appNavigation.dateTime'),
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530128 route: '/settings/date-time',
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700129 },
130 {
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530131 id: 'network',
Ed Tanousdbd37e02024-03-23 14:56:34 -0700132 label: i18n.global.t('appNavigation.network'),
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530133 route: '/settings/network',
134 },
135 {
136 id: 'power-restore-policy',
Ed Tanousdbd37e02024-03-23 14:56:34 -0700137 label: i18n.global.t('appNavigation.powerRestorePolicy'),
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530138 route: '/settings/power-restore-policy',
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700139 },
Konstantin Aladyshev7c1cfe72023-05-16 09:03:25 +0000140 {
141 id: 'snmp-alerts',
Ed Tanousdbd37e02024-03-23 14:56:34 -0700142 label: i18n.global.t('appNavigation.snmpAlerts'),
Konstantin Aladyshev7c1cfe72023-05-16 09:03:25 +0000143 route: '/settings/snmp-alerts',
144 },
Derick Montague602e98a2020-10-21 16:20:00 -0500145 ],
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700146 },
147 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530148 id: 'security-and-access',
Ed Tanousdbd37e02024-03-23 14:56:34 -0700149 label: i18n.global.t('appNavigation.securityAndAccess'),
Sandeepa Singhb4406162021-07-26 15:05:39 +0530150 icon: 'iconSecurityAndAccess',
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700151 children: [
152 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530153 id: 'sessions',
Ed Tanousdbd37e02024-03-23 14:56:34 -0700154 label: i18n.global.t('appNavigation.sessions'),
Sandeepa Singhb4406162021-07-26 15:05:39 +0530155 route: '/security-and-access/sessions',
Sukanya Pandey34efde22020-12-02 19:04:09 +0530156 },
157 {
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700158 id: 'ldap',
Ed Tanousdbd37e02024-03-23 14:56:34 -0700159 label: i18n.global.t('appNavigation.ldap'),
Sandeepa Singhb4406162021-07-26 15:05:39 +0530160 route: '/security-and-access/ldap',
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700161 },
162 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530163 id: 'user-management',
Ed Tanousdbd37e02024-03-23 14:56:34 -0700164 label: i18n.global.t('appNavigation.userManagement'),
Sandeepa Singhb4406162021-07-26 15:05:39 +0530165 route: '/security-and-access/user-management',
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700166 },
167 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530168 id: 'policies',
Ed Tanousdbd37e02024-03-23 14:56:34 -0700169 label: i18n.global.t('appNavigation.policies'),
Sandeepa Singhb4406162021-07-26 15:05:39 +0530170 route: '/security-and-access/policies',
171 },
172 {
173 id: 'certificates',
Ed Tanousdbd37e02024-03-23 14:56:34 -0700174 label: i18n.global.t('appNavigation.certificates'),
Sandeepa Singhb4406162021-07-26 15:05:39 +0530175 route: '/security-and-access/certificates',
Derick Montague602e98a2020-10-21 16:20:00 -0500176 },
177 ],
178 },
Sandeepa Singh6dba4be2021-07-28 15:25:14 +0530179 {
180 id: 'resource-management',
Ed Tanousdbd37e02024-03-23 14:56:34 -0700181 label: i18n.global.t('appNavigation.resourceManagement'),
Sandeepa Singh6dba4be2021-07-28 15:25:14 +0530182 icon: 'iconResourceManagement',
183 children: [
184 {
185 id: 'power',
Ed Tanousdbd37e02024-03-23 14:56:34 -0700186 label: i18n.global.t('appNavigation.power'),
Sandeepa Singh6dba4be2021-07-28 15:25:14 +0530187 route: '/resource-management/power',
188 },
189 ],
190 },
Derick Montague602e98a2020-10-21 16:20:00 -0500191 ],
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700192 };
Derick Montague602e98a2020-10-21 16:20:00 -0500193 },
Yoshie Muranakad329ec82020-08-11 18:24:59 -0700194};
195
196export default AppNavigationMixin;