mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-25 06:19:51 +00:00
Merge branch 'master' of github.com:jumpserver/lina
This commit is contained in:
@@ -379,7 +379,10 @@ const cn = {
|
||||
'join': '加入',
|
||||
'goto': '转到',
|
||||
'sessionDetail': '会话详情',
|
||||
'quickModify': '快速修改'
|
||||
'quickModify': '快速修改',
|
||||
'replaySession': '回放会话:',
|
||||
'downloadReplay': '下载录像:',
|
||||
'go': '执行'
|
||||
},
|
||||
jobcenter: {
|
||||
'RunTimes': '执行次数',
|
||||
|
@@ -279,22 +279,29 @@ const en = {
|
||||
'command': 'Command',
|
||||
'dateStart': 'Date start',
|
||||
'duration': 'Duration',
|
||||
'terminate': 'Terminate',
|
||||
'dateEnd': 'Date end',
|
||||
'commands': 'Commands',
|
||||
'replay': 'replay',
|
||||
'download': 'download',
|
||||
'riskLevel': 'Risk level',
|
||||
'session': 'session',
|
||||
'action': 'Action',
|
||||
'search': 'Search',
|
||||
'terminate_selected': 'Terminate selected',
|
||||
'confirm_finished': 'Confirm finished',
|
||||
'submit': 'Submit',
|
||||
'terminate': 'Terminate',
|
||||
'command_list': 'Command list',
|
||||
'dateEnd': 'Date end',
|
||||
'quick_modify': 'Quick modify',
|
||||
'terminate_session': 'Terminate session',
|
||||
'confirm': 'Confirm',
|
||||
'commands': 'Commands',
|
||||
'join': 'join',
|
||||
'goto': 'Goto',
|
||||
'sessionDetail': 'Session Detail',
|
||||
'quickModify': 'Quick Modify'
|
||||
'quickModify': 'Quick Modify',
|
||||
'replaySession': 'Replay session:',
|
||||
'downloadReplay': 'Download replay:',
|
||||
'go': 'Go'
|
||||
},
|
||||
setting: {
|
||||
'setting': 'System Setting',
|
||||
|
@@ -284,13 +284,13 @@ export const constantRoutes = [
|
||||
{
|
||||
path: 'luna',
|
||||
name: 'WebTerminal',
|
||||
component: () => import('@/views/tree/index'),
|
||||
component: () => window.open(`/luna/?_=${Date.now()}`),
|
||||
meta: { title: 'WebTerminal' }
|
||||
},
|
||||
{
|
||||
path: 'sftp',
|
||||
name: 'FileManager',
|
||||
component: () => import('@/views/tree/index'),
|
||||
component: () => window.open(`/koko/elfinder/sftp/?`),
|
||||
meta: { title: 'FileManager' }
|
||||
},
|
||||
{
|
||||
|
@@ -8,9 +8,19 @@
|
||||
<el-col :span="10">
|
||||
<el-card class="box-card primary">
|
||||
<div slot="header" class="clearfix">
|
||||
<i class="fa fa-user" />
|
||||
<i class="fa fa-info" />
|
||||
<span>{{ cardActions }}</span>
|
||||
</div>
|
||||
<el-table class="el-table" :data="cardActionData" :show-header="false">
|
||||
<el-table-column prop="name" />
|
||||
<el-table-column prop="button" align="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="handleButtonAction(scope.$index, scope.row)">
|
||||
{{ scope.row.button }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -20,14 +30,6 @@
|
||||
<el-col :span="14">
|
||||
<ListTable :table-config="tableConfig" :header-actions="headerActions" />
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-card class="box-card primary">
|
||||
<div slot="header" class="clearfix">
|
||||
<i class="fa fa-user" />
|
||||
<span>{{ cardActions }}</span>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</GenericDetailPage>
|
||||
@@ -101,14 +103,15 @@ export default {
|
||||
name: 'command'
|
||||
}
|
||||
]
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return this.$t('sessions.sessionDetail')
|
||||
},
|
||||
cardTitle() { return this.sessionData.id },
|
||||
cardTitle() {
|
||||
return this.sessionData.id
|
||||
},
|
||||
cardActions() {
|
||||
return this.$t('sessions.quickModify')
|
||||
},
|
||||
@@ -147,6 +150,20 @@ export default {
|
||||
value: this.sessionData.date_end
|
||||
}
|
||||
]
|
||||
},
|
||||
cardActionData() {
|
||||
return [
|
||||
{
|
||||
name: this.$t('sessions.replaySession'),
|
||||
button: this.$t('sessions.go'),
|
||||
value: 'replay'
|
||||
},
|
||||
{
|
||||
name: this.$t('sessions.downloadReplay'),
|
||||
button: this.$t('sessions.download'),
|
||||
value: 'download'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -159,10 +176,49 @@ export default {
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
handleButtonAction: function(index, row) {
|
||||
switch (row.value) {
|
||||
case 'replay':
|
||||
this.openReplaySession(this.sessionData.id)
|
||||
break
|
||||
case 'download':
|
||||
this.openReplayDownload(this.sessionData.id)
|
||||
break
|
||||
default:
|
||||
console.log('No Match button action: ' + row.value)
|
||||
}
|
||||
},
|
||||
|
||||
openReplaySession: function(id) {
|
||||
const replayUrl = '/luna/replay/' + id
|
||||
window.open(replayUrl)
|
||||
},
|
||||
openReplayDownload: function(id) {
|
||||
const downloadUrl = '/terminal/session/00000000-0000-0000-0000-000000000000/replay/download/'
|
||||
.replace('00000000-0000-0000-0000-000000000000', id)
|
||||
window.open(downloadUrl)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.el-table /deep/ .el-table__row > td {
|
||||
line-height: 1.5;
|
||||
padding: 8px 0;
|
||||
}
|
||||
.el-table /deep/ .el-table__row > td> div > span {
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.el-table /deep/ .el-table__header > thead > tr >th {
|
||||
padding: 8px 0;
|
||||
background-color: #F5F5F6;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.table{
|
||||
margin-top: 15px;
|
||||
}
|
||||
</style>
|
||||
|
@@ -73,7 +73,7 @@ export default {
|
||||
type: 'primary',
|
||||
callback: function({ cellValue, tableData }) {
|
||||
// 跳转下载页面
|
||||
const downloadUrl = 'terminal/session/00000000-0000-0000-0000-000000000000/replay/download/'
|
||||
const downloadUrl = '/terminal/session/00000000-0000-0000-0000-000000000000/replay/download/'
|
||||
.replace('00000000-0000-0000-0000-000000000000', cellValue)
|
||||
window.open(downloadUrl)
|
||||
}
|
||||
|
Reference in New Issue
Block a user