feature: Rerun button on execution dialog, easily rerun actions! (#465)
This commit is contained in:
parent
ceb0a78180
commit
964dc7b48a
|
|
@ -146,6 +146,7 @@
|
|||
<div id = "execution-dialog-xterm"></div>
|
||||
|
||||
<div class = "buttons padded-content">
|
||||
<button name = "rerun" title = "Rerun" id = "execution-dialog-rerun-action">Rerun</button>
|
||||
<button name = "kill" title = "Kill" id = "execution-dialog-kill-action">Kill</button>
|
||||
|
||||
<form method = "dialog">
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ export class ExecutionDialog {
|
|||
this.toggleSize()
|
||||
}
|
||||
|
||||
this.domBtnRerun = document.getElementById('execution-dialog-rerun-action')
|
||||
this.domBtnKill = document.getElementById('execution-dialog-kill-action')
|
||||
|
||||
this.domDuration = document.getElementById('execution-dialog-duration')
|
||||
|
|
@ -57,6 +58,8 @@ export class ExecutionDialog {
|
|||
|
||||
// window.terminal.close()
|
||||
|
||||
this.domBtnRerun.disabled = true
|
||||
this.domBtnRerun.onclick = () => {}
|
||||
this.domBtnKill.disabled = true
|
||||
this.domBtnKill.onclick = () => {}
|
||||
|
||||
|
|
@ -93,6 +96,16 @@ export class ExecutionDialog {
|
|||
this.dlg.showModal()
|
||||
}
|
||||
|
||||
rerunAction (actionId) {
|
||||
const actionButton = document.getElementById('actionButton-' + actionId)
|
||||
|
||||
if (actionButton !== undefined) {
|
||||
actionButton.btn.click()
|
||||
}
|
||||
|
||||
this.dlg.close()
|
||||
}
|
||||
|
||||
killAction () {
|
||||
const killActionArgs = {
|
||||
executionTrackingId: this.executionTrackingId
|
||||
|
|
@ -186,12 +199,15 @@ export class ExecutionDialog {
|
|||
|
||||
this.domOutput.hidden = false
|
||||
|
||||
if (!this.hideDetailsOnResult) {
|
||||
this.domExecutionDetails.hidden = false
|
||||
if (this.hideDetailsOnResult) {
|
||||
this.domExecutionDetails.hidden = true
|
||||
}
|
||||
|
||||
this.executionTrackingId = res.logEntry.executionTrackingId
|
||||
|
||||
this.domBtnRerun.disabled = !res.logEntry.executionFinished
|
||||
this.domBtnRerun.onclick = () => { this.rerunAction(res.logEntry.actionId) }
|
||||
|
||||
this.domBtnKill.disabled = res.logEntry.executionFinished
|
||||
|
||||
this.domStatus.update(res.logEntry)
|
||||
|
|
|
|||
Loading…
Reference in New Issue