-
+
@@ -22,6 +22,7 @@
import LicenseRelatedTip from './LicenseRelatedTip'
import PasswordExpireTip from './PasswordExpireTip'
import SqlQueryTip from './SqlQueryTip'
+import { mapGetters } from 'vuex'
export default {
name: 'PageHeading',
@@ -40,6 +41,9 @@ export default {
return {
debug: process.env.NODE_ENV === 'development'
}
+ },
+ computed: {
+ ...mapGetters(['inDrawer'])
}
}
diff --git a/src/layout/components/Page/index.vue b/src/layout/components/Page/index.vue
index 8b285176f..bb6549c1b 100644
--- a/src/layout/components/Page/index.vue
+++ b/src/layout/components/Page/index.vue
@@ -3,6 +3,7 @@
state.settings.hasValidLicense,
isSystemAdmin: state => state.users.profile.system_roles.some(i => (i?.id === '00000000-0000-0000-0000-000000000001')),
sqlQueryCounter: state => state.common.sqlQueryCounter,
- showSqlQueryCounter: state => state.common.showSqlQueryCounter
+ showSqlQueryCounter: state => state.common.showSqlQueryCounter,
+ inDrawer: state => state.common.inDrawer
}
export default getters
diff --git a/src/store/modules/common.js b/src/store/modules/common.js
index 6aca1b1c7..44d9da367 100644
--- a/src/store/modules/common.js
+++ b/src/store/modules/common.js
@@ -8,7 +8,8 @@ const getDefaultState = () => {
sqlQueryCounter: [],
showSqlQueryCounter: true,
confirmDialogVisible: false,
- drawerActionMeta: {}
+ drawerActionMeta: {},
+ inDrawer: false
}
}
@@ -89,12 +90,14 @@ const actions = {
},
setDrawerActionMeta({ commit, state }, meta) {
state.drawerActionMeta = meta
+ state.inDrawer = true
},
getDrawerActionMeta({ commit, state }) {
return state.drawerActionMeta
},
cleanDrawerActionMeta({ commit, state }) {
state.drawerActionMeta = {}
+ state.inDrawer = false
}
}
diff --git a/src/utils/common.js b/src/utils/common.js
index 388fef90f..b898464b5 100644
--- a/src/utils/common.js
+++ b/src/utils/common.js
@@ -3,7 +3,7 @@ import { message } from '@/utils/message'
const _ = require('lodash')
-export function getApiPath(that) {
+export function getApiPath(that, objectId) {
let pagePath = that.$route.path
const pagePathArray = pagePath.split('/')
if (pagePathArray.indexOf('orgs') !== -1) {
@@ -11,6 +11,9 @@ export function getApiPath(that) {
} else if (pagePathArray.indexOf('gathered-user') !== -1 || pagePathArray.indexOf('change-auth-plan') !== -1) {
pagePathArray[pagePathArray.indexOf('accounts')] = 'xpack'
}
+ if (pagePathArray.indexOf(objectId) === -1) {
+ pagePathArray.push(objectId)
+ }
if (pagePathArray.indexOf('tickets') !== -1) {
// ticket ...
pagePath = pagePathArray.slice(1, pagePathArray.length).join('/')
@@ -310,4 +313,5 @@ export function toSentenceCase(string) {
}).join(' ')
return s[0].toUpperCase() + s.slice(1)
}
+
export { BASE_URL }
diff --git a/src/views/users/Group/UserGroupDetail/index.vue b/src/views/users/Group/UserGroupDetail/index.vue
index 3fea6774a..d4fb0e600 100644
--- a/src/views/users/Group/UserGroupDetail/index.vue
+++ b/src/views/users/Group/UserGroupDetail/index.vue
@@ -21,7 +21,6 @@ export default {
return {
group: { name: '', comment: '', users: [] },
config: {
- url: '/api/v1/users/groups',
activeMenu: 'GroupInfo',
submenu: [
{
diff --git a/src/views/users/User/UserCreateUpdate.vue b/src/views/users/User/UserCreateUpdate.vue
index 29b53a85e..d5ee63dc9 100644
--- a/src/views/users/User/UserCreateUpdate.vue
+++ b/src/views/users/User/UserCreateUpdate.vue
@@ -1,5 +1,11 @@
-
+