From 0e3f9c8ceba83f93208f3e125b193c54185bcbdc Mon Sep 17 00:00:00 2001 From: jamesread Date: Fri, 23 Feb 2024 16:09:58 +0000 Subject: [PATCH] bugfix: #192 repeating logs --- webui.dev/js/marshaller.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/webui.dev/js/marshaller.js b/webui.dev/js/marshaller.js index dd75f35..e91ed67 100644 --- a/webui.dev/js/marshaller.js +++ b/webui.dev/js/marshaller.js @@ -10,6 +10,8 @@ export function initMarshaller () { window.executionDialog = new ExecutionDialog() + window.logEntries = {} + window.addEventListener('ExecutionFinished', onExecutionFinished) } @@ -375,6 +377,14 @@ function marshalDirectory (item, section) { export function marshalLogsJsonToHtml (json) { for (const logEntry of json.logs) { + const existing = window.logEntries[logEntry.executionTrackingId] + + if (existing !== undefined) { + continue + } + + window.logEntries[logEntry.executionTrackingId] = logEntry + const tpl = document.getElementById('tplLogRow') const row = tpl.content.querySelector('tr').cloneNode(true)