bugfix: Logs table only updating on start, not finish (#467)
This commit is contained in:
parent
de504f5f80
commit
9bcb2d80dc
|
|
@ -137,6 +137,8 @@ function onExecutionStarted (evt) {
|
||||||
function onExecutionFinished (evt) {
|
function onExecutionFinished (evt) {
|
||||||
const logEntry = evt.payload.logEntry
|
const logEntry = evt.payload.logEntry
|
||||||
|
|
||||||
|
window.logEntries.set(logEntry.executionTrackingId, logEntry)
|
||||||
|
|
||||||
const actionButton = window.actionButtons[logEntry.actionTitle]
|
const actionButton = window.actionButtons[logEntry.actionTitle]
|
||||||
|
|
||||||
if (actionButton === undefined) {
|
if (actionButton === undefined) {
|
||||||
|
|
@ -628,13 +630,12 @@ function marshalDirectory (item, section) {
|
||||||
|
|
||||||
export function marshalLogsJsonToHtml (json) {
|
export function marshalLogsJsonToHtml (json) {
|
||||||
for (const logEntry of json.logs) {
|
for (const logEntry of json.logs) {
|
||||||
let row
|
let row = document.getElementById('log-' + logEntry.executionTrackingId)
|
||||||
|
|
||||||
if (window.logEntries.has(logEntry.executionTrackingId)) {
|
if (row == null) {
|
||||||
row = window.logEntries.get(logEntry.executionTrackingId).dom
|
|
||||||
} else {
|
|
||||||
const tpl = document.getElementById('tplLogRow')
|
const tpl = document.getElementById('tplLogRow')
|
||||||
row = tpl.content.querySelector('tr').cloneNode(true)
|
row = tpl.content.querySelector('tr').cloneNode(true)
|
||||||
|
row.id = 'log-' + logEntry.executionTrackingId
|
||||||
|
|
||||||
row.querySelector('.content').onclick = () => {
|
row.querySelector('.content').onclick = () => {
|
||||||
window.executionDialog.reset()
|
window.executionDialog.reset()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue