summaryrefslogtreecommitdiff
path: root/src/env/components/AppNavigation
diff options
context:
space:
mode:
authorSandeepa Singh <sandeepa.singh@ibm.com>2022-01-10 16:49:36 +0300
committerDixsie Wolmers <dixsiew@gmail.com>2022-02-04 17:21:05 +0300
commit05887b50f1d1b08468b401b357faf13f505ee75f (patch)
tree9a016ca5142e43e3ac7f88ecce045048270fcaa0 /src/env/components/AppNavigation
parentaee27141f4c002306e9a4bf44dc4f9618a5fae62 (diff)
downloadwebui-vue-05887b50f1d1b08468b401b357faf13f505ee75f.tar.xz
Add Key clear page under Operations section
This page will allow privileged user to clear encrypted keys. - Only admin and CE login user will be able to see the page - The UI will be different for both, admin and CE login user(service) - This page is IBM only Signed-off-by: Sandeepa Singh <sandeepa.singh@ibm.com> Change-Id: Ic6fe3454de815629a6b2250daa99ab21f2b316c3
Diffstat (limited to 'src/env/components/AppNavigation')
-rw-r--r--src/env/components/AppNavigation/ibm.js69
1 files changed, 42 insertions, 27 deletions
diff --git a/src/env/components/AppNavigation/ibm.js b/src/env/components/AppNavigation/ibm.js
index 32f5c9f4..ed84e17a 100644
--- a/src/env/components/AppNavigation/ibm.js
+++ b/src/env/components/AppNavigation/ibm.js
@@ -70,33 +70,7 @@ const AppNavigationMixin = {
id: 'operations',
label: this.$t('appNavigation.operations'),
icon: 'iconControl',
- children: [
- {
- id: 'factory-reset',
- label: this.$t('appNavigation.factoryReset'),
- route: '/operations/factory-reset',
- },
- {
- id: 'firmware',
- label: this.$t('appNavigation.firmware'),
- route: '/operations/firmware',
- },
- {
- id: 'reboot-bmc',
- label: this.$t('appNavigation.rebootBmc'),
- route: '/operations/reboot-bmc',
- },
- {
- id: 'serial-over-lan',
- label: this.$t('appNavigation.serialOverLan'),
- route: '/operations/serial-over-lan',
- },
- {
- id: 'server-power-operations',
- label: this.$t('appNavigation.serverPowerOperations'),
- route: '/operations/server-power-operations',
- },
- ],
+ children: this.operationsNavigationItems(),
},
{
id: 'settings',
@@ -167,6 +141,47 @@ const AppNavigationMixin = {
],
};
},
+ methods: {
+ operationsNavigationItems() {
+ const username = this.$store.getters['global/username'];
+ let operationNavigationItems = [
+ {
+ id: 'factory-reset',
+ label: this.$t('appNavigation.factoryReset'),
+ route: '/operations/factory-reset',
+ },
+ {
+ id: 'firmware',
+ label: this.$t('appNavigation.firmware'),
+ route: '/operations/firmware',
+ },
+ {
+ id: 'reboot-bmc',
+ label: this.$t('appNavigation.rebootBmc'),
+ route: '/operations/reboot-bmc',
+ },
+ {
+ id: 'serial-over-lan',
+ label: this.$t('appNavigation.serialOverLan'),
+ route: '/operations/serial-over-lan',
+ },
+ {
+ id: 'server-power-operations',
+ label: this.$t('appNavigation.serverPowerOperations'),
+ route: '/operations/server-power-operations',
+ },
+ ];
+ let pageKeyClear = {
+ id: 'key-clear',
+ label: this.$t('appNavigation.keyClear'),
+ route: '/operations/key-clear',
+ };
+ if (username === 'service' || username === 'admin') {
+ operationNavigationItems.splice(2, 0, pageKeyClear);
+ }
+ return operationNavigationItems;
+ },
+ },
};
export default AppNavigationMixin;