From 27c287c2de662cf3a3ddbff67bdddb5d99a8deea Mon Sep 17 00:00:00 2001 From: jamesread Date: Tue, 8 Apr 2025 22:14:23 +0100 Subject: [PATCH] build: Code format --- webui.dev/js/ExecutionDialog.js | 23 +++++++++++------------ webui.dev/js/marshaller.js | 13 ++++++------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/webui.dev/js/ExecutionDialog.js b/webui.dev/js/ExecutionDialog.js index 2e40af15..d987993b 100644 --- a/webui.dev/js/ExecutionDialog.js +++ b/webui.dev/js/ExecutionDialog.js @@ -198,17 +198,17 @@ export class ExecutionDialog { clearInterval(window.executionDialogTicker) - if ("type" in res && res.type == "execution-dialog-output-html") { - this.domOutputHtml.hidden = false - this.domOutput.hidden = true - this.domOutputHtml.innerHTML = res.logEntry.output - this.domOutputHtml.hidden = false - this.hideDetailsonResult = true - } else { - this.domOutput.hidden = false - this.domOutputHtml.innerHTML = '' - this.domOutputHtml.hidden = true - } + if ('type' in res && res.type === 'execution-dialog-output-html') { + this.domOutputHtml.hidden = false + this.domOutput.hidden = true + this.domOutputHtml.innerHTML = res.logEntry.output + this.domOutputHtml.hidden = false + this.hideDetailsonResult = true + } else { + this.domOutput.hidden = false + this.domOutputHtml.innerHTML = '' + this.domOutputHtml.hidden = true + } if (this.hideDetailsOnResult) { this.domExecutionDetails.hidden = true @@ -229,7 +229,6 @@ export class ExecutionDialog { this.updateDuration(res.logEntry) - window.terminal.reset() window.terminal.write(res.logEntry.output, () => { window.terminal.fit() diff --git a/webui.dev/js/marshaller.js b/webui.dev/js/marshaller.js index eaafb95d..293bc82b 100644 --- a/webui.dev/js/marshaller.js +++ b/webui.dev/js/marshaller.js @@ -187,15 +187,14 @@ function onExecutionFinished (evt) { return } - let feedbackButton = actionButton; + const executionButton = document.querySelector('execution-button#execution-' + logEntry.executionTrackingId) + let feedbackButton = actionButton switch (actionButton.popupOnStart) { case 'execution-button': - let executionButton = document.querySelector('execution-button#execution-' + logEntry.executionTrackingId) - - if (executionButton != null) { - feedbackButton = executionButton - } + if (executionButton != null) { + feedbackButton = executionButton + } break case 'execution-dialog-output-html': @@ -220,7 +219,7 @@ function onExecutionFinished (evt) { if (window.executionDialog.dlg.open && window.executionDialog.executionUuid === logEntry.uuid) { window.executionDialog.renderExecutionResult({ logEntry: logEntry, - type: actionButton.popupOnStart, + type: actionButton.popupOnStart }) } }