diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index 0ca00fa23..b9bfee9d6 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -17,6 +17,7 @@ "date_created": "Date created", "created_by": "Created by", "host": "Asset", + "account": "Account", "system_user": "System user", "username_group": "Username group", "hostname_group": "Hostname group", diff --git a/src/i18n/langs/ja.json b/src/i18n/langs/ja.json index fc307973e..02ce68a5b 100644 --- a/src/i18n/langs/ja.json +++ b/src/i18n/langs/ja.json @@ -20,6 +20,7 @@ "date_created": "時間の作成", "created_by": "作成者", "host": "資産情報", + "account": "アカウント情報", "users": "ユーザー", "system_user": "システムユーザー", "username_group": "ユーザー名", diff --git a/src/i18n/langs/zh.json b/src/i18n/langs/zh.json index 94f6c6464..d8205560f 100644 --- a/src/i18n/langs/zh.json +++ b/src/i18n/langs/zh.json @@ -20,6 +20,7 @@ "date_created": "创建时间", "created_by": "创建者", "host": "资产信息", + "account": "账号信息", "users": "用户", "system_user": "系统用户", "username_group": "用户名", diff --git a/src/router/console/acls.js b/src/router/console/acls.js deleted file mode 100644 index a2b3ff440..000000000 --- a/src/router/console/acls.js +++ /dev/null @@ -1,44 +0,0 @@ -import i18n from '@/i18n/i18n' -import empty from '@/layout/empty' - -export default [ - { - path: 'host-acl', - component: empty, - redirect: '', - meta: { - title: i18n.t('route.AssetAclList'), - licenseRequired: true, - resource: 'loginassetacl' - }, - children: [ - { - path: '', - name: 'AssetAclList', - component: () => import('@/views/acl/AssetAcl/AssetAclList'), - meta: { title: i18n.t('route.AssetAclList') } - }, - { - path: 'create', - name: 'AssetAclCreate', - component: () => import('@/views/acl/AssetAcl/AssetAclCreateUpdate'), - hidden: true, - meta: { title: i18n.t('route.AssetAclCreate') } - }, - { - path: ':id', - name: 'AssetAclDetail', - component: () => import('@/views/acl/AssetAcl/AssetAclDetail'), - hidden: true, - meta: { title: i18n.t('route.AssetAclDetail') } - }, - { - path: ':id/update', - name: 'AssetAclUpdate', - component: () => import('@/views/acl/AssetAcl/AssetAclCreateUpdate'), - hidden: true, - meta: { title: i18n.t('route.AssetAclUpdate') } - } - ] - } -] diff --git a/src/router/console/index.js b/src/router/console/index.js index 7b330fae2..d3edd5bbf 100644 --- a/src/router/console/index.js +++ b/src/router/console/index.js @@ -7,7 +7,6 @@ import UsersRoute from './users' import AssetsRoute from './assets' import PermsRoute from './perms' import TaskRoutes from './tasks' -import AclRoutes from './acls' import AccountRoutes from './accounts' export default { @@ -76,17 +75,6 @@ export default { }, children: PermsRoute }, - { - path: '/console/acls', - component: empty, - name: 'Acl', - meta: { - licenseRequired: true, - title: i18n.t('route.Acl'), - icon: 'lock' - }, - children: AclRoutes - }, { path: '/console/tasks', component: empty, diff --git a/src/router/console/perms.js b/src/router/console/perms.js index 969956252..f550dc840 100644 --- a/src/router/console/perms.js +++ b/src/router/console/perms.js @@ -38,5 +38,45 @@ export default [ meta: { title: i18n.t('route.AssetPermissionDetail') } } ] + }, + { + path: 'host-acls', + component: empty, + redirect: '', + meta: { + title: i18n.t('route.AssetAclList'), + licenseRequired: true, + app: 'acls', + resource: 'loginassetacl' + }, + children: [ + { + path: '', + name: 'AssetAclList', + component: () => import('@/views/acl/AssetAcl/AssetAclList'), + meta: { title: i18n.t('route.AssetAclList') } + }, + { + path: 'create', + name: 'AssetAclCreate', + component: () => import('@/views/acl/AssetAcl/AssetAclCreateUpdate'), + hidden: true, + meta: { title: i18n.t('route.AssetAclCreate') } + }, + { + path: ':id', + name: 'AssetAclDetail', + component: () => import('@/views/acl/AssetAcl/AssetAclDetail'), + hidden: true, + meta: { title: i18n.t('route.AssetAclDetail') } + }, + { + path: ':id/update', + name: 'AssetAclUpdate', + component: () => import('@/views/acl/AssetAcl/AssetAclCreateUpdate'), + hidden: true, + meta: { title: i18n.t('route.AssetAclUpdate') } + } + ] } ] diff --git a/src/views/acl/AssetAcl/AssetAclCreateUpdate.vue b/src/views/acl/AssetAcl/AssetAclCreateUpdate.vue index 620526e6f..983db8294 100644 --- a/src/views/acl/AssetAcl/AssetAclCreateUpdate.vue +++ b/src/views/acl/AssetAcl/AssetAclCreateUpdate.vue @@ -14,24 +14,23 @@ export default { return { initial: { action: 'login_confirm', - system_users: { - name_group: '*', - protocol_group: '*', - username_group: '*' - }, users: { username_group: '*' }, assets: { hostname_group: '*', ip_group: '*' + }, + accounts: { + name_group: '*', + username_group: '*' } }, fields: [ [this.$t('common.Basic'), ['name', 'priority']], [this.$t('acl.users'), ['users']], [this.$t('acl.host'), ['assets']], - [this.$t('acl.system_user'), ['system_users']], + [this.$t('acl.account'), ['accounts']], [this.$t('acl.action'), ['action', 'reviewers']], [this.$t('common.Other'), ['is_active', 'comment']] ], @@ -48,8 +47,8 @@ export default { } }, - system_users: { - fields: ['name_group', 'username_group', 'protocol_group'] + accounts: { + fields: ['name_group', 'username_group'] }, reviewers: { el: { @@ -67,9 +66,8 @@ export default { afterGetFormValue(formValue) { formValue.assets.ip_group = formValue.assets.ip_group.toString() formValue.assets.hostname_group = formValue.assets.hostname_group.toString() - formValue.system_users.name_group = formValue.system_users.name_group.toString() - formValue.system_users.protocol_group = formValue.system_users.protocol_group.toString() - formValue.system_users.username_group = formValue.system_users.username_group.toString() + formValue.accounts.name_group = formValue.accounts.name_group.toString() + formValue.accounts.username_group = formValue.accounts.username_group.toString() formValue.users.username_group = formValue.users.username_group.toString() return formValue }, @@ -80,14 +78,11 @@ export default { if (!Array.isArray(value.assets.hostname_group)) { value.assets.hostname_group = value.assets.hostname_group ? value.assets.hostname_group.split(',') : [] } - if (!Array.isArray(value.system_users.protocol_group)) { - value.system_users.protocol_group = value.system_users.protocol_group ? value.system_users.protocol_group.split(',') : [] + if (!Array.isArray(value.accounts.name_group)) { + value.accounts.name_group = value.accounts.name_group ? value.accounts.name_group.split(',') : [] } - if (!Array.isArray(value.system_users.name_group)) { - value.system_users.name_group = value.system_users.name_group ? value.system_users.name_group.split(',') : [] - } - if (!Array.isArray(value.system_users.username_group)) { - value.system_users.username_group = value.system_users.username_group ? value.system_users.username_group.split(',') : [] + if (!Array.isArray(value.accounts.username_group)) { + value.accounts.username_group = value.accounts.username_group ? value.accounts.username_group.split(',') : [] } if (!Array.isArray(value.users.username_group)) { value.users.username_group = value.users.username_group ? value.users.username_group.split(',') : []