Derick Montague | 828dda9 | 2021-06-28 15:52:22 -0500 | [diff] [blame] | 1 | import IconDashboard from '@carbon/icons-vue/es/dashboard/16'; |
| 2 | import IconTextLinkAnalysis from '@carbon/icons-vue/es/text-link--analysis/16'; |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 3 | import IconDataCheck from '@carbon/icons-vue/es/data--check/16'; |
| 4 | import IconSettingsAdjust from '@carbon/icons-vue/es/settings--adjust/16'; |
| 5 | import IconSettings from '@carbon/icons-vue/es/settings/16'; |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 6 | import IconSecurity from '@carbon/icons-vue/es/security/16'; |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 7 | import IconChevronUp from '@carbon/icons-vue/es/chevron--up/16'; |
Sandeepa Singh | 6dba4be | 2021-07-28 15:25:14 +0530 | [diff] [blame] | 8 | import IconDataBase from '@carbon/icons-vue/es/data--base--alt/16'; |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 9 | import i18n from '@/i18n'; |
Damian Celico | aeb1981 | 2022-11-24 02:00:53 +0100 | [diff] [blame] | 10 | const roles = { |
| 11 | administrator: 'Administrator', |
| 12 | operator: 'Operator', |
| 13 | readonly: 'ReadOnly', |
| 14 | noaccess: 'NoAccess', |
| 15 | }; |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 16 | |
| 17 | const AppNavigationMixin = { |
| 18 | components: { |
Derick Montague | 828dda9 | 2021-06-28 15:52:22 -0500 | [diff] [blame] | 19 | iconOverview: IconDashboard, |
| 20 | iconLogs: IconTextLinkAnalysis, |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 21 | iconHealth: IconDataCheck, |
| 22 | iconControl: IconSettingsAdjust, |
Sandeepa Singh | f67f769 | 2021-07-19 18:04:18 +0530 | [diff] [blame] | 23 | iconSettings: IconSettings, |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 24 | iconSecurityAndAccess: IconSecurity, |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 25 | iconExpand: IconChevronUp, |
Sandeepa Singh | 6dba4be | 2021-07-28 15:25:14 +0530 | [diff] [blame] | 26 | iconResourceManagement: IconDataBase, |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 27 | }, |
| 28 | data() { |
| 29 | return { |
| 30 | navigationItems: [ |
| 31 | { |
| 32 | id: 'overview', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 33 | label: i18n.global.t('appNavigation.overview'), |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 34 | route: '/', |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 35 | icon: 'iconOverview', |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 36 | }, |
| 37 | { |
Derick Montague | 828dda9 | 2021-06-28 15:52:22 -0500 | [diff] [blame] | 38 | id: 'logs', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 39 | label: i18n.global.t('appNavigation.logs'), |
Derick Montague | 828dda9 | 2021-06-28 15:52:22 -0500 | [diff] [blame] | 40 | icon: 'iconLogs', |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 41 | children: [ |
| 42 | { |
| 43 | id: 'event-logs', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 44 | label: i18n.global.t('appNavigation.eventLogs'), |
Derick Montague | 828dda9 | 2021-06-28 15:52:22 -0500 | [diff] [blame] | 45 | route: '/logs/event-logs', |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 46 | }, |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 47 | { |
Sandeepa Singh | 06d5386 | 2021-05-24 13:51:09 +0530 | [diff] [blame] | 48 | id: 'post-code-logs', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 49 | label: i18n.global.t('appNavigation.postCodeLogs'), |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 50 | route: '/logs/post-code-logs', |
| 51 | }, |
| 52 | ], |
| 53 | }, |
| 54 | { |
| 55 | id: 'hardware-status', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 56 | label: i18n.global.t('appNavigation.hardwareStatus'), |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 57 | icon: 'iconHealth', |
| 58 | children: [ |
| 59 | { |
| 60 | id: 'inventory', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 61 | label: i18n.global.t('appNavigation.inventory'), |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 62 | route: '/hardware-status/inventory', |
Sandeepa Singh | 06d5386 | 2021-05-24 13:51:09 +0530 | [diff] [blame] | 63 | }, |
| 64 | { |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 65 | id: 'sensors', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 66 | label: i18n.global.t('appNavigation.sensors'), |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 67 | route: '/hardware-status/sensors', |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 68 | }, |
| 69 | ], |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 70 | }, |
| 71 | { |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 72 | id: 'operations', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 73 | label: i18n.global.t('appNavigation.operations'), |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 74 | icon: 'iconControl', |
| 75 | children: [ |
| 76 | { |
Derick Montague | da9f0a6 | 2021-02-14 19:21:44 -0600 | [diff] [blame] | 77 | id: 'factory-reset', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 78 | label: i18n.global.t('appNavigation.factoryReset'), |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 79 | route: '/operations/factory-reset', |
Derick Montague | da9f0a6 | 2021-02-14 19:21:44 -0600 | [diff] [blame] | 80 | }, |
| 81 | { |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 82 | id: 'kvm', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 83 | label: i18n.global.t('appNavigation.kvm'), |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 84 | route: '/operations/kvm', |
| 85 | }, |
| 86 | { |
Sandeepa Singh | 05887b5 | 2022-01-10 19:19:36 +0530 | [diff] [blame] | 87 | id: 'key-clear', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 88 | label: i18n.global.t('appNavigation.keyClear'), |
Sandeepa Singh | 05887b5 | 2022-01-10 19:19:36 +0530 | [diff] [blame] | 89 | route: '/operations/key-clear', |
| 90 | }, |
| 91 | { |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 92 | id: 'firmware', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 93 | label: i18n.global.t('appNavigation.firmware'), |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 94 | route: '/operations/firmware', |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 95 | }, |
| 96 | { |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 97 | id: 'reboot-bmc', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 98 | label: i18n.global.t('appNavigation.rebootBmc'), |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 99 | route: '/operations/reboot-bmc', |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 100 | }, |
| 101 | { |
| 102 | id: 'serial-over-lan', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 103 | label: i18n.global.t('appNavigation.serialOverLan'), |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 104 | route: '/operations/serial-over-lan', |
Damian Celico | aeb1981 | 2022-11-24 02:00:53 +0100 | [diff] [blame] | 105 | exclusiveToRoles: [roles.administrator], |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 106 | }, |
| 107 | { |
| 108 | id: 'server-power-operations', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 109 | label: i18n.global.t('appNavigation.serverPowerOperations'), |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 110 | route: '/operations/server-power-operations', |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 111 | }, |
| 112 | { |
| 113 | id: 'virtual-media', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 114 | label: i18n.global.t('appNavigation.virtualMedia'), |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 115 | route: '/operations/virtual-media', |
Damian Celico | aeb1981 | 2022-11-24 02:00:53 +0100 | [diff] [blame] | 116 | exclusiveToRoles: [roles.administrator], |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 117 | }, |
| 118 | ], |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 119 | }, |
| 120 | { |
Sandeepa Singh | f67f769 | 2021-07-19 18:04:18 +0530 | [diff] [blame] | 121 | id: 'settings', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 122 | label: i18n.global.t('appNavigation.settings'), |
Sandeepa Singh | f67f769 | 2021-07-19 18:04:18 +0530 | [diff] [blame] | 123 | icon: 'iconSettings', |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 124 | children: [ |
| 125 | { |
Sandeepa Singh | f67f769 | 2021-07-19 18:04:18 +0530 | [diff] [blame] | 126 | id: 'date-time', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 127 | label: i18n.global.t('appNavigation.dateTime'), |
Sandeepa Singh | f67f769 | 2021-07-19 18:04:18 +0530 | [diff] [blame] | 128 | route: '/settings/date-time', |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 129 | }, |
| 130 | { |
Sandeepa Singh | f67f769 | 2021-07-19 18:04:18 +0530 | [diff] [blame] | 131 | id: 'network', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 132 | label: i18n.global.t('appNavigation.network'), |
Sandeepa Singh | f67f769 | 2021-07-19 18:04:18 +0530 | [diff] [blame] | 133 | route: '/settings/network', |
| 134 | }, |
| 135 | { |
| 136 | id: 'power-restore-policy', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 137 | label: i18n.global.t('appNavigation.powerRestorePolicy'), |
Sandeepa Singh | f67f769 | 2021-07-19 18:04:18 +0530 | [diff] [blame] | 138 | route: '/settings/power-restore-policy', |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 139 | }, |
Konstantin Aladyshev | 7c1cfe7 | 2023-05-16 09:03:25 +0000 | [diff] [blame] | 140 | { |
| 141 | id: 'snmp-alerts', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 142 | label: i18n.global.t('appNavigation.snmpAlerts'), |
Konstantin Aladyshev | 7c1cfe7 | 2023-05-16 09:03:25 +0000 | [diff] [blame] | 143 | route: '/settings/snmp-alerts', |
| 144 | }, |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 145 | ], |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 146 | }, |
| 147 | { |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 148 | id: 'security-and-access', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 149 | label: i18n.global.t('appNavigation.securityAndAccess'), |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 150 | icon: 'iconSecurityAndAccess', |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 151 | children: [ |
| 152 | { |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 153 | id: 'sessions', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 154 | label: i18n.global.t('appNavigation.sessions'), |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 155 | route: '/security-and-access/sessions', |
Sukanya Pandey | 34efde2 | 2020-12-02 19:04:09 +0530 | [diff] [blame] | 156 | }, |
| 157 | { |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 158 | id: 'ldap', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 159 | label: i18n.global.t('appNavigation.ldap'), |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 160 | route: '/security-and-access/ldap', |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 161 | }, |
| 162 | { |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 163 | id: 'user-management', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 164 | label: i18n.global.t('appNavigation.userManagement'), |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 165 | route: '/security-and-access/user-management', |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 166 | }, |
| 167 | { |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 168 | id: 'policies', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 169 | label: i18n.global.t('appNavigation.policies'), |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 170 | route: '/security-and-access/policies', |
| 171 | }, |
| 172 | { |
| 173 | id: 'certificates', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 174 | label: i18n.global.t('appNavigation.certificates'), |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 175 | route: '/security-and-access/certificates', |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 176 | }, |
| 177 | ], |
| 178 | }, |
Sandeepa Singh | 6dba4be | 2021-07-28 15:25:14 +0530 | [diff] [blame] | 179 | { |
| 180 | id: 'resource-management', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 181 | label: i18n.global.t('appNavigation.resourceManagement'), |
Sandeepa Singh | 6dba4be | 2021-07-28 15:25:14 +0530 | [diff] [blame] | 182 | icon: 'iconResourceManagement', |
| 183 | children: [ |
| 184 | { |
| 185 | id: 'power', |
Ed Tanous | dbd37e0 | 2024-03-23 14:56:34 -0700 | [diff] [blame] | 186 | label: i18n.global.t('appNavigation.power'), |
Sandeepa Singh | 6dba4be | 2021-07-28 15:25:14 +0530 | [diff] [blame] | 187 | route: '/resource-management/power', |
| 188 | }, |
| 189 | ], |
| 190 | }, |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 191 | ], |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 192 | }; |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 193 | }, |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 194 | }; |
| 195 | |
| 196 | export default AppNavigationMixin; |