fix communications between form and monitor
This commit is contained in:
parent
70f8165077
commit
cf0563dd43
|
@ -161,12 +161,8 @@ class CCPExecutionForm extends HTMLElement{
|
|||
if(data.status !== "accepted"){
|
||||
throw "Execution has not been accepted by server"
|
||||
}
|
||||
const event = new CustomEvent('newexecution', { detail: data.jobID });
|
||||
const event = new CustomEvent('newexecution', { detail: data });
|
||||
document.dispatchEvent(event)
|
||||
this.#executionmonitor = document.querySelector("d4s-ccp-executionhistory")
|
||||
if(this.#executionmonitor){
|
||||
this.#executionmonitor.addExecution( { self : data.links[0].href, events : [data], jobID : data.jobID, method : this.#data.title})
|
||||
}
|
||||
this.unlockRender()
|
||||
}).catch(err => {alert("Unable to call execute: " + err); this.unlockRender()})
|
||||
}
|
||||
|
|
|
@ -260,6 +260,7 @@ class CCPExecutionHistory extends HTMLElement {
|
|||
connectNewExecution(){
|
||||
document.addEventListener("newexecution", ev=>{
|
||||
this.#data = [ {id: ev.detail } ].concat(this.#data)
|
||||
this.updateList()
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue