1import IconDashboard from '@carbon/icons-vue/es/dashboard/16'; 2import IconTextLinkAnalysis from '@carbon/icons-vue/es/text-link--analysis/16'; 3import 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'; 6import IconSecurity from '@carbon/icons-vue/es/security/16'; 7import IconChevronUp from '@carbon/icons-vue/es/chevron--up/16'; 8import IconDataBase from '@carbon/icons-vue/es/data--base--alt/16'; 9 10const roles = { 11 administrator: 'Administrator', 12 operator: 'Operator', 13 readonly: 'ReadOnly', 14 noaccess: 'NoAccess', 15}; 16 17const AppNavigationMixin = { 18 components: { 19 iconOverview: IconDashboard, 20 iconLogs: IconTextLinkAnalysis, 21 iconHealth: IconDataCheck, 22 iconControl: IconSettingsAdjust, 23 iconSettings: IconSettings, 24 iconSecurityAndAccess: IconSecurity, 25 iconExpand: IconChevronUp, 26 iconResourceManagement: IconDataBase, 27 }, 28 data() { 29 return { 30 navigationItems: [ 31 { 32 id: 'overview', 33 label: this.$t('appNavigation.overview'), 34 route: '/', 35 icon: 'iconOverview', 36 }, 37 { 38 id: 'logs', 39 label: this.$t('appNavigation.logs'), 40 icon: 'iconLogs', 41 children: [ 42 { 43 id: 'event-logs', 44 label: this.$t('appNavigation.eventLogs'), 45 route: '/logs/event-logs', 46 }, 47 { 48 id: 'post-code-logs', 49 label: this.$t('appNavigation.postCodeLogs'), 50 route: '/logs/post-code-logs', 51 }, 52 ], 53 }, 54 { 55 id: 'hardware-status', 56 label: this.$t('appNavigation.hardwareStatus'), 57 icon: 'iconHealth', 58 children: [ 59 { 60 id: 'inventory', 61 label: this.$t('appNavigation.inventory'), 62 route: '/hardware-status/inventory', 63 }, 64 { 65 id: 'sensors', 66 label: this.$t('appNavigation.sensors'), 67 route: '/hardware-status/sensors', 68 }, 69 ], 70 }, 71 { 72 id: 'operations', 73 label: this.$t('appNavigation.operations'), 74 icon: 'iconControl', 75 children: [ 76 { 77 id: 'kvm', 78 label: this.$t('appNavigation.kvm'), 79 route: '/operations/kvm', 80 }, 81 { 82 id: 'firmware', 83 label: this.$t('appNavigation.firmware'), 84 route: '/operations/firmware', 85 }, 86 { 87 id: 'reboot-bmc', 88 label: this.$t('appNavigation.rebootBmc'), 89 route: '/operations/reboot-bmc', 90 }, 91 { 92 id: 'serial-over-lan', 93 label: this.$t('appNavigation.serialOverLan'), 94 route: '/operations/serial-over-lan', 95 exclusiveToRoles: [roles.administrator], 96 }, 97 { 98 id: 'server-power-operations', 99 label: this.$t('appNavigation.serverPowerOperations'), 100 route: '/operations/server-power-operations', 101 }, 102 { 103 id: 'virtual-media', 104 label: this.$t('appNavigation.virtualMedia'), 105 route: '/operations/virtual-media', 106 exclusiveToRoles: [roles.administrator], 107 }, 108 ], 109 }, 110 { 111 id: 'settings', 112 label: this.$t('appNavigation.settings'), 113 icon: 'iconSettings', 114 children: [ 115 { 116 id: 'date-time', 117 label: this.$t('appNavigation.dateTime'), 118 route: '/settings/date-time', 119 }, 120 { 121 id: 'network', 122 label: this.$t('appNavigation.network'), 123 route: '/settings/network', 124 }, 125 ], 126 }, 127 { 128 id: 'security-and-access', 129 label: this.$t('appNavigation.securityAndAccess'), 130 icon: 'iconSecurityAndAccess', 131 children: [ 132 { 133 id: 'sessions', 134 label: this.$t('appNavigation.sessions'), 135 route: '/security-and-access/sessions', 136 }, 137 { 138 id: 'user-management', 139 label: this.$t('appNavigation.userManagement'), 140 route: '/security-and-access/user-management', 141 }, 142 { 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', 151 }, 152 ], 153 }, 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 }, 166 ], 167 }; 168 }, 169}; 170 171export default AppNavigationMixin; 172