mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-01 07:01:26 +00:00
fix: The left asset tree refreshes every time a shortcut command is executed
This commit is contained in:
parent
ad52d17bda
commit
77c1af3dcf
@ -86,7 +86,7 @@ export default {
|
||||
callback: () => {
|
||||
this.xterm.selectAll()
|
||||
const text = this.xterm.getSelection()
|
||||
const filename = `${this.$route.query?.type}_${this.$route.query?.taskId}.log`
|
||||
const filename = `${this.xtermConfig?.type}_${this.xtermConfig?.taskId}.log`
|
||||
downloadText(text, filename)
|
||||
}
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ export default {
|
||||
left: {
|
||||
run: {
|
||||
type: 'button',
|
||||
name: this.$t('Run'),
|
||||
name: '',
|
||||
align: 'left',
|
||||
icon: 'fa fa-play',
|
||||
tip: this.$t('RunCommand'),
|
||||
@ -112,7 +112,7 @@ export default {
|
||||
},
|
||||
stop: {
|
||||
type: 'button',
|
||||
name: this.$t('Stop'),
|
||||
name: '',
|
||||
align: 'left',
|
||||
icon: 'fa fa-stop',
|
||||
tip: this.$t('StopJob'),
|
||||
@ -447,7 +447,7 @@ export default {
|
||||
this.executionInfo.timeCost = 0
|
||||
this.executionInfo.status = 'running'
|
||||
this.currentTaskId = res.task_id
|
||||
this.$router.replace({ query: { taskId: this.currentTaskId, type: 'shortcut_cmd' }})
|
||||
this.xtermConfig = { taskId: this.currentTaskId, type: 'shortcut_cmd' }
|
||||
this.setCostTimeInterval()
|
||||
this.writeExecutionOutput()
|
||||
this.setBtn()
|
||||
@ -456,7 +456,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('StopLogOutput').replace('currentTaskId', this.currentTaskId) + '\x1b[0m')
|
||||
this.xterm.write(this.wrapperError(''))
|
||||
this.getTaskStatus()
|
||||
}).catch((e) => {
|
||||
|
@ -55,7 +55,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$axios.get('/api/v1/ops/variables/help').then((data) => {
|
||||
this.$axios.get('/api/v1/ops/variables/help/').then((data) => {
|
||||
this.variables = data
|
||||
})
|
||||
},
|
||||
|
@ -439,7 +439,7 @@ export default {
|
||||
this.executionInfo.timeCost = 0
|
||||
this.executionInfo.status = 'running'
|
||||
this.currentTaskId = res.task_id
|
||||
this.$router.replace({ query: { taskId: this.currentTaskId, type: 'file_upload' }})
|
||||
this.xtermConfig = { taskId: this.currentTaskId, type: 'shortcut_cmd' }
|
||||
this.setCostTimeInterval()
|
||||
this.writeExecutionOutput()
|
||||
}).catch(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user