diff --git a/boot/d4s-boot.js b/boot/d4s-boot.js index f0a174a..21c3a8d 100644 --- a/boot/d4s-boot.js +++ b/boot/d4s-boot.js @@ -107,14 +107,14 @@ window.customElements.define('d4s-boot-2', class extends HTMLElement { startStateChecker() { this.#interval = window.setInterval(() => { if (this.#locked) { - console.log("Still locked. Currently has " + this.#queue.length + " pending requests.") + //console.log("Still locked. Currently has " + this.#queue.length + " pending requests.") } else if (!this.authenticated) { window.alert("Not authorized!") } else { if (this.#queue.length > 0) { this.#keycloak.updateToken(30).then(() => { if (this.#audience) { - console.log("Checking entitlement for audience", this.#audience) + //console.log("Checking entitlement for audience", this.#audience) const audience = encodeURIComponent(this.#audience) return this.entitlement(audience) } else { @@ -122,7 +122,7 @@ window.customElements.define('d4s-boot-2', class extends HTMLElement { } }).then(token => { - console.log("Authorized. Token exp: " + this.expirationDate(this.parseJwt(token).exp)) + //console.log("Authorized. Token exp: " + this.expirationDate(this.parseJwt(token).exp)) //transform all queued requests to fetches //console.log("All pending requests to promises") let promises = this.#queue.map(r => { diff --git a/ccp/js/executionformcontroller.js b/ccp/js/executionformcontroller.js index 54cc4ee..76a18b6 100644 --- a/ccp/js/executionformcontroller.js +++ b/ccp/js/executionformcontroller.js @@ -343,6 +343,22 @@ class CCPExecutionForm extends HTMLElement{ } prepareFromExecution(exec){ + //if exec carries already full information then it comes from archive. Use this info instead of fetching. + if(exec.fullrequest && exec.fullmethod && exec.fullinfrastructure){ + this.#data = exec.fullmethod + this.#method = this.#data.id + this.#boot.secureFetch(this.#serviceurl + "/infrastructures/" + exec.fullinfrastructure.id) + .then(resp=>{ + if(resp.ok){ + this.showMethod() + this.initInputValues(exec.fullrequest.inputs) + this.initOptionValues(exec.fullrequest) + }else throw("Unable to find infrastructure") + }).catch(err=>alert(err)) + return + } + + //fetch method and request and validate infra let f1 = this.#boot.secureFetch(this.#serviceurl + `/executions/${exec.id}/metadata/method.json`) .then(resp=>{ diff --git a/ccp/js/executionhistorycontroller.js b/ccp/js/executionhistorycontroller.js index ed84f62..c9a45f3 100644 --- a/ccp/js/executionhistorycontroller.js +++ b/ccp/js/executionhistorycontroller.js @@ -637,8 +637,8 @@ class CCPExecutionHistory extends HTMLElement { } @keyframes spin { 100% { - -webkit-transform: rotate(360deg); - transform:rotate(360deg); + -webkit-transform: rotate(-360deg); + transform:rotate(-360deg); } } @@ -687,7 +687,10 @@ class CCPExecutionHistory extends HTMLElement { runtime : req.inputs.ccpimage, replicas : req.inputs.ccpreplicas ? req.inputs.ccpreplicas : 1, href : `items/${executionfolders[j].id}/download`, - wsid : executionfolders[j].id + wsid : executionfolders[j].id, + fullrequest : req, + fullmethod : meth, + fullinfrastructure : infra } if(this.#archived[entry.method]) this.#archived[entry.method].push(entry); else this.#archived[entry.method] = [entry] @@ -983,6 +986,15 @@ class CCPExecutionHistory extends HTMLElement { e.setAttribute("data-href", d.href) e.setAttribute("data-wsid", d.wsid) }, + on_dragstart : ev=>{ + ev.dataTransfer.effectAllowed = 'move' + ev.dataTransfer.setData('text/html', ev.currentTarget.innerHTML) + ev.dataTransfer.setData('text/plain+ccpexecution', ev.currentTarget.getAttribute("data-index")) + ev.dataTransfer.setData('application/json+ccpexecution', JSON.stringify(ev.currentTarget.bss_input.data)) + }, + on_dragend : ev=>{ + ev.preventDefault() + }, on_click: ev=>{ if(ev.target.getAttribute("name") === "restore"){ if(window.confirm(this.getLabel("confirm_restore_execution"))){