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