mirror of
https://github.com/OliveTin/OliveTin
synced 2025-12-15 10:35:45 +00:00
feature: Rerun button on execution dialog, easily rerun actions! (#465)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user