diff options
Diffstat (limited to 'src/env')
-rw-r--r-- | src/env/components/AppNavigation/ibm.js | 69 | ||||
-rw-r--r-- | src/env/router/ibm.js | 9 | ||||
-rw-r--r-- | src/env/store/ibm.js | 3 |
3 files changed, 54 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; diff --git a/src/env/router/ibm.js b/src/env/router/ibm.js index c6ac61f7..0ccf90ba 100644 --- a/src/env/router/ibm.js +++ b/src/env/router/ibm.js @@ -19,6 +19,7 @@ import PowerRestorePolicy from '@/views/Settings/PowerRestorePolicy'; import ProfileSettings from '@/views/ProfileSettings'; import RebootBmc from '@/views/Operations/RebootBmc'; import Policies from '@/views/SecurityAndAccess/Policies'; +import KeyClear from '@/views/Operations/KeyClear'; import Sensors from '@/views/HardwareStatus/Sensors'; import SerialOverLan from '@/views/Operations/SerialOverLan'; import SerialOverLanConsole from '@/views/Operations/SerialOverLan/SerialOverLanConsole'; @@ -223,6 +224,14 @@ const routes = [ }, }, { + path: '/operations/key-clear', + name: 'key-clear', + component: KeyClear, + meta: { + title: i18n.t('appPageTitle.keyClear'), + }, + }, + { path: '/operations/reboot-bmc', name: 'reboot-bmc', component: RebootBmc, diff --git a/src/env/store/ibm.js b/src/env/store/ibm.js index 787f8975..86fc52d1 100644 --- a/src/env/store/ibm.js +++ b/src/env/store/ibm.js @@ -1,8 +1,11 @@ import store from '@/store'; import DumpsStore from '@/store/modules/Logs/DumpsStore'; +import KeyClearStore from '@/store/modules/Operations/KeyClearStore'; store.unregisterModule('virtualMedia'); store.registerModule('dumps', DumpsStore); +store.registerModule('key-clear', KeyClearStore); + export default store; |