mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-20 10:46:35 +00:00
feat: 权限管理中增加命令过滤菜单; 路由中添加CommandFilterACL,CommandGroup; 添加CommandFilterAclList,Create,Update;添加CommandGroupList,Create,Update;
This commit is contained in:
@@ -9,11 +9,13 @@
|
|||||||
"PleaseClickLeftAssetToViewGatheredUser": "Gathered user list, please click on the assets on the left to view"
|
"PleaseClickLeftAssetToViewGatheredUser": "Gathered user list, please click on the assets on the left to view"
|
||||||
},
|
},
|
||||||
"acl": {
|
"acl": {
|
||||||
|
"CommandFilterACL": "Command filter",
|
||||||
|
"CommandGroup": "Command group",
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
"user_username": "User (Username)",
|
"UserUsername": "User (Username)",
|
||||||
"asset_name": "Asset (Name)",
|
"AssetName": "Asset (Name)",
|
||||||
"asset_address": "Asset (IP/Host)",
|
"AssetAddress": "Asset (IP/Host)",
|
||||||
"account_username": "Account (Username)",
|
"AccountUsername": "Account (Username)",
|
||||||
"reviewer": "Reviewer",
|
"reviewer": "Reviewer",
|
||||||
"username": "Username",
|
"username": "Username",
|
||||||
"ip_group": "IP group",
|
"ip_group": "IP group",
|
||||||
@@ -846,6 +848,14 @@
|
|||||||
"UserAclLists": "User acl lists",
|
"UserAclLists": "User acl lists",
|
||||||
"UserAclDetail": "User acl detail",
|
"UserAclDetail": "User acl detail",
|
||||||
"AssetAclList": "Asset Acl",
|
"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",
|
"AssetAclCreate": "Asset acl create",
|
||||||
"AssetAclUpdate": "Asset acl update",
|
"AssetAclUpdate": "Asset acl update",
|
||||||
"AssetAclDetail": "Asset acl detail",
|
"AssetAclDetail": "Asset acl detail",
|
||||||
|
@@ -9,12 +9,14 @@
|
|||||||
"PleaseClickLeftAssetToViewGatheredUser": "ユーザーリストを収集し、左側の資産をクリックして表示します。"
|
"PleaseClickLeftAssetToViewGatheredUser": "ユーザーリストを収集し、左側の資産をクリックして表示します。"
|
||||||
},
|
},
|
||||||
"acl": {
|
"acl": {
|
||||||
|
"CommandFilterACL": "命令フィルタリング",
|
||||||
|
"CommandGroup": "コマンドグループ",
|
||||||
"name": "名前",
|
"name": "名前",
|
||||||
"user_username": "ユーザー (ユーザー名)",
|
"UserUsername": "ユーザー (ユーザー名)",
|
||||||
"asset_name": "アセット (名前)",
|
"AssetName": "アセット (名前)",
|
||||||
"asset_address": "アセット (IP/ホスト名)",
|
"AssetAddress": "アセット (IP/ホスト名)",
|
||||||
"reviewer": "決裁人",
|
"reviewer": "決裁人",
|
||||||
"account_username": "アカウント (ユーザー名)",
|
"AccountUsername": "アカウント (ユーザー名)",
|
||||||
"username": "ユーザー名",
|
"username": "ユーザー名",
|
||||||
"ip_group": "IPグループ",
|
"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",
|
"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": "ユーザーログインルールの更新",
|
"UserLoginACLUpdate": "ユーザーログインルールの更新",
|
||||||
"UserAclDetail": "ユーザーログインルールの詳細",
|
"UserAclDetail": "ユーザーログインルールの詳細",
|
||||||
"AssetAclList": "アセットログイン",
|
"AssetAclList": "アセットログイン",
|
||||||
|
"CommandFilterAclList": "命令フィルタリング",
|
||||||
|
"CommandFilterAclCreate": "コマンド フィルター規則を作成する",
|
||||||
|
"CommandFilterAclDetail": "CommandFilterAclDetail",
|
||||||
|
"CommandFilterAclUpdate": "コマンド フィルター規則を更新する",
|
||||||
|
"CommandGroupList": "コマンド グループ",
|
||||||
|
"CommandGroupCreate": "コマンド グループの作成",
|
||||||
|
"CommandGroupDetail": "コマンド グループの詳細",
|
||||||
|
"CommandGroupUpdate": "コマンド グループの更新",
|
||||||
"AssetAclCreate": "アセット登録ルールの作成",
|
"AssetAclCreate": "アセット登録ルールの作成",
|
||||||
"AssetAclUpdate": "アセット登録ルールの更新",
|
"AssetAclUpdate": "アセット登録ルールの更新",
|
||||||
"AssetAclDetail": "アセット登録ルール詳細",
|
"AssetAclDetail": "アセット登録ルール詳細",
|
||||||
|
@@ -9,11 +9,13 @@
|
|||||||
"PleaseClickLeftAssetToViewGatheredUser": "收集用户列表,点击左侧资产进行查看"
|
"PleaseClickLeftAssetToViewGatheredUser": "收集用户列表,点击左侧资产进行查看"
|
||||||
},
|
},
|
||||||
"acl": {
|
"acl": {
|
||||||
|
"CommandFilterACL": "命令过滤",
|
||||||
|
"CommandGroup": "命令组",
|
||||||
"name": "名称",
|
"name": "名称",
|
||||||
"user_username": "用户(用户名)",
|
"UserUsername": "用户(用户名)",
|
||||||
"asset_name": "资产(名称)",
|
"AssetName": "资产(名称)",
|
||||||
"asset_address": "资产(IP/主机名)",
|
"AssetAddress": "资产(IP/主机名)",
|
||||||
"account_username": "账号(用户名)",
|
"AccountUsername": "账号(用户名)",
|
||||||
"reviewer": "审批人",
|
"reviewer": "审批人",
|
||||||
"username": "用户名",
|
"username": "用户名",
|
||||||
"ip_group": "IP 组",
|
"ip_group": "IP 组",
|
||||||
@@ -933,6 +935,14 @@
|
|||||||
"UserLoginACLUpdate": "更新用户登录规则",
|
"UserLoginACLUpdate": "更新用户登录规则",
|
||||||
"UserAclDetail": "用户登录规则详情",
|
"UserAclDetail": "用户登录规则详情",
|
||||||
"AssetAclList": "资产登录",
|
"AssetAclList": "资产登录",
|
||||||
|
"CommandFilterAclList": "命令过滤",
|
||||||
|
"CommandFilterAclCreate": "创建命令过滤规则",
|
||||||
|
"CommandFilterAclDetail": "命令过滤规则详情",
|
||||||
|
"CommandFilterAclUpdate": "更新命令过滤规则",
|
||||||
|
"CommandGroupList": "命令组",
|
||||||
|
"CommandGroupCreate": "创建命令组",
|
||||||
|
"CommandGroupDetail": "命令组详情",
|
||||||
|
"CommandGroupUpdate": "更新命令组",
|
||||||
"AssetAclCreate": "创建资产登录规则",
|
"AssetAclCreate": "创建资产登录规则",
|
||||||
"AssetAclUpdate": "更新资产登录规则",
|
"AssetAclUpdate": "更新资产登录规则",
|
||||||
"AssetAclDetail": "资产登录规则详情",
|
"AssetAclDetail": "资产登录规则详情",
|
||||||
|
@@ -78,5 +78,83 @@ export default [
|
|||||||
meta: { title: i18n.t('route.AssetAclUpdate') }
|
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'
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@@ -34,15 +34,15 @@ export default {
|
|||||||
value: this.object.name
|
value: this.object.name
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: this.$t('acl.user_username'),
|
key: this.$t('acl.UserUsername'),
|
||||||
value: this.object.users.username_group.toString()
|
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()
|
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()
|
value: this.object.assets.address_group.toString()
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@@ -15,7 +15,7 @@ export default {
|
|||||||
url: '/api/v1/acls/login-asset-acls/',
|
url: '/api/v1/acls/login-asset-acls/',
|
||||||
columns: [
|
columns: [
|
||||||
'name', 'user_username_group', 'hostname_group', 'ip_group', 'name_group',
|
'name', 'user_username_group', 'hostname_group', 'ip_group', 'name_group',
|
||||||
'protocol_group', 'systemuser_username_group', 'reviewers', 'priority',
|
'reviewers', 'priority',
|
||||||
'is_active', 'comment', 'actions'
|
'is_active', 'comment', 'actions'
|
||||||
],
|
],
|
||||||
columnsShow: {
|
columnsShow: {
|
||||||
|
@@ -0,0 +1,87 @@
|
|||||||
|
<template>
|
||||||
|
<GenericCreateUpdatePage
|
||||||
|
:fields="fields"
|
||||||
|
:initial="initial"
|
||||||
|
:fields-meta="fieldsMeta"
|
||||||
|
:url="url"
|
||||||
|
v-bind="$data"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { GenericCreateUpdatePage } from '@/layout/components'
|
||||||
|
import rules from '@/components/DataForm/rules'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'CommandFilterAclCreateUpdate',
|
||||||
|
components: {
|
||||||
|
GenericCreateUpdatePage
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
initial: {
|
||||||
|
is_active: true
|
||||||
|
},
|
||||||
|
fields: [
|
||||||
|
[this.$t('common.Basic'), ['name']],
|
||||||
|
[this.$t('perms.User'), ['users']],
|
||||||
|
[this.$t('perms.Asset'), ['assets']],
|
||||||
|
[this.$t('perms.Account'), ['accounts']],
|
||||||
|
[this.$t('acl.CommandGroup'), ['command_groups']],
|
||||||
|
[this.$t('common.action'), ['action', 'reviewers']],
|
||||||
|
[this.$t('common.Other'), ['priority', 'is_active', 'comment']]
|
||||||
|
],
|
||||||
|
url: '/api/v1/acls/command-filter-acls/',
|
||||||
|
createSuccessNextRoute: { name: 'CommandFilterAclList' },
|
||||||
|
fieldsMeta: {
|
||||||
|
users: {
|
||||||
|
fields: ['username_group']
|
||||||
|
},
|
||||||
|
assets: {
|
||||||
|
fields: ['name_group', 'address_group']
|
||||||
|
},
|
||||||
|
accounts: {
|
||||||
|
fields: ['username_group']
|
||||||
|
},
|
||||||
|
priority: {
|
||||||
|
// helpText: '优先级可选范围为1-100,1最低优先级,100最高优先级'
|
||||||
|
// helpText: this.$t('assets.CommandFilterRulePriorityHelpText')
|
||||||
|
},
|
||||||
|
action: {
|
||||||
|
},
|
||||||
|
command_groups: {
|
||||||
|
el: {
|
||||||
|
value: [],
|
||||||
|
ajax: {
|
||||||
|
url: '/api/v1/acls/command-groups/?fields_size=mini',
|
||||||
|
transformOption: (item) => {
|
||||||
|
return { label: item.name, value: item.id }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
reviewers: {
|
||||||
|
hidden: (item) => item.action !== 'review',
|
||||||
|
rules: [rules.RequiredChange],
|
||||||
|
el: {
|
||||||
|
value: [],
|
||||||
|
ajax: {
|
||||||
|
url: '/api/v1/users/users/?fields_size=mini',
|
||||||
|
transformOption: (item) => {
|
||||||
|
return { label: item.name + '(' + item.username + ')', value: item.id }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
is_active: {
|
||||||
|
type: 'checkbox'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
@@ -0,0 +1,13 @@
|
|||||||
|
<template>
|
||||||
|
<div />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'CommandFilterAclDetail'
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
@@ -0,0 +1,95 @@
|
|||||||
|
<template>
|
||||||
|
<ListTable :table-config="tableConfig" :header-actions="headerActions" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { ListTable } from '@/components'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
ListTable
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tableConfig: {
|
||||||
|
url: '/api/v1/acls/command-filter-acls/',
|
||||||
|
permissions: {
|
||||||
|
app: 'acls',
|
||||||
|
resource: 'commandfilteracl'
|
||||||
|
},
|
||||||
|
columns: [
|
||||||
|
'name', 'user_username_group', 'asset_name_group', 'asset_address_group',
|
||||||
|
'account_username_group', 'command_groups', 'action',
|
||||||
|
'date_created', 'created_by', 'org_name',
|
||||||
|
'comment', 'is_active', 'actions'
|
||||||
|
],
|
||||||
|
columnsShow: {
|
||||||
|
min: ['name', 'actions'],
|
||||||
|
default: [
|
||||||
|
'name', 'user_username_group', 'asset_name_group', 'asset_address_group',
|
||||||
|
'account_username_group', 'command_groups', 'comment', 'actions'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
columnsMeta: {
|
||||||
|
user_username_group: {
|
||||||
|
prop: 'users.username_group',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
formatter: function(row) {
|
||||||
|
return <span> {row.users.username_group.toString()} </span>
|
||||||
|
},
|
||||||
|
label: this.$t('acl.UserUsername')
|
||||||
|
},
|
||||||
|
asset_name_group: {
|
||||||
|
prop: 'assets.name_group',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
formatter: function(row) {
|
||||||
|
return <span> {row.assets.name_group.toString()} </span>
|
||||||
|
},
|
||||||
|
label: this.$t('acl.AssetName')
|
||||||
|
},
|
||||||
|
asset_address_group: {
|
||||||
|
prop: 'assets.address_group',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
formatter: function(row) {
|
||||||
|
return <span> {row.assets.address_group.toString()} </span>
|
||||||
|
},
|
||||||
|
label: this.$t('acl.AssetAddress')
|
||||||
|
},
|
||||||
|
account_username_group: {
|
||||||
|
prop: 'accounts.username_group',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
formatter: function(row) {
|
||||||
|
return <span> {row.accounts.username_group.toString()} </span>
|
||||||
|
},
|
||||||
|
label: this.$t('acl.AccountUsername')
|
||||||
|
},
|
||||||
|
command_groups: {
|
||||||
|
label: this.$t('acl.CommandGroup'),
|
||||||
|
formatter: function(row) {
|
||||||
|
return <span> { row.command_groups.length }</span>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headerActions: {
|
||||||
|
hasRightActions: true,
|
||||||
|
hasExport: false,
|
||||||
|
hasImport: false,
|
||||||
|
hasRefresh: true,
|
||||||
|
hasSearch: true,
|
||||||
|
hasMoreActions: false,
|
||||||
|
createRoute: 'CommandFilterAclCreate',
|
||||||
|
canCreate: () => {
|
||||||
|
return this.$hasPerm('acls.add_commandfilteracl')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
@@ -0,0 +1,60 @@
|
|||||||
|
<template>
|
||||||
|
<GenericCreateUpdatePage
|
||||||
|
:fields="fields"
|
||||||
|
:initial="initial"
|
||||||
|
:fields-meta="fieldsMeta"
|
||||||
|
:url="url"
|
||||||
|
v-bind="$data"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import GenericCreateUpdatePage from '@/layout/components/GenericCreateUpdatePage'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'CommandGroupCreateUpdate',
|
||||||
|
components: { GenericCreateUpdatePage },
|
||||||
|
data() {
|
||||||
|
const regexPlaceholder = 'rm.*|reboot|shutdown'
|
||||||
|
const commandPlaceholder = 'rm\rreboot'
|
||||||
|
const commandHelpText = this.$t('assets.CommandFilterRuleContentHelpText')
|
||||||
|
const vm = this
|
||||||
|
return {
|
||||||
|
initial: {},
|
||||||
|
fields: [
|
||||||
|
[this.$t('common.Basic'), ['name', 'type', 'content', 'ignore_case', 'comment']]
|
||||||
|
],
|
||||||
|
url: `/api/v1/acls/command-groups/`,
|
||||||
|
createSuccessNextRoute: { name: 'CommandFilterAclList' },
|
||||||
|
fieldsMeta: {
|
||||||
|
type: {
|
||||||
|
on: {
|
||||||
|
change: ([val]) => {
|
||||||
|
if (val === 'command') {
|
||||||
|
vm.fieldsMeta.content.el.placeholder = commandPlaceholder
|
||||||
|
vm.fieldsMeta.content.helpText = commandHelpText
|
||||||
|
} else {
|
||||||
|
vm.fieldsMeta.content.el.placeholder = regexPlaceholder
|
||||||
|
vm.fieldsMeta.content.helpText = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
content: {
|
||||||
|
type: 'input',
|
||||||
|
el: {
|
||||||
|
type: 'textarea',
|
||||||
|
placeholder: 'rm.*|reboot|shutdown',
|
||||||
|
rows: 4
|
||||||
|
},
|
||||||
|
helpText: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='less' scoped>
|
||||||
|
|
||||||
|
</style>
|
13
src/views/acl/CommandAcl/CommandGroup/CommandGroupDetail.vue
Normal file
13
src/views/acl/CommandAcl/CommandGroup/CommandGroupDetail.vue
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<template>
|
||||||
|
<div />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'CommandGroupDetail'
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
51
src/views/acl/CommandAcl/CommandGroup/CommandGroupList.vue
Normal file
51
src/views/acl/CommandAcl/CommandGroup/CommandGroupList.vue
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
<template>
|
||||||
|
<ListTable :table-config="tableConfig" :header-actions="headerActions" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { ListTable } from '@/components'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
ListTable
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tableConfig: {
|
||||||
|
url: '/api/v1/acls/command-groups/',
|
||||||
|
permissions: {
|
||||||
|
app: 'acls',
|
||||||
|
resource: 'commandgroup'
|
||||||
|
},
|
||||||
|
columns: [
|
||||||
|
'name', 'content', 'actions'
|
||||||
|
],
|
||||||
|
columnsShow: {
|
||||||
|
min: ['name', 'actions'],
|
||||||
|
default: ['name', 'content', 'actions']
|
||||||
|
},
|
||||||
|
columnsMeta: {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headerActions: {
|
||||||
|
hasRightActions: true,
|
||||||
|
hasExport: false,
|
||||||
|
hasImport: false,
|
||||||
|
hasRefresh: true,
|
||||||
|
hasSearch: true,
|
||||||
|
hasMoreActions: false,
|
||||||
|
createRoute: 'CommandGroupCreate',
|
||||||
|
canCreate: () => {
|
||||||
|
return this.$hasPerm('acls.add_commandgroup')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
55
src/views/acl/CommandAcl/index.vue
Normal file
55
src/views/acl/CommandAcl/index.vue
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
<template>
|
||||||
|
<TabPage
|
||||||
|
:active-menu.sync="config.activeMenu"
|
||||||
|
:submenu="config.submenu"
|
||||||
|
@tab-click="handleTabClick"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { TabPage } from '@/layout/components'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Index',
|
||||||
|
components: {
|
||||||
|
TabPage
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
config: {
|
||||||
|
activeMenu: 'CommandFilterACL',
|
||||||
|
submenu: [
|
||||||
|
{
|
||||||
|
title: this.$t('acl.CommandFilterACL'),
|
||||||
|
name: 'CommandFilterACL',
|
||||||
|
component: () => import('@/views/acl/CommandAcl/CommandFilterAcl/CommandFilterAclList.vue')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('acl.CommandGroup'),
|
||||||
|
name: 'CommandGroup',
|
||||||
|
component: () => import('@/views/acl/CommandAcl/CommandGroup/CommandGroupList.vue')
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleTabClick(tab) {
|
||||||
|
const query = _.cloneDeep(this.$route.query)
|
||||||
|
const newQuery = {
|
||||||
|
...query,
|
||||||
|
activeTab: tab.name
|
||||||
|
}
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$router.replace({ query: newQuery })
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
Reference in New Issue
Block a user