Merge pull request #1954 from jumpserver/dev

v2.24.0-rc4
This commit is contained in:
Jiangjie.Bai 2022-07-19 16:18:13 +08:00 committed by GitHub
commit f7d17c8de7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 54 additions and 22 deletions

View File

@ -200,15 +200,9 @@ td .el-button.el-button--mini {
font-weight: 400;
}
.el-select-dropdown.is-multiple .el-select-dropdown__item.selected {
color: #606266;
background-color: #ddd;
font-weight: 400;
}
.el-select-dropdown__item.hover, .el-select-dropdown__item:hover {
.el-select-dropdown__item.hover {
background-color: primary;
color: white!important;
color: white;
}
.el-select-dropdown__item.is-disabled:hover{
@ -418,6 +412,15 @@ td .el-button.el-button--mini {
.el-dialog .el-dialog__body {
max-height: 90vh;
overflow: auto;
padding: 30px;
}
.el-dialog .el-dialog__body form {
padding-right: 20px;
}
.el-dialog .el-dialog__footer {
padding: 10px 30px 30px;
}
.el-cascader {

View File

@ -1530,7 +1530,7 @@
"NoLicense": "暂无许可证",
"Node": "节点",
"Organization": {
"AllOrganization": "所有组织",
"AllOrganization": "组织列表",
"OrganizationCreate": "创建组织",
"OrganizationLists": "组织列表",
"OrganizationDetail": "组织详情",

View File

@ -197,6 +197,10 @@ export default {
if (typeof route === 'string') {
route = { name: route, params: {}}
}
route = {
...route,
query: this.$route.query || {}
}
route.params.id = id
this.$router.push(route)
},

View File

@ -7,7 +7,7 @@ const getters = {
consoleOrgs: state => state.users.consoleOrgs,
auditOrgs: state => state.users.auditOrgs,
workbenchOrgs: state => state.users.workbenchOrgs,
notRootWorkbenchOrgs: state => state.users.notRootWorkbenchOrgs,
noRootWorkbenchOrgs: state => state.users.noRootWorkbenchOrgs,
usingOrgs: state => state.users.usingOrgs,
currentOrg: state => state.users.currentOrg,
currentOrgIsDefault: state => state.users.currentOrg['is_default'],

View File

@ -17,7 +17,7 @@ const getDefaultState = () => {
auditOrgs: [],
consoleOrgs: [],
workbenchOrgs: [],
notRootWorkbenchOrgs: [],
noRootWorkbenchOrgs: [],
usingOrgs: [],
perms: [],
MFAVerifyAt: null,
@ -43,7 +43,7 @@ const mutations = {
state.perms = profile.perms
state.consoleOrgs = profile['console_orgs']
state.workbenchOrgs = profile['workbench_orgs']
state.notRootWorkbenchOrgs = profile['workbench_orgs'].filter(item => {
state.noRootWorkbenchOrgs = profile['workbench_orgs'].filter(item => {
return item.id !== '00000000-0000-0000-0000-000000000000'
})
state.auditOrgs = profile['audit_orgs']

View File

@ -155,8 +155,12 @@ export function formatDate(inputTime) {
const uuidPattern = /[0-9a-zA-Z\-]{36}/
export function hasUUID(s) {
return s.search(uuidPattern) !== -1
export function hasUUID(path) {
const index = path.indexOf('?')
if (index !== -1) {
path = path.substring(0, index)
}
return path.search(uuidPattern) !== -1
}
export function replaceUUID(s, n) {

View File

@ -26,6 +26,10 @@ async function changeOrg(org) {
path = _.trimEnd(path, '/')
location.href = path
} else {
const index = path.indexOf('?')
if (index !== -1) {
location.href = path.substring(0, index)
}
setTimeout(() => location.reload(), 400)
}
}

View File

@ -3,7 +3,7 @@
:data="iData"
show-checkbox
node-key="id"
:default-expand-all="false"
:default-expand-all="true"
:default-checked-keys="value"
:props="defaultProps"
v-bind="$attrs"

View File

@ -2,8 +2,8 @@
<Dialog
ref="myDialog"
:destroy-on-close="true"
width="770px"
height="700px"
width="790px"
height="720px"
v-bind="$attrs"
@confirm="submit"
v-on="$listeners"

View File

@ -127,7 +127,7 @@ export default {
component: Select2,
el: {
multiple: false,
options: this.$store.state.users.notRootWorkbenchOrgs?.map((item) => {
options: this.$store.state.users.noRootWorkbenchOrgs?.map((item) => {
return { label: item.name, value: item.id }
})
},
@ -139,6 +139,14 @@ export default {
fieldsMeta.apply_applications.el.ajax.url = `/api/v1/applications/applications/suggestions/?oid=${vm.org_id}&category=${apply_category_type[0]}&type=${apply_category_type[1]}`
fieldsMeta.apply_system_users.el.ajax.url = apply_category_type[0] === 'remote_app' ? `/api/v1/assets/system-users/suggestions/?oid=${vm.org_id}&protocol=rdp` : `/api/v1/assets/system-users/suggestions/?oid=${vm.org_id}&protocol=${apply_category_type[1]}`
}
},
on: {
change: ([event], updateForm) => {
updateForm({
apply_applications: [],
apply_system_users: []
})
}
}
}
},
@ -161,7 +169,7 @@ export default {
},
computed: {
...mapState({
workbenchOrgs: state => state.users.notRootWorkbenchOrgs
workbenchOrgs: state => state.users.noRootWorkbenchOrgs
}),
...mapGetters(['currentOrg'])
},

View File

@ -105,7 +105,7 @@ export default {
component: Select2,
el: {
multiple: false,
options: this.$store.state.users.notRootWorkbenchOrgs?.map((item) => {
options: this.$store.state.users.noRootWorkbenchOrgs?.map((item) => {
return { label: item.name, value: item.id }
})
},
@ -114,6 +114,15 @@ export default {
fieldsMeta.apply_system_users.el.ajax.url = `/api/v1/assets/system-users/suggestions/?oid=${form['org_id']}&protocol__in=rdp,ssh,vnc,telnet`
fieldsMeta.apply_assets.el.ajax.url = `/api/v1/assets/assets/suggestions/?oid=${form['org_id']}`
fieldsMeta.apply_nodes.el.ajax.url = `/api/v1/assets/nodes/suggestions/?oid=${form['org_id']}`
},
on: {
change: ([event], updateForm) => {
updateForm({
apply_nodes: [],
apply_assets: [],
apply_system_users: []
})
}
}
}
},
@ -135,7 +144,7 @@ export default {
},
computed: {
...mapState({
workbenchOrgs: state => state.users.notRootWorkbenchOrgs
workbenchOrgs: state => state.users.noRootWorkbenchOrgs
}),
...mapGetters(['currentOrg'])
},