mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-25 14:25:23 +00:00
Merge pull request #3376 from jumpserver/pr@dev@perf_session_list
perf: 优化会话列表
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<script type="text/jsx">
|
||||
import ListTable from '@/components/Table/ListTable'
|
||||
import { timeOffset } from '@/utils/common'
|
||||
import { ActionsFormatter } from '@/components/Table/TableFormatters'
|
||||
import { ActionsFormatter, DetailFormatter } from '@/components/Table/TableFormatters'
|
||||
|
||||
export default {
|
||||
name: 'BaseList',
|
||||
@@ -31,9 +31,8 @@ export default {
|
||||
columnsShow: {
|
||||
min: ['id', 'actions'],
|
||||
default: [
|
||||
'id', 'user', 'asset', 'account', 'remote_addr', 'protocol', 'login_from',
|
||||
'command_amount', 'date_start', 'duration', 'terminal_display', 'actions',
|
||||
'is_locked'
|
||||
'id', 'user', 'asset', 'account', 'remote_addr', 'protocol',
|
||||
'command_amount', 'date_start', 'duration', 'actions'
|
||||
]
|
||||
},
|
||||
columnsMeta: {
|
||||
@@ -48,6 +47,19 @@ export default {
|
||||
return <router-link {...{ attrs: route }} class='link'>{ label }</router-link>
|
||||
}
|
||||
},
|
||||
user: {
|
||||
formatter: DetailFormatter,
|
||||
formatterArgs: {
|
||||
getRoute: ({ row }) => {
|
||||
return {
|
||||
name: 'UserDetail',
|
||||
params: {
|
||||
id: row['user_id']
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
can_join: {
|
||||
formatterArgs: {
|
||||
showFalse: false
|
||||
@@ -80,7 +92,18 @@ export default {
|
||||
}
|
||||
},
|
||||
asset: {
|
||||
label: this.$t('sessions.target')
|
||||
label: this.$t('sessions.target'),
|
||||
formatter: DetailFormatter,
|
||||
formatterArgs: {
|
||||
getRoute: ({ row }) => {
|
||||
return {
|
||||
name: 'AssetDetail',
|
||||
params: {
|
||||
id: row['asset_id']
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
command_amount: {
|
||||
width: '90px'
|
||||
|
Reference in New Issue
Block a user