bugfix: Logs table only updating on start, not finish (#467)

This commit is contained in:
James Read 2024-11-02 00:47:13 +00:00 committed by GitHub
parent de504f5f80
commit 9bcb2d80dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 4 deletions

View File

@ -137,6 +137,8 @@ function onExecutionStarted (evt) {
function onExecutionFinished (evt) {
const logEntry = evt.payload.logEntry
window.logEntries.set(logEntry.executionTrackingId, logEntry)
const actionButton = window.actionButtons[logEntry.actionTitle]
if (actionButton === undefined) {
@ -628,13 +630,12 @@ function marshalDirectory (item, section) {
export function marshalLogsJsonToHtml (json) {
for (const logEntry of json.logs) {
let row
let row = document.getElementById('log-' + logEntry.executionTrackingId)
if (window.logEntries.has(logEntry.executionTrackingId)) {
row = window.logEntries.get(logEntry.executionTrackingId).dom
} else {
if (row == null) {
const tpl = document.getElementById('tplLogRow')
row = tpl.content.querySelector('tr').cloneNode(true)
row.id = 'log-' + logEntry.executionTrackingId
row.querySelector('.content').onclick = () => {
window.executionDialog.reset()