add explicit alert for execution accepted

This commit is contained in:
dcore94 2023-05-05 18:39:15 +02:00
parent a467a47ac6
commit 849d6405aa
2 changed files with 3 additions and 6 deletions

View File

@ -161,10 +161,10 @@ class CCPExecutionForm extends HTMLElement{
if(data.status !== "accepted"){
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.jobID });
document.dispatchEvent(event)
this.unlockRender()
alert("Execution accepted with id:" + data.jobID)
}).catch(err => {alert("Unable to call execute: " + err); this.unlockRender()})
}

View File

@ -259,10 +259,7 @@ class CCPExecutionHistory extends HTMLElement {
connectNewExecution(){
document.addEventListener("newexecution", ev=>{
const s = ev.detail
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()
window.setTimeout(()=>this.refreshExecution(), 2000)
})
}