From 849d6405aa5532aa9e5d1050321d7660739dd46f Mon Sep 17 00:00:00 2001 From: dcore94 Date: Fri, 5 May 2023 18:39:15 +0200 Subject: [PATCH] add explicit alert for execution accepted --- ccp/js/executionformcontroller.js | 4 ++-- ccp/js/executionhistorycontroller.js | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ccp/js/executionformcontroller.js b/ccp/js/executionformcontroller.js index 3435bb4..b78bcdc 100644 --- a/ccp/js/executionformcontroller.js +++ b/ccp/js/executionformcontroller.js @@ -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()}) } diff --git a/ccp/js/executionhistorycontroller.js b/ccp/js/executionhistorycontroller.js index c2bf6ff..1bf008c 100644 --- a/ccp/js/executionhistorycontroller.js +++ b/ccp/js/executionhistorycontroller.js @@ -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) }) }