add explicit alert for execution accepted
This commit is contained in:
parent
a467a47ac6
commit
849d6405aa
|
@ -161,10 +161,10 @@ 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.jobID });
|
||||||
const event = new CustomEvent('newexecution', { detail: data });
|
|
||||||
document.dispatchEvent(event)
|
document.dispatchEvent(event)
|
||||||
this.unlockRender()
|
this.unlockRender()
|
||||||
|
alert("Execution accepted with id:" + data.jobID)
|
||||||
}).catch(err => {alert("Unable to call execute: " + err); this.unlockRender()})
|
}).catch(err => {alert("Unable to call execute: " + err); this.unlockRender()})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -259,10 +259,7 @@ class CCPExecutionHistory extends HTMLElement {
|
||||||
|
|
||||||
connectNewExecution(){
|
connectNewExecution(){
|
||||||
document.addEventListener("newexecution", ev=>{
|
document.addEventListener("newexecution", ev=>{
|
||||||
const s = ev.detail
|
window.setTimeout(()=>this.refreshExecution(), 2000)
|
||||||
const dummy = { id : s.jobID, method : s.method, runtime : "", status : "accepted", created : s.updated, updated : s.updated, resources : []}
|
|
||||||
this.#data = [ dummy ].concat(this.#data)
|
|
||||||
this.updateList()
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue