From 7ce89a050df861a1bd0c59fd264973248d644572 Mon Sep 17 00:00:00 2001 From: dcore94 Date: Thu, 18 May 2023 12:16:34 +0200 Subject: [PATCH] manage also new executions --- ccp/js/executionhistorycontroller.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ccp/js/executionhistorycontroller.js b/ccp/js/executionhistorycontroller.js index 20a39a2..801803f 100644 --- a/ccp/js/executionhistorycontroller.js +++ b/ccp/js/executionhistorycontroller.js @@ -260,7 +260,7 @@ class CCPExecutionHistory extends HTMLElement { connectNewExecution(){ document.addEventListener("newexecution", ev=>{ - this.pending.push(ev.details) + this.pending.push(ev.detail) }) } @@ -271,6 +271,15 @@ class CCPExecutionHistory extends HTMLElement { let exec = this.#data.filter(e=>e.id === data.jobID)[0] if(exec){ this.refreshExecution(exec.id) + }else{ + this.pending.filter(pe=>{ + if(pe === data.jobId){ + this.refreshExecution(pe) + return false + }else{ + return true + } + }) } } this.#interval = window.setInterval( ()=>{