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'; |
Damian Celico | aeb1981 | 2022-11-24 02:00:53 +0100 | [diff] [blame] | 9 | const roles = { |
| 10 | administrator: 'Administrator', |
| 11 | operator: 'Operator', |
| 12 | readonly: 'ReadOnly', |
| 13 | noaccess: 'NoAccess', |
| 14 | }; |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 15 | |
| 16 | const AppNavigationMixin = { |
| 17 | components: { |
Derick Montague | 828dda9 | 2021-06-28 15:52:22 -0500 | [diff] [blame] | 18 | iconOverview: IconDashboard, |
| 19 | iconLogs: IconTextLinkAnalysis, |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 20 | iconHealth: IconDataCheck, |
| 21 | iconControl: IconSettingsAdjust, |
Sandeepa Singh | f67f769 | 2021-07-19 18:04:18 +0530 | [diff] [blame] | 22 | iconSettings: IconSettings, |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 23 | iconSecurityAndAccess: IconSecurity, |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 24 | iconExpand: IconChevronUp, |
Sandeepa Singh | 6dba4be | 2021-07-28 15:25:14 +0530 | [diff] [blame] | 25 | iconResourceManagement: IconDataBase, |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 26 | }, |
| 27 | data() { |
| 28 | return { |
| 29 | navigationItems: [ |
| 30 | { |
| 31 | id: 'overview', |
| 32 | label: this.$t('appNavigation.overview'), |
| 33 | route: '/', |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 34 | icon: 'iconOverview', |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 35 | }, |
| 36 | { |
Derick Montague | 828dda9 | 2021-06-28 15:52:22 -0500 | [diff] [blame] | 37 | id: 'logs', |
| 38 | label: this.$t('appNavigation.logs'), |
| 39 | icon: 'iconLogs', |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 40 | children: [ |
| 41 | { |
| 42 | id: 'event-logs', |
| 43 | label: this.$t('appNavigation.eventLogs'), |
Derick Montague | 828dda9 | 2021-06-28 15:52:22 -0500 | [diff] [blame] | 44 | route: '/logs/event-logs', |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 45 | }, |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 46 | { |
Sandeepa Singh | 06d5386 | 2021-05-24 13:51:09 +0530 | [diff] [blame] | 47 | id: 'post-code-logs', |
| 48 | label: this.$t('appNavigation.postCodeLogs'), |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 49 | 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 Singh | 06d5386 | 2021-05-24 13:51:09 +0530 | [diff] [blame] | 62 | }, |
| 63 | { |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 64 | id: 'sensors', |
| 65 | label: this.$t('appNavigation.sensors'), |
Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 66 | route: '/hardware-status/sensors', |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 67 | }, |
| 68 | ], |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 69 | }, |
| 70 | { |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 71 | id: 'operations', |
| 72 | label: this.$t('appNavigation.operations'), |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 73 | icon: 'iconControl', |
| 74 | children: [ |
| 75 | { |
Derick Montague | da9f0a6 | 2021-02-14 19:21:44 -0600 | [diff] [blame] | 76 | id: 'factory-reset', |
| 77 | label: this.$t('appNavigation.factoryReset'), |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 78 | route: '/operations/factory-reset', |
Derick Montague | da9f0a6 | 2021-02-14 19:21:44 -0600 | [diff] [blame] | 79 | }, |
| 80 | { |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 81 | id: 'kvm', |
| 82 | label: this.$t('appNavigation.kvm'), |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 83 | route: '/operations/kvm', |
| 84 | }, |
| 85 | { |
Sandeepa Singh | 05887b5 | 2022-01-10 19:19:36 +0530 | [diff] [blame] | 86 | id: 'key-clear', |
| 87 | label: this.$t('appNavigation.keyClear'), |
| 88 | route: '/operations/key-clear', |
| 89 | }, |
| 90 | { |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 91 | id: 'firmware', |
| 92 | label: this.$t('appNavigation.firmware'), |
| 93 | route: '/operations/firmware', |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 94 | }, |
| 95 | { |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 96 | id: 'reboot-bmc', |
| 97 | label: this.$t('appNavigation.rebootBmc'), |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 98 | route: '/operations/reboot-bmc', |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 99 | }, |
| 100 | { |
| 101 | id: 'serial-over-lan', |
| 102 | label: this.$t('appNavigation.serialOverLan'), |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 103 | route: '/operations/serial-over-lan', |
Damian Celico | aeb1981 | 2022-11-24 02:00:53 +0100 | [diff] [blame] | 104 | exclusiveToRoles: [roles.administrator], |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 105 | }, |
| 106 | { |
| 107 | id: 'server-power-operations', |
| 108 | label: this.$t('appNavigation.serverPowerOperations'), |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 109 | route: '/operations/server-power-operations', |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 110 | }, |
| 111 | { |
| 112 | id: 'virtual-media', |
| 113 | label: this.$t('appNavigation.virtualMedia'), |
Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 114 | route: '/operations/virtual-media', |
Damian Celico | aeb1981 | 2022-11-24 02:00:53 +0100 | [diff] [blame] | 115 | exclusiveToRoles: [roles.administrator], |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 116 | }, |
| 117 | ], |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 118 | }, |
| 119 | { |
Sandeepa Singh | f67f769 | 2021-07-19 18:04:18 +0530 | [diff] [blame] | 120 | id: 'settings', |
| 121 | label: this.$t('appNavigation.settings'), |
| 122 | icon: 'iconSettings', |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 123 | children: [ |
| 124 | { |
Sandeepa Singh | f67f769 | 2021-07-19 18:04:18 +0530 | [diff] [blame] | 125 | id: 'date-time', |
| 126 | label: this.$t('appNavigation.dateTime'), |
| 127 | route: '/settings/date-time', |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 128 | }, |
| 129 | { |
Sandeepa Singh | f67f769 | 2021-07-19 18:04:18 +0530 | [diff] [blame] | 130 | 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 Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 138 | }, |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 139 | ], |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 140 | }, |
| 141 | { |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 142 | id: 'security-and-access', |
| 143 | label: this.$t('appNavigation.securityAndAccess'), |
| 144 | icon: 'iconSecurityAndAccess', |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 145 | children: [ |
| 146 | { |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 147 | id: 'sessions', |
| 148 | label: this.$t('appNavigation.sessions'), |
| 149 | route: '/security-and-access/sessions', |
Sukanya Pandey | 34efde2 | 2020-12-02 19:04:09 +0530 | [diff] [blame] | 150 | }, |
| 151 | { |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 152 | id: 'ldap', |
| 153 | label: this.$t('appNavigation.ldap'), |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 154 | route: '/security-and-access/ldap', |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 155 | }, |
| 156 | { |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 157 | id: 'user-management', |
| 158 | label: this.$t('appNavigation.userManagement'), |
| 159 | route: '/security-and-access/user-management', |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 160 | }, |
| 161 | { |
Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 162 | 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 Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 170 | }, |
| 171 | ], |
| 172 | }, |
Sandeepa Singh | 6dba4be | 2021-07-28 15:25:14 +0530 | [diff] [blame] | 173 | { |
| 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 Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 185 | ], |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 186 | }; |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 187 | }, |
Yoshie Muranaka | d329ec8 | 2020-08-11 18:24:59 -0700 | [diff] [blame] | 188 | }; |
| 189 | |
| 190 | export default AppNavigationMixin; |