diff --git a/src/i18n/langs/cn.js b/src/i18n/langs/cn.js
index f900a2628..4bf4f0044 100644
--- a/src/i18n/langs/cn.js
+++ b/src/i18n/langs/cn.js
@@ -379,7 +379,10 @@ const cn = {
'join': '加入',
'goto': '转到',
'sessionDetail': '会话详情',
- 'quickModify': '快速修改'
+ 'quickModify': '快速修改',
+ 'replaySession': '回放会话:',
+ 'downloadReplay': '下载录像:',
+ 'go': '执行'
},
jobcenter: {
'RunTimes': '执行次数',
diff --git a/src/i18n/langs/en.js b/src/i18n/langs/en.js
index a248365fc..44f3a82af 100644
--- a/src/i18n/langs/en.js
+++ b/src/i18n/langs/en.js
@@ -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',
diff --git a/src/router/index.js b/src/router/index.js
index 7f99f0113..f6e70d8b1 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -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' }
},
{
diff --git a/src/views/sessions/SessionDetail.vue b/src/views/sessions/SessionDetail.vue
index 7b3f31e35..5c1740b62 100644
--- a/src/views/sessions/SessionDetail.vue
+++ b/src/views/sessions/SessionDetail.vue
@@ -8,9 +8,19 @@
-
+
{{ cardActions }}
+
+
+
+
+
+ {{ scope.row.button }}
+
+
+
+
@@ -20,14 +30,6 @@
-
-
-
-
- {{ cardActions }}
-
-
-
@@ -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)
+ }
}
}
-
diff --git a/src/views/sessions/SessionOfflineList.vue b/src/views/sessions/SessionOfflineList.vue
index 3e9ead1fc..03b9f46d0 100644
--- a/src/views/sessions/SessionOfflineList.vue
+++ b/src/views/sessions/SessionOfflineList.vue
@@ -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)
}