mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-26 06:58:53 +00:00
feat: 添加切换至用户列表
This commit is contained in:
@@ -157,6 +157,8 @@
|
|||||||
"NoInputCommand": "未输入命令",
|
"NoInputCommand": "未输入命令",
|
||||||
"NoSystemUserWasSelected": "未选择系统用户",
|
"NoSystemUserWasSelected": "未选择系统用户",
|
||||||
"Node": "节点",
|
"Node": "节点",
|
||||||
|
"SwitchUser": "切换用户",
|
||||||
|
"SwitchToUserList": "切换至用户",
|
||||||
"NodeInformation": "节点信息",
|
"NodeInformation": "节点信息",
|
||||||
"OnlyLatestVersion": "仅最新版本",
|
"OnlyLatestVersion": "仅最新版本",
|
||||||
"Os": "操作系统",
|
"Os": "操作系统",
|
||||||
|
@@ -155,6 +155,8 @@
|
|||||||
"NoInputCommand": "No input command",
|
"NoInputCommand": "No input command",
|
||||||
"NoSystemUserWasSelected": "No system user was selected",
|
"NoSystemUserWasSelected": "No system user was selected",
|
||||||
"Node": "Node",
|
"Node": "Node",
|
||||||
|
"SwitchUser": "Switch user",
|
||||||
|
"SwitchToUserList": "Switch to user",
|
||||||
"NodeInformation": "Node information",
|
"NodeInformation": "Node information",
|
||||||
"OnlyLatestVersion": "Only latest version",
|
"OnlyLatestVersion": "Only latest version",
|
||||||
"Os": "Os",
|
"Os": "Os",
|
||||||
|
@@ -0,0 +1,73 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="20">
|
||||||
|
<ListTable ref="ListTable" :table-config="tableConfig" :header-actions="headerActions" />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4" />
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ListTable from '@/components/ListTable'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'SwitchToUserList',
|
||||||
|
components: {
|
||||||
|
ListTable
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
object: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tableConfig: {
|
||||||
|
url: `/api/v1/assets/system-users/${this.object.id}/su-to/`,
|
||||||
|
columns: [
|
||||||
|
'name', 'username', 'username_same_with_user', 'protocol', 'login_mode',
|
||||||
|
'assets_amount', 'applications_amount', 'priority',
|
||||||
|
'created_by', 'date_created', 'date_updated', 'comment', 'org_name', 'actions'
|
||||||
|
],
|
||||||
|
columnsShow: {
|
||||||
|
min: ['name', 'actions'],
|
||||||
|
default: [
|
||||||
|
'name', 'username', 'protocol', 'login_mode', 'comment', 'actions'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
columnsMeta: {
|
||||||
|
actions: {
|
||||||
|
formatterArgs: {
|
||||||
|
updateRoute: { name: 'SystemUserUpdate', query: { id: this.$route.params.id }},
|
||||||
|
hasUpdate: true, // can set function(row, value)
|
||||||
|
hasDelete: false, // can set function(row, value)
|
||||||
|
hasClone: false,
|
||||||
|
moreActionsTitle: this.$t('common.More'),
|
||||||
|
extraActions: [
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headerActions: {
|
||||||
|
hasLeftActions: false,
|
||||||
|
hasBulkDelete: false,
|
||||||
|
hasImport: false,
|
||||||
|
hasCreate: false,
|
||||||
|
searchConfig: {
|
||||||
|
exclude: ['type', 'protocol']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='less' scoped>
|
||||||
|
|
||||||
|
</style>
|
@@ -13,6 +13,7 @@ import AssetList from './AssetList.vue'
|
|||||||
import AccountList from './AccountList.vue'
|
import AccountList from './AccountList.vue'
|
||||||
import AppList from './AppList'
|
import AppList from './AppList'
|
||||||
import AppAccountList from './AppAccountList'
|
import AppAccountList from './AppAccountList'
|
||||||
|
import SwitchToUserList from './SwitchToUserList'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -22,7 +23,8 @@ export default {
|
|||||||
AssetList,
|
AssetList,
|
||||||
AccountList,
|
AccountList,
|
||||||
AppList,
|
AppList,
|
||||||
AppAccountList
|
AppAccountList,
|
||||||
|
SwitchToUserList
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
const vm = this
|
const vm = this
|
||||||
@@ -62,6 +64,13 @@ export default {
|
|||||||
hidden: () => {
|
hidden: () => {
|
||||||
return vm.systemUser['is_asset_protocol']
|
return vm.systemUser['is_asset_protocol']
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('assets.SwitchToUserList'),
|
||||||
|
name: 'SwitchToUserList',
|
||||||
|
hidden: () => {
|
||||||
|
return vm.systemUser['protocol'] !== 'ssh'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
hasRightSide: true,
|
hasRightSide: true,
|
||||||
|
Reference in New Issue
Block a user