diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index 088dc44e6..8539ff7d2 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -9,11 +9,13 @@ "PleaseClickLeftAssetToViewGatheredUser": "Gathered user list, please click on the assets on the left to view" }, "acl": { + "CommandFilterACL": "Command filter", + "CommandGroup": "Command group", "name": "Name", - "user_username": "User (Username)", - "asset_name": "Asset (Name)", - "asset_address": "Asset (IP/Host)", - "account_username": "Account (Username)", + "UserUsername": "User (Username)", + "AssetName": "Asset (Name)", + "AssetAddress": "Asset (IP/Host)", + "AccountUsername": "Account (Username)", "reviewer": "Reviewer", "username": "Username", "ip_group": "IP group", @@ -846,6 +848,14 @@ "UserAclLists": "User acl lists", "UserAclDetail": "User acl detail", "AssetAclList": "Asset Acl", + "CommandFilterAclList": "Command Acl", + "CommandFilterAclCreate": "Command Acl create", + "CommandFilterAclDetail": "Command Acl detail", + "CommandFilterAclUpdate": "command Acl update", + "CommandGroupList": "Command group", + "CommandGroupCreate": "Command group create", + "CommandGroupDetail": "Command group detail", + "CommandGroupUpdate": "Command group update", "AssetAclCreate": "Asset acl create", "AssetAclUpdate": "Asset acl update", "AssetAclDetail": "Asset acl detail", diff --git a/src/i18n/langs/ja.json b/src/i18n/langs/ja.json index 9119e961b..203f054e7 100644 --- a/src/i18n/langs/ja.json +++ b/src/i18n/langs/ja.json @@ -9,12 +9,14 @@ "PleaseClickLeftAssetToViewGatheredUser": "ユーザーリストを収集し、左側の資産をクリックして表示します。" }, "acl": { + "CommandFilterACL": "命令フィルタリング", + "CommandGroup": "コマンドグループ", "name": "名前", - "user_username": "ユーザー (ユーザー名)", - "asset_name": "アセット (名前)", - "asset_address": "アセット (IP/ホスト名)", + "UserUsername": "ユーザー (ユーザー名)", + "AssetName": "アセット (名前)", + "AssetAddress": "アセット (IP/ホスト名)", "reviewer": "決裁人", - "account_username": "アカウント (ユーザー名)", + "AccountUsername": "アカウント (ユーザー名)", "username": "ユーザー名", "ip_group": "IPグループ", "ip_group_help_text": "コンマ区切りの文字列で、 * はすべてにマッチすることを示します。例: 192.168.10.1、192.168.1.0/24、10.1.1-10.1.1. 20、2001:db8:2de::e 13、2001:db8:1a:1110::/64", @@ -858,6 +860,14 @@ "UserLoginACLUpdate": "ユーザーログインルールの更新", "UserAclDetail": "ユーザーログインルールの詳細", "AssetAclList": "アセットログイン", + "CommandFilterAclList": "命令フィルタリング", + "CommandFilterAclCreate": "コマンド フィルター規則を作成する", + "CommandFilterAclDetail": "CommandFilterAclDetail", + "CommandFilterAclUpdate": "コマンド フィルター規則を更新する", + "CommandGroupList": "コマンド グループ", + "CommandGroupCreate": "コマンド グループの作成", + "CommandGroupDetail": "コマンド グループの詳細", + "CommandGroupUpdate": "コマンド グループの更新", "AssetAclCreate": "アセット登録ルールの作成", "AssetAclUpdate": "アセット登録ルールの更新", "AssetAclDetail": "アセット登録ルール詳細", diff --git a/src/i18n/langs/zh.json b/src/i18n/langs/zh.json index 5014e4687..1e0d1d8b2 100644 --- a/src/i18n/langs/zh.json +++ b/src/i18n/langs/zh.json @@ -9,11 +9,13 @@ "PleaseClickLeftAssetToViewGatheredUser": "收集用户列表,点击左侧资产进行查看" }, "acl": { + "CommandFilterACL": "命令过滤", + "CommandGroup": "命令组", "name": "名称", - "user_username": "用户(用户名)", - "asset_name": "资产(名称)", - "asset_address": "资产(IP/主机名)", - "account_username": "账号(用户名)", + "UserUsername": "用户(用户名)", + "AssetName": "资产(名称)", + "AssetAddress": "资产(IP/主机名)", + "AccountUsername": "账号(用户名)", "reviewer": "审批人", "username": "用户名", "ip_group": "IP 组", @@ -933,6 +935,14 @@ "UserLoginACLUpdate": "更新用户登录规则", "UserAclDetail": "用户登录规则详情", "AssetAclList": "资产登录", + "CommandFilterAclList": "命令过滤", + "CommandFilterAclCreate": "创建命令过滤规则", + "CommandFilterAclDetail": "命令过滤规则详情", + "CommandFilterAclUpdate": "更新命令过滤规则", + "CommandGroupList": "命令组", + "CommandGroupCreate": "创建命令组", + "CommandGroupDetail": "命令组详情", + "CommandGroupUpdate": "更新命令组", "AssetAclCreate": "创建资产登录规则", "AssetAclUpdate": "更新资产登录规则", "AssetAclDetail": "资产登录规则详情", diff --git a/src/router/console/perms.js b/src/router/console/perms.js index f550dc840..33d694b38 100644 --- a/src/router/console/perms.js +++ b/src/router/console/perms.js @@ -78,5 +78,83 @@ export default [ meta: { title: i18n.t('route.AssetAclUpdate') } } ] + }, + { + path: 'cmd-acls', + component: empty, + redirect: '', + meta: { + title: i18n.t('route.CommandFilterAclList'), + app: 'acls', + resource: 'commandfilteracl' + }, + children: [ + // Command Filter ACL + { + path: '', + name: 'CommandFilterAclList', + component: () => import('@/views/acl/CommandAcl/index'), + hidden: true, + meta: { title: i18n.t('route.CommandFilterAclList') } + }, + { + path: 'create', + name: 'CommandFilterAclCreate', + component: () => import('@/views/acl/CommandAcl/CommandFilterAcl/CommandFilterAclCreateUpdate'), + hidden: true, + meta: { title: i18n.t('route.CommandFilterAclCreate') } + }, + { + path: ':id', + name: 'CommandFilterAclDetail', + component: () => import('@/views/acl/CommandAcl/CommandFilterAcl/CommandFilterAclDetail'), + hidden: true, + meta: { title: i18n.t('route.CommandFilterAclDetail') } + }, + { + path: ':id/update', + name: 'CommandFilterAclUpdate', + component: () => import('@/views/acl/CommandAcl/CommandFilterAcl/CommandFilterAclCreateUpdate'), + hidden: true, + meta: { title: i18n.t('route.CommandFilterAclUpdate') } + }, + // Command Group + { + path: '', + name: 'CommandGroupList', + component: () => import('@/views/acl/CommandAcl/CommandGroup/CommandGroupList'), + meta: { title: i18n.t('route.CommandGroupList') }, + hidden: true, + app: 'acls', + resource: 'commandgroup' + }, + { + path: 'create', + name: 'CommandGroupCreate', + component: () => import('@/views/acl/CommandAcl/CommandGroup/CommandGroupCreateUpdate'), + hidden: true, + meta: { title: i18n.t('route.CommandGroupCreate') }, + app: 'acls', + resource: 'commandgroup' + }, + { + path: ':id', + name: 'CommandGroupDetail', + component: () => import('@/views/acl/CommandAcl/CommandGroup/CommandGroupDetail'), + hidden: true, + meta: { title: i18n.t('route.CommandGroupDetail') }, + app: 'acls', + resource: 'commandgroup' + }, + { + path: ':id/update', + name: 'CommandGroupUpdate', + component: () => import('@/views/acl/CommandAcl/CommandGroup/CommandGroupCreateUpdate'), + hidden: true, + meta: { title: i18n.t('route.CommandGroupUpdate') }, + app: 'acls', + resource: 'commandgroup' + } + ] } ] diff --git a/src/views/acl/AssetAcl/AssetAclDetail/detail.vue b/src/views/acl/AssetAcl/AssetAclDetail/detail.vue index d28f34739..a709e5edb 100644 --- a/src/views/acl/AssetAcl/AssetAclDetail/detail.vue +++ b/src/views/acl/AssetAcl/AssetAclDetail/detail.vue @@ -34,15 +34,15 @@ export default { value: this.object.name }, { - key: this.$t('acl.user_username'), + key: this.$t('acl.UserUsername'), value: this.object.users.username_group.toString() }, { - key: this.$t('acl.asset_name'), + key: this.$t('acl.AssetName'), value: this.object.assets.name_group.toString() }, { - key: this.$t('acl.asset_address'), + key: this.$t('acl.AssetAddress'), value: this.object.assets.address_group.toString() }, { diff --git a/src/views/acl/AssetAcl/AssetAclList.vue b/src/views/acl/AssetAcl/AssetAclList.vue index 410ff7b1a..aefa83e85 100644 --- a/src/views/acl/AssetAcl/AssetAclList.vue +++ b/src/views/acl/AssetAcl/AssetAclList.vue @@ -15,7 +15,7 @@ export default { url: '/api/v1/acls/login-asset-acls/', columns: [ 'name', 'user_username_group', 'hostname_group', 'ip_group', 'name_group', - 'protocol_group', 'systemuser_username_group', 'reviewers', 'priority', + 'reviewers', 'priority', 'is_active', 'comment', 'actions' ], columnsShow: { diff --git a/src/views/acl/CommandAcl/CommandFilterAcl/CommandFilterAclCreateUpdate.vue b/src/views/acl/CommandAcl/CommandFilterAcl/CommandFilterAclCreateUpdate.vue new file mode 100644 index 000000000..11364ae80 --- /dev/null +++ b/src/views/acl/CommandAcl/CommandFilterAcl/CommandFilterAclCreateUpdate.vue @@ -0,0 +1,87 @@ + + + + + diff --git a/src/views/acl/CommandAcl/CommandFilterAcl/CommandFilterAclDetail.vue b/src/views/acl/CommandAcl/CommandFilterAcl/CommandFilterAclDetail.vue new file mode 100644 index 000000000..49c52f774 --- /dev/null +++ b/src/views/acl/CommandAcl/CommandFilterAcl/CommandFilterAclDetail.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/src/views/acl/CommandAcl/CommandFilterAcl/CommandFilterAclList.vue b/src/views/acl/CommandAcl/CommandFilterAcl/CommandFilterAclList.vue new file mode 100644 index 000000000..fcd6e9575 --- /dev/null +++ b/src/views/acl/CommandAcl/CommandFilterAcl/CommandFilterAclList.vue @@ -0,0 +1,95 @@ + + + + + diff --git a/src/views/acl/CommandAcl/CommandGroup/CommandGroupCreateUpdate.vue b/src/views/acl/CommandAcl/CommandGroup/CommandGroupCreateUpdate.vue new file mode 100644 index 000000000..4c6369501 --- /dev/null +++ b/src/views/acl/CommandAcl/CommandGroup/CommandGroupCreateUpdate.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/src/views/acl/CommandAcl/CommandGroup/CommandGroupDetail.vue b/src/views/acl/CommandAcl/CommandGroup/CommandGroupDetail.vue new file mode 100644 index 000000000..b64e6ce67 --- /dev/null +++ b/src/views/acl/CommandAcl/CommandGroup/CommandGroupDetail.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/src/views/acl/CommandAcl/CommandGroup/CommandGroupList.vue b/src/views/acl/CommandAcl/CommandGroup/CommandGroupList.vue new file mode 100644 index 000000000..117ff10f8 --- /dev/null +++ b/src/views/acl/CommandAcl/CommandGroup/CommandGroupList.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/src/views/acl/CommandAcl/index.vue b/src/views/acl/CommandAcl/index.vue new file mode 100644 index 000000000..9b290d8a9 --- /dev/null +++ b/src/views/acl/CommandAcl/index.vue @@ -0,0 +1,55 @@ + + + + +