mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-19 17:54:37 +00:00
[Update] 增加授权列表组件
This commit is contained in:
@@ -291,10 +291,10 @@ const cn = {
|
|||||||
'Asset permissions': '资产授权',
|
'Asset permissions': '资产授权',
|
||||||
'name': '名称',
|
'name': '名称',
|
||||||
'user': '用户',
|
'user': '用户',
|
||||||
'user_group': '用户组',
|
'userGroup': '用户组',
|
||||||
'asset': '资产',
|
'asset': '资产',
|
||||||
'node': '节点',
|
'node': '节点',
|
||||||
'system_user': '系统用户',
|
'systemUser': '系统用户',
|
||||||
'validity': '有效',
|
'validity': '有效',
|
||||||
'action': '动作',
|
'action': '动作',
|
||||||
'update': '更新',
|
'update': '更新',
|
||||||
@@ -315,14 +315,14 @@ const cn = {
|
|||||||
'users_and_user_groups': '用户或用户组',
|
'users_and_user_groups': '用户或用户组',
|
||||||
'assets_and_node': '资产或节点',
|
'assets_and_node': '资产或节点',
|
||||||
//
|
//
|
||||||
'remote_app': '远程应用',
|
'RemoteApp': '远程应用',
|
||||||
'remote_app_permission_list': '远程应用授权列表',
|
'remote_app_permission_list': '远程应用授权列表',
|
||||||
'remote_app_permission_detail': '远程应用授权详情',
|
'remote_app_permission_detail': '远程应用授权详情',
|
||||||
'create_remote_app_permission': '创建远程应用授权规则',
|
'create_remote_app_permission': '创建远程应用授权规则',
|
||||||
'update_remote_app_permission': '更新远程应用授权规则',
|
'update_remote_app_permission': '更新远程应用授权规则',
|
||||||
'remote_app_count': '远程应用数量',
|
'remote_app_count': '远程应用数量',
|
||||||
//
|
//
|
||||||
'database_app': '数据库应用',
|
'DatabaseaApp': '数据库应用',
|
||||||
'database_app_permission_list': '数据库应用授权列表',
|
'database_app_permission_list': '数据库应用授权列表',
|
||||||
'database_app_permission_detail': '数据库应用授权详情',
|
'database_app_permission_detail': '数据库应用授权详情',
|
||||||
'create_database_app_permission': '创建数据库应用授权规则',
|
'create_database_app_permission': '创建数据库应用授权规则',
|
||||||
|
@@ -190,26 +190,26 @@ export const constantRoutes = [
|
|||||||
{
|
{
|
||||||
path: '/perms/',
|
path: '/perms/',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/perms/asset-permission/',
|
redirect: '/perms/asset-permissions/',
|
||||||
name: 'Perms',
|
name: 'Perms',
|
||||||
meta: { title: 'Perms', icon: 'edit' },
|
meta: { title: 'Perms', icon: 'edit' },
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'asset-permissions',
|
path: 'asset-permissions',
|
||||||
name: 'AssetPermissionList',
|
name: 'AssetPermissionList',
|
||||||
component: import('@/views/tree/index'),
|
component: () => import('@/views/perms/AssetPermissionList'),
|
||||||
meta: { title: 'AssetPermission' }
|
meta: { title: 'AssetPermission' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'remote-app-permissions',
|
path: 'remote-app-permissions',
|
||||||
name: 'RemoteAppPermissionList',
|
name: 'RemoteAppPermissionList',
|
||||||
component: () => import('@/views/tree/index'),
|
component: () => import('@/views/perms/RemoteAppPermissionList'),
|
||||||
meta: { title: 'RemoteAppPermission' }
|
meta: { title: 'RemoteAppPermission' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'database-app-permissions',
|
path: 'database-app-permissions',
|
||||||
name: 'DatabaseAppPermissionList',
|
name: 'DatabaseAppPermissionList',
|
||||||
component: () => import('@/views/tree/index'),
|
component: () => import('@/views/perms/DatabaseAppPermissionList'),
|
||||||
meta: { title: 'DatabaseAppPermission' }
|
meta: { title: 'DatabaseAppPermission' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
68
src/views/perms/AssetPermissionList.vue
Normal file
68
src/views/perms/AssetPermissionList.vue
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
<template>
|
||||||
|
<GenericListPage :table-config="tableConfig" :header-actions="headerActions" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { GenericListPage } from '@/layout/components'
|
||||||
|
import DetailFormatter from '@/components/DataTable/formatters/DetailFormatter'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
GenericListPage
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showTree: true,
|
||||||
|
tableConfig: {
|
||||||
|
url: '/api/v1/perms/asset-permissions/',
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'name',
|
||||||
|
label: this.$t('common.name'),
|
||||||
|
formatter: DetailFormatter,
|
||||||
|
sortable: true,
|
||||||
|
route: 'AssetPermissionDetail'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'users',
|
||||||
|
label: this.$t('perms.user')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'user_groups',
|
||||||
|
label: this.$t('perms.userGroup')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'assets',
|
||||||
|
label: this.$t('perms.asset')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'nodes',
|
||||||
|
label: this.$t('perms.node')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'system_users',
|
||||||
|
label: this.$t('perms.systemUser')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'is_active',
|
||||||
|
label: this.$t('perms.validity')
|
||||||
|
}
|
||||||
|
],
|
||||||
|
tableActions: {
|
||||||
|
hasEdit: true,
|
||||||
|
editRoute: '404'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headerActions: {
|
||||||
|
hasDelete: false,
|
||||||
|
hasUpdate: false,
|
||||||
|
createRoute: 'AssetPermissionCreate'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
64
src/views/perms/DatabaseAppPermissionList.vue
Normal file
64
src/views/perms/DatabaseAppPermissionList.vue
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
<template>
|
||||||
|
<GenericListPage :table-config="tableConfig" :header-actions="headerActions" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { GenericListPage } from '@/layout/components'
|
||||||
|
import DetailFormatter from '@/components/DataTable/formatters/DetailFormatter'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
GenericListPage
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showTree: true,
|
||||||
|
tableConfig: {
|
||||||
|
url: '/api/v1/perms/database-app-permissions/',
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'name',
|
||||||
|
label: this.$t('perms.name'),
|
||||||
|
formatter: DetailFormatter,
|
||||||
|
sortable: true,
|
||||||
|
route: 'DatabaseAppPermissionDetail'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'users',
|
||||||
|
label: this.$t('perms.user')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'user_groups',
|
||||||
|
label: this.$t('perms.userGroup')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'database_apps',
|
||||||
|
label: this.$t('perms.DatabaseApp')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'system_users',
|
||||||
|
label: this.$t('perms.systemUser')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'is_valid',
|
||||||
|
label: this.$t('perms.validity')
|
||||||
|
}
|
||||||
|
],
|
||||||
|
tableActions: {
|
||||||
|
hasEdit: true,
|
||||||
|
editRoute: '404'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headerActions: {
|
||||||
|
hasDelete: false,
|
||||||
|
hasUpdate: false,
|
||||||
|
createRoute: 'DatabaseAppPermissionCreate'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
64
src/views/perms/RemoteAppPermissionList.vue
Normal file
64
src/views/perms/RemoteAppPermissionList.vue
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
<template>
|
||||||
|
<GenericListPage :table-config="tableConfig" :header-actions="headerActions" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { GenericListPage } from '@/layout/components'
|
||||||
|
import DetailFormatter from '@/components/DataTable/formatters/DetailFormatter'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
GenericListPage
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showTree: true,
|
||||||
|
tableConfig: {
|
||||||
|
url: '/api/v1/perms/remote-app-permissions/',
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'name',
|
||||||
|
label: this.$t('perms.name'),
|
||||||
|
formatter: DetailFormatter,
|
||||||
|
sortable: true,
|
||||||
|
route: 'RemoteAppPermissionDetail'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'users',
|
||||||
|
label: this.$t('perms.user')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'user_groups',
|
||||||
|
label: this.$t('perms.userGroup')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'remote_apps',
|
||||||
|
label: this.$t('perms.RemoteApp')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'system_users',
|
||||||
|
label: this.$t('perms.systemUser')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'is_valid',
|
||||||
|
label: this.$t('perms.validity')
|
||||||
|
}
|
||||||
|
],
|
||||||
|
tableActions: {
|
||||||
|
hasEdit: true,
|
||||||
|
editRoute: '404'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headerActions: {
|
||||||
|
hasDelete: false,
|
||||||
|
hasUpdate: false,
|
||||||
|
createRoute: 'RemoteAppPermissionCreate'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
Reference in New Issue
Block a user