From bef02b3e29cb0a48dfc2a6b213dc5e9f7b49cb48 Mon Sep 17 00:00:00 2001 From: ibuler Date: Thu, 9 Dec 2021 21:01:04 +0800 Subject: [PATCH 1/9] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=20remote=20app=20=E4=B8=AD=E7=B1=BB=E5=9E=8B=20label=20?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: 修复 --- src/views/applications/RemoteApp/RemoteAppCreateUpdate.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From c08872641231165c9311b1bdb9fa81e4834319ff Mon Sep 17 00:00:00 2001 From: feng626 <1304903146@qq.com> Date: Sat, 11 Dec 2021 12:53:48 +0800 Subject: [PATCH 2/9] =?UTF-8?q?perf:=20=E9=BB=98=E8=AE=A4=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E5=BD=93=E5=89=8D=E7=BB=84=E7=BB=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tickets/RequestApplicationPerm/CreateUpdate.vue | 11 +++++++++-- src/views/tickets/RequestAssetPerm/CreateUpdate.vue | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) 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 }, From 32dc622f1ac82bd04e2f4a3ea1e1793348cdf4ec Mon Sep 17 00:00:00 2001 From: Michael Bai Date: Mon, 13 Dec 2021 10:37:22 +0800 Subject: [PATCH 3/9] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E8=A7=84=E5=88=99=E5=88=97=E8=A1=A8=E9=A1=B5?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=8E=92=E5=BA=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/assets/CommandFilter/CommandFilterDetail/Rules.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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' From 66ea5ab714a0ac08afb0b44c01117ed3c9eaa0d9 Mon Sep 17 00:00:00 2001 From: jiangweidong Date: Fri, 10 Dec 2021 17:14:30 +0800 Subject: [PATCH 4/9] =?UTF-8?q?feat:=20saml2=E5=8D=95=E7=82=B9=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E6=94=AF=E6=8C=81=E5=9C=A8=E9=A1=B5=E9=9D=A2=E4=B8=8A?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E9=AB=98=E7=BA=A7=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/cn.json | 2 ++ src/i18n/langs/en.json | 2 ++ src/views/settings/Auth/SAML2.vue | 16 ++++++++++++++-- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/i18n/langs/cn.json b/src/i18n/langs/cn.json index ae0adb384..e7db9dab6 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": "没有选择用户", diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index 647ff805d..b4470a531 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", 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 From 89c6936d56324c8a8818edcccdb51c3fdce9104c Mon Sep 17 00:00:00 2001 From: Michael Bai Date: Mon, 13 Dec 2021 18:39:23 +0800 Subject: [PATCH 5/9] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E5=91=BD=E4=BB=A4=E8=BF=87=E6=BB=A4=E5=99=A8=E7=9A=84?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/assets/SystemUser/SystemUserDetail/Detail.vue | 1 + 1 file changed, 1 insertion(+) 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 @@ Date: Mon, 13 Dec 2021 11:23:04 +0800 Subject: [PATCH 6/9] =?UTF-8?q?fix:=20=E6=9F=A5=E7=9C=8B=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E4=B8=8D=E5=8C=85=E5=90=AB=E8=8A=82=E7=82=B9?= =?UTF-8?q?key=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/assets/Asset/AssetList.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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)) From cb2ceea1320cf3ca764ddff6c271638f96e12b0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9C=E6=80=80=E7=A3=8A=E2=80=9D?= <2280131253@qq.com> Date: Mon, 13 Dec 2021 11:28:33 +0800 Subject: [PATCH 7/9] =?UTF-8?q?feat:=20=E8=B5=84=E4=BA=A7=E6=8E=88?= =?UTF-8?q?=E6=9D=83=E5=8E=BB=E6=8E=89=E8=8A=82=E7=82=B9=E7=9A=84=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/perms/AssetPermission/AssetPermissionList.vue | 1 - 1 file changed, 1 deletion(-) 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', From 31d29e9e6a34fa4c47f9684aed24ba8e42abad70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9C=E6=80=80=E7=A3=8A=E2=80=9D?= <2280131253@qq.com> Date: Mon, 13 Dec 2021 16:31:56 +0800 Subject: [PATCH 8/9] =?UTF-8?q?fex:=20=E4=BF=AE=E5=A4=8D=E5=A4=9A=E4=B8=AA?= =?UTF-8?q?tab=E9=A1=B5=E7=9B=B8=E4=BA=92=E5=88=87=E6=8D=A2=E6=97=B6?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=9D=A1=E4=BB=B6=E8=BF=98=E4=BC=9A=E4=BF=9D?= =?UTF-8?q?=E7=95=99=E9=97=AE=E9=A2=98=EF=BC=8C=20cearchconfig=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=8F=82=E6=95=B0getUrlQuery=EF=BC=9A=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E8=8E=B7=E5=8F=96url=E4=B8=AD=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TagSearch/index.vue | 14 ++++++++++---- .../AppChangeAuthPlan/AppChangeAuthPlanList.vue | 3 +++ src/views/accounts/GatheredUser/TaskList.vue | 5 ++++- .../SystemUser/SystemUserList/AdminUserList.vue | 3 +++ src/views/sessions/SessionList/BaseList.vue | 3 +++ src/views/xpack/Cloud/Account/AccountList.vue | 3 +++ 6 files changed, 26 insertions(+), 5 deletions(-) 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/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/assets/SystemUser/SystemUserList/AdminUserList.vue b/src/views/assets/SystemUser/SystemUserList/AdminUserList.vue index 7d21b947b..3e7dd64bf 100644 --- a/src/views/assets/SystemUser/SystemUserList/AdminUserList.vue +++ b/src/views/assets/SystemUser/SystemUserList/AdminUserList.vue @@ -54,6 +54,9 @@ export default { } }, headerActions: { + searchConfig: { + getUrlQuery: false + }, createRoute: () => { return { name: 'SystemUserCreate', 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/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 }}) From aa2fe5e87e36b0072feead9db9945bc3c4aa6c62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9C=E6=80=80=E7=A3=8A=E2=80=9D?= <2280131253@qq.com> Date: Mon, 13 Dec 2021 19:06:26 +0800 Subject: [PATCH 9/9] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=AB=99=E5=86=85?= =?UTF-8?q?=E4=BF=A1=E6=96=87=E6=A1=88=E5=92=8C=E6=98=BE=E7=A4=BA=E9=81=AE?= =?UTF-8?q?=E6=8C=A1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/cn.json | 4 ++-- src/i18n/langs/en.json | 4 ++-- src/layout/components/NavHeader/SiteMessages.vue | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/i18n/langs/cn.json b/src/i18n/langs/cn.json index e7db9dab6..eed177e27 100644 --- a/src/i18n/langs/cn.json +++ b/src/i18n/langs/cn.json @@ -1229,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 b4470a531..d5029c7a2 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -1189,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;