mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-11 19:41:55 +00:00
commit
01e6367196
@ -51,6 +51,10 @@ export default {
|
|||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => []
|
||||||
},
|
},
|
||||||
|
getUrlQuery: {
|
||||||
|
type: Boolean,
|
||||||
|
default: () => true
|
||||||
|
},
|
||||||
default: {
|
default: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: null
|
default: null
|
||||||
@ -132,7 +136,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
// 判断url中的查询条件
|
// 判断url中的查询条件
|
||||||
checkInTableColumns() {
|
checkInTableColumns() {
|
||||||
const routeQuery = this.$route?.query
|
const routeQuery = this.getUrlQuery ? this.$route?.query : {}
|
||||||
const routeQueryKeys = Object.keys(routeQuery)
|
const routeQueryKeys = Object.keys(routeQuery)
|
||||||
const keys = {}
|
const keys = {}
|
||||||
if (routeQueryKeys.length < 1) return keys
|
if (routeQueryKeys.length < 1) return keys
|
||||||
@ -208,9 +212,11 @@ export default {
|
|||||||
this.$set(this.filterTags, this.filterKey, tag)
|
this.$set(this.filterTags, this.filterKey, tag)
|
||||||
this.$emit('tagSearch', this.filterMaps)
|
this.$emit('tagSearch', this.filterMaps)
|
||||||
|
|
||||||
|
if (this.getUrlQuery) {
|
||||||
let newQuery = _.cloneDeep(this.$route.query)
|
let newQuery = _.cloneDeep(this.$route.query)
|
||||||
newQuery = { ...newQuery, [this.filterKey]: encodeURI(this.filterValue) }
|
newQuery = { ...newQuery, [this.filterKey]: encodeURI(this.filterValue) }
|
||||||
this.$router.replace({ query: newQuery })
|
this.$router.replace({ query: newQuery })
|
||||||
|
}
|
||||||
|
|
||||||
this.filterKey = ''
|
this.filterKey = ''
|
||||||
this.filterValue = ''
|
this.filterValue = ''
|
||||||
|
@ -914,6 +914,8 @@
|
|||||||
"SAML2Auth": "SAML2 认证",
|
"SAML2Auth": "SAML2 认证",
|
||||||
"authSAML2Xml": "IDP metadata XML",
|
"authSAML2Xml": "IDP metadata XML",
|
||||||
"authSAML2MetadataUrl": "IDP metadata URL",
|
"authSAML2MetadataUrl": "IDP metadata URL",
|
||||||
|
"authSAML2AdvancedSettings": "高级配置",
|
||||||
|
"IdpMetadataHelpText": "IDP metadata URL 和 IDP metadata XML参数二选一即可,IDP metadata URL的优先级高",
|
||||||
"authCASAttrMap": "用户属性映射",
|
"authCASAttrMap": "用户属性映射",
|
||||||
"SignaturesAndTemplates": "Signatures and Templates",
|
"SignaturesAndTemplates": "Signatures and Templates",
|
||||||
"unselectedUser": "没有选择用户",
|
"unselectedUser": "没有选择用户",
|
||||||
@ -1227,8 +1229,8 @@
|
|||||||
"HasRead": "是否已读",
|
"HasRead": "是否已读",
|
||||||
"Sender": "发送人",
|
"Sender": "发送人",
|
||||||
"MarkAsRead": "标记已读",
|
"MarkAsRead": "标记已读",
|
||||||
"OneClickRead": "一键已读",
|
"OneClickRead": "当前已读",
|
||||||
"OneClickReadMsg": "你确定要将已加载的信息标记为已读吗?",
|
"OneClickReadMsg": "你确定要将当前信息标记为已读吗?",
|
||||||
"NoUnreadMsg": "暂无未读消息",
|
"NoUnreadMsg": "暂无未读消息",
|
||||||
"SiteMessage": "站内信",
|
"SiteMessage": "站内信",
|
||||||
"SMS": "短信"
|
"SMS": "短信"
|
||||||
|
@ -892,6 +892,8 @@
|
|||||||
"SAML2Auth": "SAML2 Auth",
|
"SAML2Auth": "SAML2 Auth",
|
||||||
"authSAML2Xml": "IDP metadata XML",
|
"authSAML2Xml": "IDP metadata XML",
|
||||||
"authSAML2MetadataUrl": "IDP metadata URL",
|
"authSAML2MetadataUrl": "IDP metadata URL",
|
||||||
|
"IdpMetadataHelpText": "Choose one of IDP metadata URL and IDP metadata XML parameters. IDP metadata URL has high priority",
|
||||||
|
"authSAML2AdvancedSettings": "Advanced Settings",
|
||||||
"unselectedUser": "Unselected user",
|
"unselectedUser": "Unselected user",
|
||||||
"auto": "Auto",
|
"auto": "Auto",
|
||||||
"basicSetting": "Basic setting",
|
"basicSetting": "Basic setting",
|
||||||
@ -1187,8 +1189,8 @@
|
|||||||
"HasRead": "Has read",
|
"HasRead": "Has read",
|
||||||
"Sender": "Sender",
|
"Sender": "Sender",
|
||||||
"MarkAsRead": "Mark as read",
|
"MarkAsRead": "Mark as read",
|
||||||
"OneClickRead": "One Click Read",
|
"OneClickRead": "Currently read",
|
||||||
"OneClickReadMsg": "Are you sure you want to mark the loaded information as read?",
|
"OneClickReadMsg": "Are you sure you want to mark the current information as read?",
|
||||||
"NoUnreadMsg": "No unread messages",
|
"NoUnreadMsg": "No unread messages",
|
||||||
"SiteMessage": "Site messages",
|
"SiteMessage": "Site messages",
|
||||||
"SMS": "SMS"
|
"SMS": "SMS"
|
||||||
|
@ -270,8 +270,8 @@ export default {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: #000;
|
color: #000;
|
||||||
padding: 4px 0 0;
|
padding: 4px 0 0;
|
||||||
line-height: 21px;
|
line-height: 25px;
|
||||||
max-height: 21px;
|
max-height: 25px;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -116,6 +116,9 @@ export default {
|
|||||||
hasExport: false,
|
hasExport: false,
|
||||||
hasImport: false,
|
hasImport: false,
|
||||||
hasMoreActions: false,
|
hasMoreActions: false,
|
||||||
|
searchConfig: {
|
||||||
|
getUrlQuery: false
|
||||||
|
},
|
||||||
moreCreates: {
|
moreCreates: {
|
||||||
callback: (option) => {
|
callback: (option) => {
|
||||||
vm.$router.push({ name: 'AppChangeAuthPlanCreate', query: {
|
vm.$router.push({ name: 'AppChangeAuthPlanCreate', query: {
|
||||||
|
@ -91,7 +91,10 @@ export default {
|
|||||||
hasExport: false,
|
hasExport: false,
|
||||||
hasMoreActions: false,
|
hasMoreActions: false,
|
||||||
createRoute: 'GatherUserTaskCreate',
|
createRoute: 'GatherUserTaskCreate',
|
||||||
hasColumnSetting: false
|
hasColumnSetting: false,
|
||||||
|
searchConfig: {
|
||||||
|
getUrlQuery: false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ export default {
|
|||||||
type: {
|
type: {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
options: [{
|
options: [{
|
||||||
label: appType,
|
label: appTypeMeta.title,
|
||||||
value: appType
|
value: appType
|
||||||
}],
|
}],
|
||||||
disabled: true
|
disabled: true
|
||||||
|
@ -357,8 +357,7 @@ export default {
|
|||||||
this.nodeInfoDialogSetting.items = [
|
this.nodeInfoDialogSetting.items = [
|
||||||
{ key: 'id', label: 'ID', value: res.id },
|
{ key: 'id', label: 'ID', value: res.id },
|
||||||
{ key: 'name', label: this.$t('assets.Name'), value: res.name },
|
{ key: 'name', label: this.$t('assets.Name'), value: res.name },
|
||||||
{ key: 'fullName', label: this.$t('assets.FullName'), value: res.full_value },
|
{ key: 'fullName', label: this.$t('assets.FullName'), value: res.full_value }
|
||||||
{ key: 'key', label: this.$t('assets.Key'), value: res.key }
|
|
||||||
]
|
]
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$message.error(this.$t('common.getErrorMsg' + ' ' + error))
|
this.$message.error(this.$t('common.getErrorMsg' + ' ' + error))
|
||||||
|
@ -20,7 +20,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
tableConfig: {
|
tableConfig: {
|
||||||
url: `/api/v1/assets/cmd-filters/${this.object.id}/rules/`,
|
url: `/api/v1/assets/cmd-filters/${this.object.id}/rules/`,
|
||||||
columns: ['type', 'content', 'priority', 'action', 'comment', 'pattern', 'actions'],
|
columns: ['type', 'content', 'action', 'priority', 'pattern', 'comment', 'actions'],
|
||||||
columnsMeta: {
|
columnsMeta: {
|
||||||
type: {
|
type: {
|
||||||
width: '100px'
|
width: '100px'
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<QuickActions type="primary" :actions="quickActions" />
|
<QuickActions type="primary" :actions="quickActions" />
|
||||||
<RelationCard
|
<RelationCard
|
||||||
|
v-if="!(object.protocol === 'rdp' || object.protocol === 'vnc')"
|
||||||
ref="RelationCard"
|
ref="RelationCard"
|
||||||
v-bind="nodeRelationConfig"
|
v-bind="nodeRelationConfig"
|
||||||
type="info"
|
type="info"
|
||||||
|
@ -54,6 +54,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
headerActions: {
|
headerActions: {
|
||||||
|
searchConfig: {
|
||||||
|
getUrlQuery: false
|
||||||
|
},
|
||||||
createRoute: () => {
|
createRoute: () => {
|
||||||
return {
|
return {
|
||||||
name: 'SystemUserCreate',
|
name: 'SystemUserCreate',
|
||||||
|
@ -169,7 +169,6 @@ export default {
|
|||||||
{ label: this.$t('perms.UserGroups'), value: 'user_group' },
|
{ label: this.$t('perms.UserGroups'), value: 'user_group' },
|
||||||
{ label: this.$t('perms.IP'), value: 'ip' },
|
{ label: this.$t('perms.IP'), value: 'ip' },
|
||||||
{ label: this.$t('perms.hostName'), value: 'hostname' },
|
{ label: this.$t('perms.hostName'), value: 'hostname' },
|
||||||
{ label: this.$t('perms.Node'), value: 'node' },
|
|
||||||
{ label: this.$t('perms.SystemUser'), value: 'system_user' },
|
{ label: this.$t('perms.SystemUser'), value: 'system_user' },
|
||||||
{
|
{
|
||||||
label: this.$t('perms.Inherit'), value: 'all',
|
label: this.$t('perms.Inherit'), value: 'all',
|
||||||
|
@ -120,6 +120,9 @@ export default {
|
|||||||
datePicker: {
|
datePicker: {
|
||||||
dateEnd: dateTo,
|
dateEnd: dateTo,
|
||||||
dateStart: dateFrom
|
dateStart: dateFrom
|
||||||
|
},
|
||||||
|
searchConfig: {
|
||||||
|
getUrlQuery: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ export default {
|
|||||||
url: '/api/v1/settings/setting/?category=saml2',
|
url: '/api/v1/settings/setting/?category=saml2',
|
||||||
fields: [
|
fields: [
|
||||||
[this.$t('common.Basic'), ['AUTH_SAML2']],
|
[this.$t('common.Basic'), ['AUTH_SAML2']],
|
||||||
[this.$t('common.Params'), ['SAML2_IDP_METADATA_URL', 'SAML2_IDP_METADATA_XML']],
|
[this.$t('common.Params'), ['SAML2_IDP_METADATA_URL', 'SAML2_IDP_METADATA_XML', 'SAML2_SP_ADVANCED_SETTINGS']],
|
||||||
[this.$t('common.Certificate'), ['SAML2_SP_CERT_CONTENT', 'SAML2_SP_KEY_CONTENT']],
|
[this.$t('common.Certificate'), ['SAML2_SP_CERT_CONTENT', 'SAML2_SP_KEY_CONTENT']],
|
||||||
[this.$t('common.Other'), [
|
[this.$t('common.Other'), [
|
||||||
'SAML2_LOGOUT_COMPLETELY', 'AUTH_SAML2_ALWAYS_UPDATE_USER',
|
'SAML2_LOGOUT_COMPLETELY', 'AUTH_SAML2_ALWAYS_UPDATE_USER',
|
||||||
@ -42,7 +42,8 @@ export default {
|
|||||||
},
|
},
|
||||||
SAML2_IDP_METADATA_URL: {
|
SAML2_IDP_METADATA_URL: {
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
label: this.$t('setting.authSAML2MetadataUrl')
|
label: this.$t('setting.authSAML2MetadataUrl'),
|
||||||
|
helpText: this.$t('setting.IdpMetadataHelpText')
|
||||||
},
|
},
|
||||||
SAML2_IDP_METADATA_XML: {
|
SAML2_IDP_METADATA_XML: {
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
@ -52,6 +53,15 @@ export default {
|
|||||||
},
|
},
|
||||||
label: this.$t('setting.authSAML2Xml')
|
label: this.$t('setting.authSAML2Xml')
|
||||||
},
|
},
|
||||||
|
SAML2_SP_ADVANCED_SETTINGS: {
|
||||||
|
component: 'el-input',
|
||||||
|
el: {
|
||||||
|
type: 'textarea',
|
||||||
|
rows: 3
|
||||||
|
},
|
||||||
|
label: this.$t('setting.authSAML2AdvancedSettings'),
|
||||||
|
rules: [JsonRequired]
|
||||||
|
},
|
||||||
SAML2_SP_CERT_CONTENT: {
|
SAML2_SP_CERT_CONTENT: {
|
||||||
component: UploadKey
|
component: UploadKey
|
||||||
},
|
},
|
||||||
@ -71,10 +81,12 @@ export default {
|
|||||||
submitMethod: () => 'patch',
|
submitMethod: () => 'patch',
|
||||||
afterGetFormValue(obj) {
|
afterGetFormValue(obj) {
|
||||||
obj.SAML2_RENAME_ATTRIBUTES = JSON.stringify(obj.SAML2_RENAME_ATTRIBUTES)
|
obj.SAML2_RENAME_ATTRIBUTES = JSON.stringify(obj.SAML2_RENAME_ATTRIBUTES)
|
||||||
|
obj.SAML2_SP_ADVANCED_SETTINGS = JSON.stringify(obj.SAML2_SP_ADVANCED_SETTINGS)
|
||||||
return obj
|
return obj
|
||||||
},
|
},
|
||||||
cleanFormValue(data) {
|
cleanFormValue(data) {
|
||||||
if (data['SAML2_RENAME_ATTRIBUTES']) {
|
if (data['SAML2_RENAME_ATTRIBUTES']) {
|
||||||
|
data['SAML2_SP_ADVANCED_SETTINGS'] = JSON.parse(data['SAML2_SP_ADVANCED_SETTINGS'])
|
||||||
data['SAML2_RENAME_ATTRIBUTES'] = JSON.parse(data['SAML2_RENAME_ATTRIBUTES'])
|
data['SAML2_RENAME_ATTRIBUTES'] = JSON.parse(data['SAML2_RENAME_ATTRIBUTES'])
|
||||||
}
|
}
|
||||||
return data
|
return data
|
||||||
|
@ -218,8 +218,15 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.$store.state.users.profile.user_all_orgs.length > 0) {
|
let userAllOrgIds = this.$store.state.users.profile['user_all_orgs']
|
||||||
this.initial.org_id = this.$store.state.users.profile.user_all_orgs[0].id
|
const currentOrgId = this.$store.getters.currentOrg.id
|
||||||
|
userAllOrgIds = userAllOrgIds ? userAllOrgIds.map(i => i.id) : []
|
||||||
|
if (userAllOrgIds.length > 0) {
|
||||||
|
if (userAllOrgIds.includes(currentOrgId)) {
|
||||||
|
this.initial.org_id = currentOrgId
|
||||||
|
} else {
|
||||||
|
this.initial.org_id = userAllOrgIds[0]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.loading = false
|
this.loading = false
|
||||||
},
|
},
|
||||||
|
@ -130,8 +130,15 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.$store.state.users.profile['user_all_orgs'].length > 0) {
|
let userAllOrgIds = this.$store.state.users.profile['user_all_orgs']
|
||||||
this.initial.org_id = this.$store.state.users.profile['user_all_orgs'][0].id
|
const currentOrgId = this.$store.getters.currentOrg.id
|
||||||
|
userAllOrgIds = userAllOrgIds ? userAllOrgIds.map(i => i.id) : []
|
||||||
|
if (userAllOrgIds.length > 0) {
|
||||||
|
if (userAllOrgIds.includes(currentOrgId)) {
|
||||||
|
this.initial.org_id = currentOrgId
|
||||||
|
} else {
|
||||||
|
this.initial.org_id = userAllOrgIds[0]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.loading = false
|
this.loading = false
|
||||||
},
|
},
|
||||||
|
@ -55,6 +55,9 @@ export default {
|
|||||||
hasBulkDelete: false,
|
hasBulkDelete: false,
|
||||||
hasImport: false,
|
hasImport: false,
|
||||||
hasMoreActions: false,
|
hasMoreActions: false,
|
||||||
|
searchConfig: {
|
||||||
|
getUrlQuery: false
|
||||||
|
},
|
||||||
moreCreates: {
|
moreCreates: {
|
||||||
callback: (option) => {
|
callback: (option) => {
|
||||||
vm.$router.push({ name: 'AccountCreate', query: { provider: option.name }})
|
vm.$router.push({ name: 'AccountCreate', query: { provider: option.name }})
|
||||||
|
Loading…
Reference in New Issue
Block a user