| 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'; | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [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'; | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [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'; | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [diff] [blame] | 9 |  | 
| 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 | }; | 
|  | 16 |  | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [diff] [blame] | 17 | const AppNavigationMixin = { | 
|  | 18 | components: { | 
| Derick Montague | 828dda9 | 2021-06-28 15:52:22 -0500 | [diff] [blame] | 19 | iconOverview: IconDashboard, | 
|  | 20 | iconLogs: IconTextLinkAnalysis, | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [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, | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [diff] [blame] | 25 | iconExpand: IconChevronUp, | 
| Sandeepa Singh | 6dba4be | 2021-07-28 15:25:14 +0530 | [diff] [blame] | 26 | iconResourceManagement: IconDataBase, | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [diff] [blame] | 27 | }, | 
|  | 28 | data() { | 
|  | 29 | return { | 
|  | 30 | navigationItems: [ | 
|  | 31 | { | 
|  | 32 | id: 'overview', | 
|  | 33 | label: this.$t('appNavigation.overview'), | 
|  | 34 | route: '/', | 
|  | 35 | icon: 'iconOverview', | 
|  | 36 | }, | 
|  | 37 | { | 
| Derick Montague | 828dda9 | 2021-06-28 15:52:22 -0500 | [diff] [blame] | 38 | id: 'logs', | 
|  | 39 | label: this.$t('appNavigation.logs'), | 
|  | 40 | icon: 'iconLogs', | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [diff] [blame] | 41 | children: [ | 
|  | 42 | { | 
|  | 43 | id: 'event-logs', | 
|  | 44 | label: this.$t('appNavigation.eventLogs'), | 
| Derick Montague | 828dda9 | 2021-06-28 15:52:22 -0500 | [diff] [blame] | 45 | route: '/logs/event-logs', | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [diff] [blame] | 46 | }, | 
| MichalX Szopinski | 2a2e102 | 2021-11-05 15:54:29 +0100 | [diff] [blame] | 47 | { | 
|  | 48 | id: 'post-code-logs', | 
|  | 49 | label: this.$t('appNavigation.postCodeLogs'), | 
|  | 50 | route: '/logs/post-code-logs', | 
|  | 51 | }, | 
| Derick Montague | 828dda9 | 2021-06-28 15:52:22 -0500 | [diff] [blame] | 52 | ], | 
|  | 53 | }, | 
|  | 54 | { | 
| Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 55 | id: 'hardware-status', | 
|  | 56 | label: this.$t('appNavigation.hardwareStatus'), | 
| Derick Montague | 828dda9 | 2021-06-28 15:52:22 -0500 | [diff] [blame] | 57 | icon: 'iconHealth', | 
|  | 58 | children: [ | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [diff] [blame] | 59 | { | 
| Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 60 | id: 'inventory', | 
|  | 61 | label: this.$t('appNavigation.inventory'), | 
|  | 62 | route: '/hardware-status/inventory', | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [diff] [blame] | 63 | }, | 
|  | 64 | { | 
|  | 65 | id: 'sensors', | 
|  | 66 | label: this.$t('appNavigation.sensors'), | 
| Sandeepa Singh | 7affc52 | 2021-07-06 16:29:10 +0530 | [diff] [blame] | 67 | route: '/hardware-status/sensors', | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [diff] [blame] | 68 | }, | 
|  | 69 | ], | 
|  | 70 | }, | 
|  | 71 | { | 
| Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 72 | id: 'operations', | 
|  | 73 | label: this.$t('appNavigation.operations'), | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [diff] [blame] | 74 | icon: 'iconControl', | 
|  | 75 | children: [ | 
|  | 76 | { | 
|  | 77 | id: 'kvm', | 
|  | 78 | label: this.$t('appNavigation.kvm'), | 
| Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 79 | route: '/operations/kvm', | 
|  | 80 | }, | 
|  | 81 | { | 
|  | 82 | id: 'firmware', | 
|  | 83 | label: this.$t('appNavigation.firmware'), | 
|  | 84 | route: '/operations/firmware', | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [diff] [blame] | 85 | }, | 
|  | 86 | { | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [diff] [blame] | 87 | id: 'reboot-bmc', | 
|  | 88 | label: this.$t('appNavigation.rebootBmc'), | 
| Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 89 | route: '/operations/reboot-bmc', | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [diff] [blame] | 90 | }, | 
|  | 91 | { | 
|  | 92 | id: 'serial-over-lan', | 
|  | 93 | label: this.$t('appNavigation.serialOverLan'), | 
| Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 94 | route: '/operations/serial-over-lan', | 
| Damian Celico | aeb1981 | 2022-11-24 02:00:53 +0100 | [diff] [blame] | 95 | exclusiveToRoles: [roles.administrator], | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [diff] [blame] | 96 | }, | 
|  | 97 | { | 
|  | 98 | id: 'server-power-operations', | 
|  | 99 | label: this.$t('appNavigation.serverPowerOperations'), | 
| Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 100 | route: '/operations/server-power-operations', | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [diff] [blame] | 101 | }, | 
|  | 102 | { | 
|  | 103 | id: 'virtual-media', | 
|  | 104 | label: this.$t('appNavigation.virtualMedia'), | 
| Sandeepa Singh | 68cbbe9 | 2021-07-14 16:02:22 +0530 | [diff] [blame] | 105 | route: '/operations/virtual-media', | 
| Damian Celico | aeb1981 | 2022-11-24 02:00:53 +0100 | [diff] [blame] | 106 | exclusiveToRoles: [roles.administrator], | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [diff] [blame] | 107 | }, | 
|  | 108 | ], | 
|  | 109 | }, | 
|  | 110 | { | 
| Sandeepa Singh | f67f769 | 2021-07-19 18:04:18 +0530 | [diff] [blame] | 111 | id: 'settings', | 
|  | 112 | label: this.$t('appNavigation.settings'), | 
|  | 113 | icon: 'iconSettings', | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [diff] [blame] | 114 | children: [ | 
|  | 115 | { | 
| Sandeepa Singh | f67f769 | 2021-07-19 18:04:18 +0530 | [diff] [blame] | 116 | id: 'date-time', | 
|  | 117 | label: this.$t('appNavigation.dateTime'), | 
|  | 118 | route: '/settings/date-time', | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [diff] [blame] | 119 | }, | 
|  | 120 | { | 
| Sandeepa Singh | f67f769 | 2021-07-19 18:04:18 +0530 | [diff] [blame] | 121 | id: 'network', | 
|  | 122 | label: this.$t('appNavigation.network'), | 
|  | 123 | route: '/settings/network', | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [diff] [blame] | 124 | }, | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [diff] [blame] | 125 | ], | 
|  | 126 | }, | 
|  | 127 | { | 
| Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 128 | id: 'security-and-access', | 
|  | 129 | label: this.$t('appNavigation.securityAndAccess'), | 
|  | 130 | icon: 'iconSecurityAndAccess', | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [diff] [blame] | 131 | children: [ | 
|  | 132 | { | 
| Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 133 | id: 'sessions', | 
|  | 134 | label: this.$t('appNavigation.sessions'), | 
|  | 135 | route: '/security-and-access/sessions', | 
| MichalX Szopinski | d675269 | 2021-03-01 13:59:55 +0100 | [diff] [blame] | 136 | }, | 
|  | 137 | { | 
| Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 138 | id: 'user-management', | 
|  | 139 | label: this.$t('appNavigation.userManagement'), | 
|  | 140 | route: '/security-and-access/user-management', | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [diff] [blame] | 141 | }, | 
|  | 142 | { | 
| Sandeepa Singh | b440616 | 2021-07-26 15:05:39 +0530 | [diff] [blame] | 143 | id: 'policies', | 
|  | 144 | label: this.$t('appNavigation.policies'), | 
|  | 145 | route: '/security-and-access/policies', | 
|  | 146 | }, | 
|  | 147 | { | 
|  | 148 | id: 'certificates', | 
|  | 149 | label: this.$t('appNavigation.certificates'), | 
|  | 150 | route: '/security-and-access/certificates', | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [diff] [blame] | 151 | }, | 
|  | 152 | ], | 
|  | 153 | }, | 
| Sandeepa Singh | 6dba4be | 2021-07-28 15:25:14 +0530 | [diff] [blame] | 154 | { | 
|  | 155 | id: 'resource-management', | 
|  | 156 | label: this.$t('appNavigation.resourceManagement'), | 
|  | 157 | icon: 'iconResourceManagement', | 
|  | 158 | children: [ | 
|  | 159 | { | 
|  | 160 | id: 'power', | 
|  | 161 | label: this.$t('appNavigation.power'), | 
|  | 162 | route: '/resource-management/power', | 
|  | 163 | }, | 
|  | 164 | ], | 
|  | 165 | }, | 
| MichalX Szopinski | 842b5db | 2020-11-24 13:12:50 +0100 | [diff] [blame] | 166 | ], | 
|  | 167 | }; | 
|  | 168 | }, | 
|  | 169 | }; | 
|  | 170 |  | 
|  | 171 | export default AppNavigationMixin; |