diff --git a/src/components/TagSearch/index.vue b/src/components/TagSearch/index.vue index 6850fe3fc..429bab969 100644 --- a/src/components/TagSearch/index.vue +++ b/src/components/TagSearch/index.vue @@ -51,6 +51,10 @@ export default { type: Array, default: () => [] }, + getUrlQuery: { + type: Boolean, + default: () => true + }, default: { type: Object, default: null @@ -132,7 +136,7 @@ export default { methods: { // 判断url中的查询条件 checkInTableColumns() { - const routeQuery = this.$route?.query + const routeQuery = this.getUrlQuery ? this.$route?.query : {} const routeQueryKeys = Object.keys(routeQuery) const keys = {} if (routeQueryKeys.length < 1) return keys @@ -208,9 +212,11 @@ export default { this.$set(this.filterTags, this.filterKey, tag) this.$emit('tagSearch', this.filterMaps) - let newQuery = _.cloneDeep(this.$route.query) - newQuery = { ...newQuery, [this.filterKey]: encodeURI(this.filterValue) } - this.$router.replace({ query: newQuery }) + if (this.getUrlQuery) { + let newQuery = _.cloneDeep(this.$route.query) + newQuery = { ...newQuery, [this.filterKey]: encodeURI(this.filterValue) } + this.$router.replace({ query: newQuery }) + } this.filterKey = '' this.filterValue = '' diff --git a/src/i18n/langs/cn.json b/src/i18n/langs/cn.json index ae0adb384..eed177e27 100644 --- a/src/i18n/langs/cn.json +++ b/src/i18n/langs/cn.json @@ -914,6 +914,8 @@ "SAML2Auth": "SAML2 认证", "authSAML2Xml": "IDP metadata XML", "authSAML2MetadataUrl": "IDP metadata URL", + "authSAML2AdvancedSettings": "高级配置", + "IdpMetadataHelpText": "IDP metadata URL 和 IDP metadata XML参数二选一即可,IDP metadata URL的优先级高", "authCASAttrMap": "用户属性映射", "SignaturesAndTemplates": "Signatures and Templates", "unselectedUser": "没有选择用户", @@ -1227,8 +1229,8 @@ "HasRead": "是否已读", "Sender": "发送人", "MarkAsRead": "标记已读", - "OneClickRead": "一键已读", - "OneClickReadMsg": "你确定要将已加载的信息标记为已读吗?", + "OneClickRead": "当前已读", + "OneClickReadMsg": "你确定要将当前信息标记为已读吗?", "NoUnreadMsg": "暂无未读消息", "SiteMessage": "站内信", "SMS": "短信" diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index 647ff805d..d5029c7a2 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -892,6 +892,8 @@ "SAML2Auth": "SAML2 Auth", "authSAML2Xml": "IDP metadata XML", "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", "auto": "Auto", "basicSetting": "Basic setting", @@ -1187,8 +1189,8 @@ "HasRead": "Has read", "Sender": "Sender", "MarkAsRead": "Mark as read", - "OneClickRead": "One Click Read", - "OneClickReadMsg": "Are you sure you want to mark the loaded information as read?", + "OneClickRead": "Currently read", + "OneClickReadMsg": "Are you sure you want to mark the current information as read?", "NoUnreadMsg": "No unread messages", "SiteMessage": "Site messages", "SMS": "SMS" diff --git a/src/layout/components/NavHeader/SiteMessages.vue b/src/layout/components/NavHeader/SiteMessages.vue index a3ed670b0..3ccde1d89 100644 --- a/src/layout/components/NavHeader/SiteMessages.vue +++ b/src/layout/components/NavHeader/SiteMessages.vue @@ -270,8 +270,8 @@ export default { overflow: hidden; color: #000; padding: 4px 0 0; - line-height: 21px; - max-height: 21px; + line-height: 25px; + max-height: 25px; display: -webkit-box; font-size: 12px; display: block; diff --git a/src/views/accounts/ChangeAuthPlan/AppChangeAuthPlan/AppChangeAuthPlanList.vue b/src/views/accounts/ChangeAuthPlan/AppChangeAuthPlan/AppChangeAuthPlanList.vue index 4babc1aa4..5cafdbba6 100644 --- a/src/views/accounts/ChangeAuthPlan/AppChangeAuthPlan/AppChangeAuthPlanList.vue +++ b/src/views/accounts/ChangeAuthPlan/AppChangeAuthPlan/AppChangeAuthPlanList.vue @@ -116,6 +116,9 @@ export default { hasExport: false, hasImport: false, hasMoreActions: false, + searchConfig: { + getUrlQuery: false + }, moreCreates: { callback: (option) => { vm.$router.push({ name: 'AppChangeAuthPlanCreate', query: { diff --git a/src/views/accounts/GatheredUser/TaskList.vue b/src/views/accounts/GatheredUser/TaskList.vue index e002354ff..8c86958df 100644 --- a/src/views/accounts/GatheredUser/TaskList.vue +++ b/src/views/accounts/GatheredUser/TaskList.vue @@ -91,7 +91,10 @@ export default { hasExport: false, hasMoreActions: false, createRoute: 'GatherUserTaskCreate', - hasColumnSetting: false + hasColumnSetting: false, + searchConfig: { + getUrlQuery: false + } } } } diff --git a/src/views/applications/RemoteApp/RemoteAppCreateUpdate.vue b/src/views/applications/RemoteApp/RemoteAppCreateUpdate.vue index f6af90b78..c50e706ea 100644 --- a/src/views/applications/RemoteApp/RemoteAppCreateUpdate.vue +++ b/src/views/applications/RemoteApp/RemoteAppCreateUpdate.vue @@ -34,7 +34,7 @@ export default { type: { type: 'select', options: [{ - label: appType, + label: appTypeMeta.title, value: appType }], disabled: true diff --git a/src/views/assets/Asset/AssetList.vue b/src/views/assets/Asset/AssetList.vue index 5e07e1771..f49772b42 100644 --- a/src/views/assets/Asset/AssetList.vue +++ b/src/views/assets/Asset/AssetList.vue @@ -357,8 +357,7 @@ export default { this.nodeInfoDialogSetting.items = [ { key: 'id', label: 'ID', value: res.id }, { key: 'name', label: this.$t('assets.Name'), value: res.name }, - { key: 'fullName', label: this.$t('assets.FullName'), value: res.full_value }, - { key: 'key', label: this.$t('assets.Key'), value: res.key } + { key: 'fullName', label: this.$t('assets.FullName'), value: res.full_value } ] }).catch(error => { this.$message.error(this.$t('common.getErrorMsg' + ' ' + error)) diff --git a/src/views/assets/CommandFilter/CommandFilterDetail/Rules.vue b/src/views/assets/CommandFilter/CommandFilterDetail/Rules.vue index 4c2c750b8..2ae44dc49 100644 --- a/src/views/assets/CommandFilter/CommandFilterDetail/Rules.vue +++ b/src/views/assets/CommandFilter/CommandFilterDetail/Rules.vue @@ -20,7 +20,7 @@ export default { return { tableConfig: { 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: { type: { width: '100px' diff --git a/src/views/assets/SystemUser/SystemUserDetail/Detail.vue b/src/views/assets/SystemUser/SystemUserDetail/Detail.vue index c2b5e0710..4d53026cf 100644 --- a/src/views/assets/SystemUser/SystemUserDetail/Detail.vue +++ b/src/views/assets/SystemUser/SystemUserDetail/Detail.vue @@ -6,6 +6,7 @@ { return { name: 'SystemUserCreate', diff --git a/src/views/perms/AssetPermission/AssetPermissionList.vue b/src/views/perms/AssetPermission/AssetPermissionList.vue index d690e399c..202df38b9 100644 --- a/src/views/perms/AssetPermission/AssetPermissionList.vue +++ b/src/views/perms/AssetPermission/AssetPermissionList.vue @@ -169,7 +169,6 @@ export default { { label: this.$t('perms.UserGroups'), value: 'user_group' }, { label: this.$t('perms.IP'), value: 'ip' }, { 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.Inherit'), value: 'all', diff --git a/src/views/sessions/SessionList/BaseList.vue b/src/views/sessions/SessionList/BaseList.vue index 64bfb7c2a..7248b9870 100644 --- a/src/views/sessions/SessionList/BaseList.vue +++ b/src/views/sessions/SessionList/BaseList.vue @@ -120,6 +120,9 @@ export default { datePicker: { dateEnd: dateTo, dateStart: dateFrom + }, + searchConfig: { + getUrlQuery: false } } } diff --git a/src/views/settings/Auth/SAML2.vue b/src/views/settings/Auth/SAML2.vue index da2ade674..a3f5f9334 100644 --- a/src/views/settings/Auth/SAML2.vue +++ b/src/views/settings/Auth/SAML2.vue @@ -29,7 +29,7 @@ export default { url: '/api/v1/settings/setting/?category=saml2', fields: [ [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.Other'), [ 'SAML2_LOGOUT_COMPLETELY', 'AUTH_SAML2_ALWAYS_UPDATE_USER', @@ -42,7 +42,8 @@ export default { }, SAML2_IDP_METADATA_URL: { component: 'el-input', - label: this.$t('setting.authSAML2MetadataUrl') + label: this.$t('setting.authSAML2MetadataUrl'), + helpText: this.$t('setting.IdpMetadataHelpText') }, SAML2_IDP_METADATA_XML: { component: 'el-input', @@ -52,6 +53,15 @@ export default { }, 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: { component: UploadKey }, @@ -71,10 +81,12 @@ export default { submitMethod: () => 'patch', afterGetFormValue(obj) { obj.SAML2_RENAME_ATTRIBUTES = JSON.stringify(obj.SAML2_RENAME_ATTRIBUTES) + obj.SAML2_SP_ADVANCED_SETTINGS = JSON.stringify(obj.SAML2_SP_ADVANCED_SETTINGS) return obj }, cleanFormValue(data) { 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']) } return data diff --git a/src/views/tickets/RequestApplicationPerm/CreateUpdate.vue b/src/views/tickets/RequestApplicationPerm/CreateUpdate.vue index 533d574b6..012798df3 100644 --- a/src/views/tickets/RequestApplicationPerm/CreateUpdate.vue +++ b/src/views/tickets/RequestApplicationPerm/CreateUpdate.vue @@ -218,8 +218,15 @@ export default { } }, mounted() { - if (this.$store.state.users.profile.user_all_orgs.length > 0) { - this.initial.org_id = this.$store.state.users.profile.user_all_orgs[0].id + let userAllOrgIds = this.$store.state.users.profile['user_all_orgs'] + 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 }, diff --git a/src/views/tickets/RequestAssetPerm/CreateUpdate.vue b/src/views/tickets/RequestAssetPerm/CreateUpdate.vue index 5ab58932b..5f84d8c8e 100644 --- a/src/views/tickets/RequestAssetPerm/CreateUpdate.vue +++ b/src/views/tickets/RequestAssetPerm/CreateUpdate.vue @@ -130,8 +130,15 @@ export default { } }, mounted() { - if (this.$store.state.users.profile['user_all_orgs'].length > 0) { - this.initial.org_id = this.$store.state.users.profile['user_all_orgs'][0].id + let userAllOrgIds = this.$store.state.users.profile['user_all_orgs'] + 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 }, diff --git a/src/views/xpack/Cloud/Account/AccountList.vue b/src/views/xpack/Cloud/Account/AccountList.vue index 0b47b7f58..1e61b7b68 100644 --- a/src/views/xpack/Cloud/Account/AccountList.vue +++ b/src/views/xpack/Cloud/Account/AccountList.vue @@ -55,6 +55,9 @@ export default { hasBulkDelete: false, hasImport: false, hasMoreActions: false, + searchConfig: { + getUrlQuery: false + }, moreCreates: { callback: (option) => { vm.$router.push({ name: 'AccountCreate', query: { provider: option.name }})