mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-25 14:34:46 +00:00
perf: 根据type生成导出文件名
This commit is contained in:
@@ -83,7 +83,7 @@ export default {
|
||||
callback: () => {
|
||||
this.xterm.selectAll()
|
||||
const text = this.xterm.getSelection()
|
||||
const filename = `shortcut_cmd_${this.$route.query?.taskId}.log`
|
||||
const filename = `${this.$route.query?.type}_${this.$route.query?.taskId}.log`
|
||||
downloadText(text, filename)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -420,7 +420,7 @@ export default {
|
||||
this.executionInfo.timeCost = 0
|
||||
this.executionInfo.status = 'running'
|
||||
this.currentTaskId = res.task_id
|
||||
this.$router.replace({ query: { taskId: this.currentTaskId }})
|
||||
this.$router.replace({ query: { taskId: this.currentTaskId, type: 'file_upload' }})
|
||||
this.setCostTimeInterval()
|
||||
this.writeExecutionOutput()
|
||||
}).catch(() => {
|
||||
|
||||
@@ -446,7 +446,7 @@ export default {
|
||||
this.executionInfo.timeCost = 0
|
||||
this.executionInfo.status = 'running'
|
||||
this.currentTaskId = res.task_id
|
||||
this.$router.replace({ query: { taskId: this.currentTaskId }})
|
||||
this.$router.replace({ query: { taskId: this.currentTaskId, type: 'shortcut_cmd' }})
|
||||
this.setCostTimeInterval()
|
||||
this.writeExecutionOutput()
|
||||
this.setBtn()
|
||||
@@ -455,7 +455,7 @@ export default {
|
||||
stop() {
|
||||
StopJob({ task_id: this.currentTaskId }).then(() => {
|
||||
this.xterm.write('\x1b[31m' +
|
||||
this.$tc('ops.StopLogOutput').replace('currentTaskId', this.currentTaskId) + '\x1b[0m')
|
||||
this.$tc('ops.StopLogOutput').replace('currentTaskId', this.currentTaskId) + '\x1b[0m')
|
||||
this.xterm.write(this.wrapperError(''))
|
||||
this.getTaskStatus()
|
||||
}).catch((e) => {
|
||||
|
||||
Reference in New Issue
Block a user