mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-02 07:27:01 +00:00
[Update] 权限模块修改翻译和路由
This commit is contained in:
parent
41cf8a6ffb
commit
42cf5b814b
@ -95,10 +95,13 @@ const cn = {
|
||||
'Perms': '权限管理',
|
||||
'AssetPermission': '资产授权',
|
||||
'AssetPermissionCreate': '创建资产授权规则',
|
||||
'AssetPermissionUpdate': '更新资产授权规则',
|
||||
'RemoteAppPermission': '远程应用授权',
|
||||
'RemoteAppPermissionCreate': '创建远程应用授权规则',
|
||||
'RemoteAppPermissionUpdate': '更新远程应用授权规则',
|
||||
'DatabaseAppPermission': '数据库应用授权',
|
||||
'DatabaseAppPermissionCreate': '创建数据库应用授权规则',
|
||||
'DatabaseAppPermissionUpdate': '更新数据库应用授权规则',
|
||||
'Sessions': '会话管理',
|
||||
'SessionOnline': '在线会话',
|
||||
'SessionOffline': '历史会话',
|
||||
|
@ -225,7 +225,14 @@ export const constantRoutes = [
|
||||
component: () => import('@/views/perms/AssetPermissionCreateUpdate'),
|
||||
name: 'AssetPermissionCreate',
|
||||
hidden: true,
|
||||
meta: { title: 'AssetPermissionCreate', activeMenu: '/perms/asset-permissions' }
|
||||
meta: { title: 'AssetPermissionCreate', activeMenu: '/perms/asset-permissions', action: 'create' }
|
||||
},
|
||||
{
|
||||
path: 'users/:id/update',
|
||||
component: () => import('@/views/perms/AssetPermissionCreateUpdate.vue'), // Parent router-view
|
||||
name: 'AssetPermissionUpdate',
|
||||
hidden: true,
|
||||
meta: { title: 'AssetPermissionUpdate', activeMenu: '/perms/asset-permissions', action: 'update' }
|
||||
},
|
||||
{
|
||||
path: 'asset-permissions/:id',
|
||||
@ -242,17 +249,24 @@ export const constantRoutes = [
|
||||
},
|
||||
{
|
||||
path: 'remote-app-permissions/create',
|
||||
component: () => import('@/views/perms/RemoteAppPermissionCreateUpdate'), // Parent router-view
|
||||
component: () => import('@/views/perms/RemoteAppPermissionCreateUpdate'),
|
||||
name: 'RemoteAppPermissionCreate',
|
||||
hidden: true,
|
||||
meta: { title: 'RemoteAppPermissionCreate', activeMenu: '/perms/remote-app-permissions' }
|
||||
meta: { title: 'RemoteAppPermissionCreate', activeMenu: '/perms/remote-app-permissions', action: 'create' }
|
||||
},
|
||||
{
|
||||
path: 'remote-app-permissions/update',
|
||||
component: () => import('@/views/perms/RemoteAppPermissionCreateUpdate'),
|
||||
name: 'RemoteAppPermissionUpdate',
|
||||
hidden: true,
|
||||
meta: { title: 'RemoteAppPermissionUpdate', activeMenu: '/perms/remote-app-permissions', action: 'update' }
|
||||
},
|
||||
{
|
||||
path: 'remote-app-permissions/:id',
|
||||
component: () => import('@/views/perms/RemoteAppPermissionDetail'),
|
||||
name: 'RemoteAppPermissionDetail',
|
||||
hidden: true,
|
||||
meta: { title: 'RemoteAppPermissionDetail', activeMenu: '/perms/asset-permissions' }
|
||||
meta: { title: 'RemoteAppPermissionDetail', activeMenu: '/perms/remote-app-permissions' }
|
||||
},
|
||||
{
|
||||
path: 'database-app-permissions',
|
||||
@ -267,6 +281,13 @@ export const constantRoutes = [
|
||||
hidden: true,
|
||||
meta: { title: 'DatabaseAppPermissionCreate', activeMenu: '/perms/database-app-permissions' }
|
||||
},
|
||||
{
|
||||
path: 'database-app-permissions/update',
|
||||
component: () => import('@/views/perms/DatabaseAppPermissionCreateUpdate'), // Parent router-view
|
||||
name: 'DatabaseAppPermissionUpdate',
|
||||
hidden: true,
|
||||
meta: { title: 'DatabaseAppPermissionUpdate', activeMenu: '/perms/database-app-permissions', action: 'update' }
|
||||
},
|
||||
{
|
||||
path: 'database-app-permissions/:id',
|
||||
component: () => import('@/views/perms/DatabaseAppPermissionDetail'),
|
||||
|
@ -39,6 +39,9 @@
|
||||
<i class="fa fa-info" />
|
||||
<span>{{ userCardActions }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<Select2 v-model="selectUser.value" v-bind="selectUser" />
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
@ -47,6 +50,9 @@
|
||||
<i class="fa fa-info" />
|
||||
<span>{{ userGroupCardActions }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<Select2 v-model="selectUserGroup.value" v-bind="selectUserGroup" />
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -62,6 +68,9 @@
|
||||
<i class="fa fa-info" />
|
||||
<span>{{ assetCardActions }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<Select2 v-model="selectAsset.value" v-bind="selectAsset" />
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
@ -70,6 +79,9 @@
|
||||
<i class="fa fa-info" />
|
||||
<span>{{ nodeCardActions }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<Select2 v-model="selectNode.value" v-bind="selectNode" />
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
@ -78,6 +90,9 @@
|
||||
<i class="fa fa-info" />
|
||||
<span>{{ systemUserCardActions }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<Select2 v-model="selectSystemUser.value" v-bind="selectSystemUser" />
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -90,13 +105,15 @@ import { GenericDetailPage } from '@/layout/components'
|
||||
import DetailCard from '@/components/DetailCard/index'
|
||||
import ListTable from '@/components/ListTable'
|
||||
import { getAssetPermissionDetail } from '@/api/perms'
|
||||
import Select2 from '@/components/Select2'
|
||||
|
||||
export default {
|
||||
name: 'AssetPermissionDetail',
|
||||
components: {
|
||||
GenericDetailPage,
|
||||
DetailCard,
|
||||
ListTable
|
||||
ListTable,
|
||||
Select2
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -150,7 +167,37 @@ export default {
|
||||
title: this.$t('perms.AssetAndNode'),
|
||||
name: 'assetAndNode'
|
||||
}
|
||||
]
|
||||
],
|
||||
assetPermissionUser: [],
|
||||
assetPermissionUserGroup: [],
|
||||
assetPermissionAsset: [],
|
||||
assetPermissionNode: [],
|
||||
assetPermissionSystemUser: [],
|
||||
selectUser: {
|
||||
url: '/api/v1/users/users/',
|
||||
initial: this.assetPermissionUser,
|
||||
value: []
|
||||
},
|
||||
selectUserGroup: {
|
||||
url: '/api/v1/users/groups/',
|
||||
initial: this.assetPermissionUserGroup,
|
||||
value: []
|
||||
},
|
||||
selectAsset: {
|
||||
url: '/api/v1/assets/assets/',
|
||||
initial: this.assetPermissionAsset,
|
||||
value: []
|
||||
},
|
||||
selectNode: {
|
||||
url: '/api/v1/assets/nodes/',
|
||||
initial: this.assetPermissionNode,
|
||||
value: []
|
||||
},
|
||||
selectSystemUser: {
|
||||
url: '/api/v1/assets/system-users/',
|
||||
initial: this.assetPermissionSystemUser,
|
||||
value: []
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -27,30 +27,32 @@ export default {
|
||||
formatter: ExpandAssetPermissionFormatter
|
||||
},
|
||||
users: {
|
||||
formatter: LengthFormatter
|
||||
formatter: LengthFormatter,
|
||||
label: this.$t('perms.User')
|
||||
},
|
||||
user_groups: {
|
||||
formatter: LengthFormatter
|
||||
formatter: LengthFormatter,
|
||||
label: this.$t('perms.UserGroups')
|
||||
},
|
||||
assets: {
|
||||
formatter: LengthFormatter
|
||||
formatter: LengthFormatter,
|
||||
label: this.$t('perms.Asset')
|
||||
},
|
||||
nodes: {
|
||||
formatter: LengthFormatter
|
||||
formatter: LengthFormatter,
|
||||
label: this.$t('perms.Node')
|
||||
},
|
||||
system_users: {
|
||||
formatter: LengthFormatter
|
||||
formatter: LengthFormatter,
|
||||
label: this.$t('perms.SystemUser')
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
updateRoute: 'RemoteAppPermissionUpdate'
|
||||
updateRoute: 'AssetPermissionUpdate'
|
||||
}
|
||||
},
|
||||
headerActions: {
|
||||
hasDelete: false,
|
||||
hasUpdate: false,
|
||||
hasBulkDelete: false,
|
||||
createRoute: 'AssetPermissionCreate',
|
||||
extraActions: [
|
||||
{
|
||||
name: 'RefreshPermissionCache',
|
||||
|
@ -39,6 +39,9 @@
|
||||
<i class="fa fa-info" />
|
||||
<span>{{ userCardActions }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<Select2 v-model="selectUser.value" v-bind="selectUser" />
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
@ -47,6 +50,9 @@
|
||||
<i class="fa fa-info" />
|
||||
<span>{{ userGroupCardActions }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<Select2 v-model="selectUserGroup.value" v-bind="selectUserGroup" />
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -62,6 +68,9 @@
|
||||
<i class="fa fa-info" />
|
||||
<span>{{ databaseAppCardActions }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<Select2 v-model="selectDatabaseApp.value" v-bind="selectDatabaseApp" />
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
@ -70,6 +79,9 @@
|
||||
<i class="fa fa-info" />
|
||||
<span>{{ systemUserCardActions }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<Select2 v-model="selectSystemUser.value" v-bind="selectSystemUser" />
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -82,13 +94,15 @@ import { GenericDetailPage } from '@/layout/components'
|
||||
import DetailCard from '@/components/DetailCard/index'
|
||||
import ListTable from '@/components/ListTable'
|
||||
import { getDatabaseAppPermissionDetail } from '@/api/perms'
|
||||
import Select2 from '@/components/Select2'
|
||||
|
||||
export default {
|
||||
name: 'DatabaseAppPermissionDetail',
|
||||
components: {
|
||||
GenericDetailPage,
|
||||
DetailCard,
|
||||
ListTable
|
||||
ListTable,
|
||||
Select2
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -142,7 +156,31 @@ export default {
|
||||
title: this.$t('perms.DatabaseApp'),
|
||||
name: 'databaseApp'
|
||||
}
|
||||
]
|
||||
],
|
||||
databaseAppPermissionUser: [],
|
||||
databaseAppPermissionUserGroup: [],
|
||||
databaseAppPermissionDatabaseApp: [],
|
||||
databaseAppPermissionSystemUser: [],
|
||||
selectUser: {
|
||||
url: '/api/v1/users/users/',
|
||||
initial: this.databaseAppPermissionUser,
|
||||
value: []
|
||||
},
|
||||
selectUserGroup: {
|
||||
url: '/api/v1/users/groups/',
|
||||
initial: this.databaseAppPermissionUserGroup,
|
||||
value: []
|
||||
},
|
||||
selectDatabaseApp: {
|
||||
url: '/api/v1/applications/database-apps/',
|
||||
initial: this.databaseAppPermissionDatabaseApp,
|
||||
value: []
|
||||
},
|
||||
selectSystemUser: {
|
||||
url: '/api/v1/assets/system-users/',
|
||||
initial: this.databaseAppPermissionSystemUser,
|
||||
value: []
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -16,22 +16,25 @@ export default {
|
||||
columns: ['name', 'users', 'user_groups', 'database_apps', 'system_users', 'is_valid', 'actions'],
|
||||
columnsMeta: {
|
||||
users: {
|
||||
formatter: LengthFormatter
|
||||
formatter: LengthFormatter,
|
||||
label: this.$t('perms.User')
|
||||
},
|
||||
user_groups: {
|
||||
formatter: LengthFormatter
|
||||
formatter: LengthFormatter,
|
||||
label: this.$t('perms.UserGroups')
|
||||
},
|
||||
database_apps: {
|
||||
formatter: LengthFormatter
|
||||
formatter: LengthFormatter,
|
||||
label: this.$t('perms.DatabaseApp')
|
||||
},
|
||||
system_users: {
|
||||
formatter: LengthFormatter
|
||||
formatter: LengthFormatter,
|
||||
label: this.$t('perms.SystemUser')
|
||||
}
|
||||
}
|
||||
},
|
||||
headerActions: {
|
||||
hasBulkDelete: false,
|
||||
createRoute: 'DatabaseAppPermissionCreate'
|
||||
hasBulkDelete: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,6 +39,9 @@
|
||||
<i class="fa fa-info" />
|
||||
<span>{{ userCardActions }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<Select2 v-model="selectUser.value" v-bind="selectUser" />
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
@ -47,6 +50,9 @@
|
||||
<i class="fa fa-info" />
|
||||
<span>{{ userGroupCardActions }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<Select2 v-model="selectUserGroup.value" v-bind="selectUserGroup" />
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -62,6 +68,9 @@
|
||||
<i class="fa fa-info" />
|
||||
<span>{{ remoteAppCardActions }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<Select2 v-model="selectRemoteApp.value" v-bind="selectRemoteApp" />
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
@ -70,6 +79,9 @@
|
||||
<i class="fa fa-info" />
|
||||
<span>{{ systemUserCardActions }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<Select2 v-model="selectSystemUser.value" v-bind="selectSystemUser" />
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -82,13 +94,15 @@ import { GenericDetailPage } from '@/layout/components'
|
||||
import DetailCard from '@/components/DetailCard/index'
|
||||
import ListTable from '@/components/ListTable'
|
||||
import { getRemoteAppPermissionDetail } from '@/api/perms'
|
||||
import Select2 from '@/components/Select2'
|
||||
|
||||
export default {
|
||||
name: 'RemoteAppPermissionDetail',
|
||||
components: {
|
||||
GenericDetailPage,
|
||||
DetailCard,
|
||||
ListTable
|
||||
ListTable,
|
||||
Select2
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -142,7 +156,31 @@ export default {
|
||||
title: this.$t('perms.RemoteApp'),
|
||||
name: 'remoteApp'
|
||||
}
|
||||
]
|
||||
],
|
||||
remoteAppPermissionUser: [],
|
||||
remoteAppPermissionUserGroup: [],
|
||||
remoteAppPermissionRemoteApp: [],
|
||||
remoteAppPermissionSystemUser: [],
|
||||
selectUser: {
|
||||
url: '/api/v1/users/users/',
|
||||
initial: this.remoteAppPermissionUser,
|
||||
value: []
|
||||
},
|
||||
selectUserGroup: {
|
||||
url: '/api/v1/users/groups/',
|
||||
initial: this.remoteAppPermissionUserGroup,
|
||||
value: []
|
||||
},
|
||||
selectRemoteApp: {
|
||||
url: '/api/v1/applications/remote-apps/',
|
||||
initial: this.remoteAppPermissionRemoteApp,
|
||||
value: []
|
||||
},
|
||||
selectSystemUser: {
|
||||
url: '/api/v1/assets/system-users/',
|
||||
initial: this.remoteAppPermissionSystemUser,
|
||||
value: []
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -17,22 +17,25 @@ export default {
|
||||
columns: ['name', 'users', 'user_groups', 'remote_apps', 'system_users', 'is_valid', 'actions'],
|
||||
columnsMeta: {
|
||||
users: {
|
||||
formatter: LengthFormatter
|
||||
formatter: LengthFormatter,
|
||||
label: this.$t('perms.User')
|
||||
},
|
||||
user_groups: {
|
||||
formatter: LengthFormatter
|
||||
formatter: LengthFormatter,
|
||||
label: this.$t('perms.UserGroups')
|
||||
},
|
||||
remote_apps: {
|
||||
formatter: LengthFormatter
|
||||
formatter: LengthFormatter,
|
||||
label: this.$t('perms.RemoteApp')
|
||||
},
|
||||
system_users: {
|
||||
formatter: LengthFormatter
|
||||
formatter: LengthFormatter,
|
||||
label: this.$t('perms.SystemUser')
|
||||
}
|
||||
}
|
||||
},
|
||||
headerActions: {
|
||||
hasBulkDelete: false,
|
||||
createRoute: 'RemoteAppPermissionCreate'
|
||||
hasBulkDelete: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user