From 17748c56c93d0a76a5de3226519740cc52933528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Thu, 15 Jun 2023 10:58:36 +0800 Subject: [PATCH 1/6] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E8=B5=84=E4=BA=A7=E5=88=97=E8=A1=A8=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=93=8D=E4=BD=9C=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/assets/Asset/AssetList/components/BaseList.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/assets/Asset/AssetList/components/BaseList.vue b/src/views/assets/Asset/AssetList/components/BaseList.vue index 08ff61170..3cbcba444 100644 --- a/src/views/assets/Asset/AssetList/components/BaseList.vue +++ b/src/views/assets/Asset/AssetList/components/BaseList.vue @@ -192,8 +192,8 @@ export default { can: ({ row }) => this.$hasPerm('assets.test_assetconnectivity') && !this.$store.getters.currentOrgIsRoot && - row['auto_config'].ansible_enabled && - row['auto_config'].ping_enabled, + row?.auto_config?.ansible_enabled && + row?.auto_config?.ping_enabled, callback: ({ row }) => { if (row.platform.name === 'Gateway') { this.GatewayVisible = true From e63630fce757888f0c6926da1815150f59fecbfe Mon Sep 17 00:00:00 2001 From: feng <1304903146@qq.com> Date: Thu, 15 Jun 2023 11:29:03 +0800 Subject: [PATCH 2/6] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E6=97=B6=20=E5=88=A4=E6=96=AD=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E8=A7=84=E5=88=99=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/profile/ProfileUpdate/PasswordUpdate.vue | 8 +++++++- src/views/users/User/UserCreateUpdate.vue | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/views/profile/ProfileUpdate/PasswordUpdate.vue b/src/views/profile/ProfileUpdate/PasswordUpdate.vue index b6fc6c1b5..e21e68134 100644 --- a/src/views/profile/ProfileUpdate/PasswordUpdate.vue +++ b/src/views/profile/ProfileUpdate/PasswordUpdate.vue @@ -45,7 +45,10 @@ export default { new_password: { label: this.$t('users.NewPassword'), rules: [rules.RequiredChange], - component: UserPassword + component: UserPassword, + el: { + userIsOrgAdmin: false + } }, new_password_again: { label: this.$t('users.ConfirmPassword'), @@ -57,6 +60,9 @@ export default { } } }, + mounted() { + this.fieldsMeta.new_password.el.userIsOrgAdmin = this.object['is_org_admin'] + }, methods: { submitMethod() { return 'put' diff --git a/src/views/users/User/UserCreateUpdate.vue b/src/views/users/User/UserCreateUpdate.vue index a22ed79fc..d0ff13ade 100644 --- a/src/views/users/User/UserCreateUpdate.vue +++ b/src/views/users/User/UserCreateUpdate.vue @@ -193,7 +193,7 @@ export default { methods: { afterGetUser(user) { this.user = user - this.fieldsMeta.password.el.userIsOrgAdmin = user.role === 'Admin' || user.org_roles.indexOf('Admin') !== -1 + this.fieldsMeta.password.el.userIsOrgAdmin = user['is_org_admin'] if (this.$route.query.clone_from) { this.user.groups = [] } From bb27171b09baea83ac7a73ac7a93484a26187417 Mon Sep 17 00:00:00 2001 From: feng <1304903146@qq.com> Date: Thu, 15 Jun 2023 12:44:55 +0800 Subject: [PATCH 3/6] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=92=8C=E8=BF=9E=E6=8E=A5=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=E7=9A=84=E8=AF=A6=E6=83=85=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/en.json | 2 ++ src/i18n/langs/ja.json | 2 ++ src/i18n/langs/zh.json | 2 ++ src/router/console/acls.js | 4 ++-- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index 3c4ebdb1f..a9cff459d 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -1378,6 +1378,8 @@ "UserLoginAclCreate": "Create user login acl", "UserLoginAclUpdate": "Update user login acl", "UserLoginAclList": "User login acl", + "UserLoginAclDetail": "User login acl detail", + "ConnectMethodAclDetail": "Connect method acl detail", "ConnectMethodAclCreate": "Create connect method acl", "ConnectMethodAclList": "Connect method acl", "ConnectMethodAclUpdate": "Update connect method acl" diff --git a/src/i18n/langs/ja.json b/src/i18n/langs/ja.json index 8a36d4045..dacf415db 100644 --- a/src/i18n/langs/ja.json +++ b/src/i18n/langs/ja.json @@ -1375,6 +1375,8 @@ "UserLoginAclList": "ユーザーログイン", "ConnectMethodAclCreate": "接続方式制御の作成", "ConnectMethodAclList": "接続方式", + "ConnectMethodAclDetail": "接続方式制御の詳細", + "UserLoginAclDetail": "ユーザーログイン制御の詳細", "ConnectMethodAclUpdate": "接続方式制御ルールの更新" }, "rbac": { diff --git a/src/i18n/langs/zh.json b/src/i18n/langs/zh.json index 513da6321..7d1175f37 100644 --- a/src/i18n/langs/zh.json +++ b/src/i18n/langs/zh.json @@ -1159,8 +1159,10 @@ "Acls": "访问控制", "UserLoginAclCreate": "创建用户登录控制", "UserLoginAclList": "用户登录", + "UserLoginAclDetail": "用户登录控制详情", "UserLoginAclUpdate": "更新用户登录控制", "ConnectMethodAclList": "连接方式", + "ConnectMethodAclDetail": "连接方式控制详情", "ConnectMethodAclCreate": "创建连接方式控制", "ConnectMethodAclUpdate": "更新连接方式控制", "AppletDetail": "远程应用", diff --git a/src/router/console/acls.js b/src/router/console/acls.js index e4d57adf3..9baa8f556 100644 --- a/src/router/console/acls.js +++ b/src/router/console/acls.js @@ -38,7 +38,7 @@ export default [ component: () => import('@/views/acl/UserLoginACL/UserDetail/index'), hidden: true, meta: { - title: i18n.t('route.AssetAclDetail'), + title: i18n.t('route.UserLoginAclDetail'), app: 'acls', resource: 'loginacl' } @@ -219,7 +219,7 @@ export default [ name: 'ConnectMethodAclDetail', component: () => import('@/views/acl/ConnectMethodAcl/ConnectMethodAclDetail/index'), hidden: true, - meta: { title: i18n.t('route.AssetAclDetail') } + meta: { title: i18n.t('route.ConnectMethodAclDetail') } }, { path: ':id/update', From 5cc17de1e062f7c8073ea3c012d848f7d19933da Mon Sep 17 00:00:00 2001 From: ibuler Date: Thu, 15 Jun 2023 14:28:04 +0800 Subject: [PATCH 4/6] =?UTF-8?q?perf:=20=E4=BF=AE=E6=94=B9=20change=20value?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FormFields/JSONManyToManySelect/ValueField.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/FormFields/JSONManyToManySelect/ValueField.vue b/src/components/FormFields/JSONManyToManySelect/ValueField.vue index dfb87c1a4..1dedb4dad 100644 --- a/src/components/FormFields/JSONManyToManySelect/ValueField.vue +++ b/src/components/FormFields/JSONManyToManySelect/ValueField.vue @@ -54,9 +54,9 @@ export default { this.$emit('input', value) }, setTypeAndValue() { - this.loading = false + this.loading = true this.type = this.getType() - this.$log.debug('ValueField: Type: ', this.type, 'Value: ', this.value) + this.$log.debug('ValueField: Type: ', this.type, 'Value: ', this.value, 'attr: ', this.attr) if (['select', 'array'].includes(this.type) && typeof this.value === 'string') { const value = this.value ? this.value.split(',') : [] this.handleInput(value) From 59ee3eff17d99aadf64a7e35c2b168afbab6e690 Mon Sep 17 00:00:00 2001 From: ibuler Date: Thu, 15 Jun 2023 14:31:31 +0800 Subject: [PATCH 5/6] =?UTF-8?q?perf:=20=E4=BF=AE=E6=94=B9=20=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/org.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/org.js b/src/utils/org.js index dd6cd563f..730b7dd64 100644 --- a/src/utils/org.js +++ b/src/utils/org.js @@ -35,7 +35,10 @@ async function changeOrg(org, reload = true, vm = null) { } // 替换 Path 中的 UUID const idRegex = /\/?([a-fA-F0-9]{8}-(?:[a-fA-F0-9]{4}-){3}[a-fA-F0-9]{12})|(-?\d+(\.\d+)?)\/?/ - path = path.replace(idRegex, '') + const i = path.search(idRegex) + if (i !== -1) { + path = path.slice(0, i + 1) + } // 替换 Query 中的 UUID const newQuery = {} From a7877372901fbbd23cc6901572c30e9da64709d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Thu, 15 Jun 2023 15:09:20 +0800 Subject: [PATCH 6/6] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E8=AE=BE=E7=BD=AE=E7=BB=84=E7=BB=87=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E6=A1=86=E6=98=BE=E7=A4=BA=E8=BF=87=E9=95=BF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/styles/index.scss | 7 +++++++ src/views/settings/Ldap/SyncSettingDialog.vue | 8 ++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/styles/index.scss b/src/styles/index.scss index a7c0a5205..5b1d60598 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -281,3 +281,10 @@ input[type=file] { padding-top: 3px!important; } } + +.sync-setting-org.el-select-dropdown .el-select-dropdown__item { + max-width: 600px !important; + overflow: hidden !important; + white-space: nowrap !important; + text-overflow: ellipsis !important; +} diff --git a/src/views/settings/Ldap/SyncSettingDialog.vue b/src/views/settings/Ldap/SyncSettingDialog.vue index e56e8a54b..5466e4448 100644 --- a/src/views/settings/Ldap/SyncSettingDialog.vue +++ b/src/views/settings/Ldap/SyncSettingDialog.vue @@ -40,6 +40,7 @@ export default { component: Select2, rules: [Required], el: { + popperClass: 'sync-setting-org', multiple: true, ajax: { url: '/api/v1/orgs/orgs/', @@ -77,10 +78,5 @@ export default {