mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-25 06:19:51 +00:00
feat: 添加切换至用户列表
This commit is contained in:
@@ -157,6 +157,8 @@
|
||||
"NoInputCommand": "未输入命令",
|
||||
"NoSystemUserWasSelected": "未选择系统用户",
|
||||
"Node": "节点",
|
||||
"SwitchUser": "切换用户",
|
||||
"SwitchToUserList": "切换至用户",
|
||||
"NodeInformation": "节点信息",
|
||||
"OnlyLatestVersion": "仅最新版本",
|
||||
"Os": "操作系统",
|
||||
|
@@ -155,6 +155,8 @@
|
||||
"NoInputCommand": "No input command",
|
||||
"NoSystemUserWasSelected": "No system user was selected",
|
||||
"Node": "Node",
|
||||
"SwitchUser": "Switch user",
|
||||
"SwitchToUserList": "Switch to user",
|
||||
"NodeInformation": "Node information",
|
||||
"OnlyLatestVersion": "Only latest version",
|
||||
"Os": "Os",
|
||||
@@ -459,7 +461,7 @@
|
||||
"WeekCronSelect": {
|
||||
"Monday": "Monday",
|
||||
"Tuesday": "Tuesday",
|
||||
"Wednesday": "Wednesday",
|
||||
"Wednesday": "Wednesday",
|
||||
"Thursday": "Thursday",
|
||||
"Friday": "Friday",
|
||||
"Saturday": "Saturday",
|
||||
|
@@ -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 AppList from './AppList'
|
||||
import AppAccountList from './AppAccountList'
|
||||
import SwitchToUserList from './SwitchToUserList'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -22,7 +23,8 @@ export default {
|
||||
AssetList,
|
||||
AccountList,
|
||||
AppList,
|
||||
AppAccountList
|
||||
AppAccountList,
|
||||
SwitchToUserList
|
||||
},
|
||||
data() {
|
||||
const vm = this
|
||||
@@ -62,6 +64,13 @@ export default {
|
||||
hidden: () => {
|
||||
return vm.systemUser['is_asset_protocol']
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('assets.SwitchToUserList'),
|
||||
name: 'SwitchToUserList',
|
||||
hidden: () => {
|
||||
return vm.systemUser['protocol'] !== 'ssh'
|
||||
}
|
||||
}
|
||||
],
|
||||
hasRightSide: true,
|
||||
|
Reference in New Issue
Block a user