manage also new executions
This commit is contained in:
parent
99c2226649
commit
7ce89a050d
|
@ -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( ()=>{
|
||||||
|
|
Loading…
Reference in New Issue