Skip to content

Commit

Permalink
perf: 修改冲突
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuler committed Jun 15, 2023
2 parents e60a33a + a787737 commit 94a02a2
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 13 deletions.
2 changes: 2 additions & 0 deletions src/i18n/langs/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/langs/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -1375,6 +1375,8 @@
"UserLoginAclList": "ユーザーログイン",
"ConnectMethodAclCreate": "接続方式制御の作成",
"ConnectMethodAclList": "接続方式",
"ConnectMethodAclDetail": "接続方式制御の詳細",
"UserLoginAclDetail": "ユーザーログイン制御の詳細",
"ConnectMethodAclUpdate": "接続方式制御ルールの更新"
},
"rbac": {
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/langs/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -1159,8 +1159,10 @@
"Acls": "访问控制",
"UserLoginAclCreate": "创建用户登录控制",
"UserLoginAclList": "用户登录",
"UserLoginAclDetail": "用户登录控制详情",
"UserLoginAclUpdate": "更新用户登录控制",
"ConnectMethodAclList": "连接方式",
"ConnectMethodAclDetail": "连接方式控制详情",
"ConnectMethodAclCreate": "创建连接方式控制",
"ConnectMethodAclUpdate": "更新连接方式控制",
"AppletDetail": "远程应用",
Expand Down
4 changes: 2 additions & 2 deletions src/router/console/acls.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand Down Expand Up @@ -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',
Expand Down
7 changes: 7 additions & 0 deletions src/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
5 changes: 4 additions & 1 deletion src/utils/org.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand Down
4 changes: 2 additions & 2 deletions src/views/assets/Asset/AssetList/components/BaseList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion src/views/profile/ProfileUpdate/PasswordUpdate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand All @@ -57,6 +60,9 @@ export default {
}
}
},
mounted() {
this.fieldsMeta.new_password.el.userIsOrgAdmin = this.object['is_org_admin']
},
methods: {
submitMethod() {
return 'put'
Expand Down
8 changes: 2 additions & 6 deletions src/views/settings/Ldap/SyncSettingDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export default {
component: Select2,
rules: [Required],
el: {
popperClass: 'sync-setting-org',
multiple: true,
ajax: {
url: '/api/v1/orgs/orgs/',
Expand Down Expand Up @@ -77,10 +78,5 @@ export default {
</script>

<style scoped>
::v-deep .el-select-dropdown .el-select-dropdown__item {
max-width: 600px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
</style>
2 changes: 1 addition & 1 deletion src/views/users/User/UserCreateUpdate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
}
Expand Down

0 comments on commit 94a02a2

Please sign in to comment.