fix communications between form and monitor
This commit is contained in:
parent
854ad2c076
commit
d4748110c8
|
@ -161,6 +161,7 @@ class CCPExecutionForm extends HTMLElement{
|
||||||
if(data.status !== "accepted"){
|
if(data.status !== "accepted"){
|
||||||
throw "Execution has not been accepted by server"
|
throw "Execution has not been accepted by server"
|
||||||
}
|
}
|
||||||
|
data.method = this.#data.title
|
||||||
const event = new CustomEvent('newexecution', { detail: data });
|
const event = new CustomEvent('newexecution', { detail: data });
|
||||||
document.dispatchEvent(event)
|
document.dispatchEvent(event)
|
||||||
this.unlockRender()
|
this.unlockRender()
|
||||||
|
|
|
@ -258,8 +258,10 @@ class CCPExecutionHistory extends HTMLElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
connectNewExecution(){
|
connectNewExecution(){
|
||||||
document.addEventListener("newexecution", ev=>{
|
document.addEventListener("newexecution", ev=>{
|
||||||
this.#data = [ ev.detail ].concat(this.#data)
|
const s = ev.detail
|
||||||
|
const dummy = { id : s.jobID, method : s.method, status : "accepted", created : s.updated, updated : s.updated, resources : []}
|
||||||
|
this.#data = [ dummy ].concat(this.#data)
|
||||||
this.updateList()
|
this.updateList()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue