blob: 0688a05e2c9c8d5fbd674ea250aa10388e368670 [file] [log] [blame]
Derick Montague828dda92021-06-28 15:52:22 -05001import IconDashboard from '@carbon/icons-vue/es/dashboard/16';
2import IconTextLinkAnalysis from '@carbon/icons-vue/es/text-link--analysis/16';
MichalX Szopinski842b5db2020-11-24 13:12:50 +01003import 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';
Sandeepa Singhb4406162021-07-26 15:05:39 +05306import IconSecurity from '@carbon/icons-vue/es/security/16';
MichalX Szopinski842b5db2020-11-24 13:12:50 +01007import IconChevronUp from '@carbon/icons-vue/es/chevron--up/16';
Sandeepa Singh6dba4be2021-07-28 15:25:14 +05308import IconDataBase from '@carbon/icons-vue/es/data--base--alt/16';
MichalX Szopinski842b5db2020-11-24 13:12:50 +01009
Damian Celicoaeb19812022-11-24 02:00:53 +010010const roles = {
11 administrator: 'Administrator',
12 operator: 'Operator',
13 readonly: 'ReadOnly',
14 noaccess: 'NoAccess',
15};
16
MichalX Szopinski842b5db2020-11-24 13:12:50 +010017const AppNavigationMixin = {
18 components: {
Derick Montague828dda92021-06-28 15:52:22 -050019 iconOverview: IconDashboard,
20 iconLogs: IconTextLinkAnalysis,
MichalX Szopinski842b5db2020-11-24 13:12:50 +010021 iconHealth: IconDataCheck,
22 iconControl: IconSettingsAdjust,
Sandeepa Singhf67f7692021-07-19 18:04:18 +053023 iconSettings: IconSettings,
Sandeepa Singhb4406162021-07-26 15:05:39 +053024 iconSecurityAndAccess: IconSecurity,
MichalX Szopinski842b5db2020-11-24 13:12:50 +010025 iconExpand: IconChevronUp,
Sandeepa Singh6dba4be2021-07-28 15:25:14 +053026 iconResourceManagement: IconDataBase,
MichalX Szopinski842b5db2020-11-24 13:12:50 +010027 },
28 data() {
29 return {
30 navigationItems: [
31 {
32 id: 'overview',
33 label: this.$t('appNavigation.overview'),
34 route: '/',
35 icon: 'iconOverview',
36 },
37 {
Derick Montague828dda92021-06-28 15:52:22 -050038 id: 'logs',
39 label: this.$t('appNavigation.logs'),
40 icon: 'iconLogs',
MichalX Szopinski842b5db2020-11-24 13:12:50 +010041 children: [
42 {
43 id: 'event-logs',
44 label: this.$t('appNavigation.eventLogs'),
Derick Montague828dda92021-06-28 15:52:22 -050045 route: '/logs/event-logs',
MichalX Szopinski842b5db2020-11-24 13:12:50 +010046 },
MichalX Szopinski2a2e1022021-11-05 15:54:29 +010047 {
48 id: 'post-code-logs',
49 label: this.$t('appNavigation.postCodeLogs'),
50 route: '/logs/post-code-logs',
51 },
Derick Montague828dda92021-06-28 15:52:22 -050052 ],
53 },
54 {
Sandeepa Singh7affc522021-07-06 16:29:10 +053055 id: 'hardware-status',
56 label: this.$t('appNavigation.hardwareStatus'),
Derick Montague828dda92021-06-28 15:52:22 -050057 icon: 'iconHealth',
58 children: [
MichalX Szopinski842b5db2020-11-24 13:12:50 +010059 {
Sandeepa Singh7affc522021-07-06 16:29:10 +053060 id: 'inventory',
61 label: this.$t('appNavigation.inventory'),
62 route: '/hardware-status/inventory',
MichalX Szopinski842b5db2020-11-24 13:12:50 +010063 },
64 {
65 id: 'sensors',
66 label: this.$t('appNavigation.sensors'),
Sandeepa Singh7affc522021-07-06 16:29:10 +053067 route: '/hardware-status/sensors',
MichalX Szopinski842b5db2020-11-24 13:12:50 +010068 },
69 ],
70 },
71 {
Sandeepa Singh68cbbe92021-07-14 16:02:22 +053072 id: 'operations',
73 label: this.$t('appNavigation.operations'),
MichalX Szopinski842b5db2020-11-24 13:12:50 +010074 icon: 'iconControl',
75 children: [
76 {
77 id: 'kvm',
78 label: this.$t('appNavigation.kvm'),
Sandeepa Singh68cbbe92021-07-14 16:02:22 +053079 route: '/operations/kvm',
80 },
81 {
82 id: 'firmware',
83 label: this.$t('appNavigation.firmware'),
84 route: '/operations/firmware',
MichalX Szopinski842b5db2020-11-24 13:12:50 +010085 },
86 {
MichalX Szopinski842b5db2020-11-24 13:12:50 +010087 id: 'reboot-bmc',
88 label: this.$t('appNavigation.rebootBmc'),
Sandeepa Singh68cbbe92021-07-14 16:02:22 +053089 route: '/operations/reboot-bmc',
MichalX Szopinski842b5db2020-11-24 13:12:50 +010090 },
91 {
92 id: 'serial-over-lan',
93 label: this.$t('appNavigation.serialOverLan'),
Sandeepa Singh68cbbe92021-07-14 16:02:22 +053094 route: '/operations/serial-over-lan',
Damian Celicoaeb19812022-11-24 02:00:53 +010095 exclusiveToRoles: [roles.administrator],
MichalX Szopinski842b5db2020-11-24 13:12:50 +010096 },
97 {
98 id: 'server-power-operations',
99 label: this.$t('appNavigation.serverPowerOperations'),
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530100 route: '/operations/server-power-operations',
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100101 },
102 {
103 id: 'virtual-media',
104 label: this.$t('appNavigation.virtualMedia'),
Sandeepa Singh68cbbe92021-07-14 16:02:22 +0530105 route: '/operations/virtual-media',
Damian Celicoaeb19812022-11-24 02:00:53 +0100106 exclusiveToRoles: [roles.administrator],
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100107 },
108 ],
109 },
110 {
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530111 id: 'settings',
112 label: this.$t('appNavigation.settings'),
113 icon: 'iconSettings',
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100114 children: [
115 {
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530116 id: 'date-time',
117 label: this.$t('appNavigation.dateTime'),
118 route: '/settings/date-time',
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100119 },
120 {
Sandeepa Singhf67f7692021-07-19 18:04:18 +0530121 id: 'network',
122 label: this.$t('appNavigation.network'),
123 route: '/settings/network',
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100124 },
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100125 ],
126 },
127 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530128 id: 'security-and-access',
129 label: this.$t('appNavigation.securityAndAccess'),
130 icon: 'iconSecurityAndAccess',
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100131 children: [
132 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530133 id: 'sessions',
134 label: this.$t('appNavigation.sessions'),
135 route: '/security-and-access/sessions',
MichalX Szopinskid6752692021-03-01 13:59:55 +0100136 },
137 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530138 id: 'user-management',
139 label: this.$t('appNavigation.userManagement'),
140 route: '/security-and-access/user-management',
MichalX Szopinski842b5db2020-11-24 13:12:50 +0100141 },
142 {
Sandeepa Singhb4406162021-07-26 15:05:39 +0530143 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 Szopinski842b5db2020-11-24 13:12:50 +0100151 },
152 ],
153 },
Sandeepa Singh6dba4be2021-07-28 15:25:14 +0530154 {
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 Szopinski842b5db2020-11-24 13:12:50 +0100166 ],
167 };
168 },
169};
170
171export default AppNavigationMixin;