mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-11 03:22:06 +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: () => {
|
callback: () => {
|
||||||
this.xterm.selectAll()
|
this.xterm.selectAll()
|
||||||
const text = this.xterm.getSelection()
|
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)
|
downloadText(text, filename)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@ export default {
|
|||||||
left: {
|
left: {
|
||||||
run: {
|
run: {
|
||||||
type: 'button',
|
type: 'button',
|
||||||
name: this.$t('Run'),
|
name: '',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
icon: 'fa fa-play',
|
icon: 'fa fa-play',
|
||||||
tip: this.$t('RunCommand'),
|
tip: this.$t('RunCommand'),
|
||||||
@ -112,7 +112,7 @@ export default {
|
|||||||
},
|
},
|
||||||
stop: {
|
stop: {
|
||||||
type: 'button',
|
type: 'button',
|
||||||
name: this.$t('Stop'),
|
name: '',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
icon: 'fa fa-stop',
|
icon: 'fa fa-stop',
|
||||||
tip: this.$t('StopJob'),
|
tip: this.$t('StopJob'),
|
||||||
@ -447,7 +447,7 @@ export default {
|
|||||||
this.executionInfo.timeCost = 0
|
this.executionInfo.timeCost = 0
|
||||||
this.executionInfo.status = 'running'
|
this.executionInfo.status = 'running'
|
||||||
this.currentTaskId = res.task_id
|
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.setCostTimeInterval()
|
||||||
this.writeExecutionOutput()
|
this.writeExecutionOutput()
|
||||||
this.setBtn()
|
this.setBtn()
|
||||||
@ -456,7 +456,7 @@ export default {
|
|||||||
stop() {
|
stop() {
|
||||||
StopJob({ task_id: this.currentTaskId }).then(() => {
|
StopJob({ task_id: this.currentTaskId }).then(() => {
|
||||||
this.xterm.write('\x1b[31m' +
|
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.xterm.write(this.wrapperError(''))
|
||||||
this.getTaskStatus()
|
this.getTaskStatus()
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
|
@ -55,7 +55,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$axios.get('/api/v1/ops/variables/help').then((data) => {
|
this.$axios.get('/api/v1/ops/variables/help/').then((data) => {
|
||||||
this.variables = data
|
this.variables = data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -439,7 +439,7 @@ export default {
|
|||||||
this.executionInfo.timeCost = 0
|
this.executionInfo.timeCost = 0
|
||||||
this.executionInfo.status = 'running'
|
this.executionInfo.status = 'running'
|
||||||
this.currentTaskId = res.task_id
|
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.setCostTimeInterval()
|
||||||
this.writeExecutionOutput()
|
this.writeExecutionOutput()
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user