manage also new executions

This commit is contained in:
dcore94 2023-05-18 12:16:34 +02:00
parent 99c2226649
commit 7ce89a050d
1 changed files with 10 additions and 1 deletions

View File

@ -260,7 +260,7 @@ class CCPExecutionHistory extends HTMLElement {
connectNewExecution(){ connectNewExecution(){
document.addEventListener("newexecution", ev=>{ 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] let exec = this.#data.filter(e=>e.id === data.jobID)[0]
if(exec){ if(exec){
this.refreshExecution(exec.id) 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( ()=>{ this.#interval = window.setInterval( ()=>{