diff --git a/ccp/js/executionhistorycontroller.js b/ccp/js/executionhistorycontroller.js
index 0384a08..ebace26 100644
--- a/ccp/js/executionhistorycontroller.js
+++ b/ccp/js/executionhistorycontroller.js
@@ -92,9 +92,15 @@ class CCPExecutionHistory extends HTMLElement {
+
+
+
@@ -263,6 +269,17 @@ class CCPExecutionHistory extends HTMLElement {
}).catch(err=>{ console.error(err)})
}
+ reexecute(id,level){
+ this.#boot.secureFetch(`${this.#serviceurl}/executions/${id}/level/${level}`, { method: "POST" })
+ .then(reply =>{
+ if (reply.status !== 200) {
+ throw "Unable to re-execute"
+ }
+ }).then(()=>{
+ alert("Re-execution is WIP. Stay tuned")
+ }).catch(err=>{ console.error(err)})
+ }
+
#execution_list_bss = {
template : "#EXECUTIOM_LIST_TEMPLATE",
target : "ul[name=ccp_execution_list]",
@@ -335,6 +352,14 @@ class CCPExecutionHistory extends HTMLElement {
const id = ev.currentTarget.getAttribute("data-index")
this.export(id, "application/prov-o+xml", id + ".xml")
}
+ if(ev.target.getAttribute("name") === "reexecute1"){
+ const id = ev.currentTarget.getAttribute("data-index")
+ this.reexecute(id, 1)
+ }
+ if(ev.target.getAttribute("name") === "reexecute2"){
+ const id = ev.currentTarget.getAttribute("data-index")
+ this.reexecute(id, 2)
+ }
},
recurse : [
{