diff --git a/ccp/js/executionmonitorcontroller.js b/ccp/js/executionmonitorcontroller.js index 123e7bd..5dd504e 100644 --- a/ccp/js/executionmonitorcontroller.js +++ b/ccp/js/executionmonitorcontroller.js @@ -53,7 +53,7 @@ class CCPExecutionMonitor extends HTMLElement { } refreshExecution(execution){ - this.#boot.secureFetch(execution.self).then(reply =>{ + this.#boot.secureFetch(`${this.#serviceurl}/executions/${execution.jobID}`).then(reply =>{ if(reply.status === 200) return reply.json(); else throw "Unable to load job links" }).then(data=>{ @@ -142,7 +142,11 @@ class CCPExecutionMonitor extends HTMLElement { recurse : [ { target : "li", - "in" : (e,d)=>{return d.links.map(l=>{ return { href : d.self + "/" + l.path, path : l.path} })}, + "in" : (e,d)=>{ + return d.links.map(l=>{ + return { href : this.#serviceurl + "/executions/" + d.jobID + "/" + l.path, path : l.path} + }) + }, on_click : ev=>{ const href = ev.currentTarget.bss_input.data.href const name = ev.currentTarget.bss_input.data.path diff --git a/ccp/js/infrastructurelistcontroller.js b/ccp/js/infrastructurelistcontroller.js index aba0474..8736e87 100644 --- a/ccp/js/infrastructurelistcontroller.js +++ b/ccp/js/infrastructurelistcontroller.js @@ -76,11 +76,12 @@ class CCPInfrastructureList extends HTMLElement{ return resp.json() }).then(data=>{ this.#infrastructures = data + this.showList() }).catch(err=>{ alert(err) }) - const prom2 = this.#boot.secureFetch(this.#serviceurl + "/runtimes"). + /*const prom2 = this.#boot.secureFetch(this.#serviceurl + "/runtimes"). then(resp=>{ if(resp.status !== 200) throw "Unable to fetch runtimes"; return resp.json() @@ -92,7 +93,7 @@ class CCPInfrastructureList extends HTMLElement{ Promise.all([prom1, prom2]).then(results=>{ this.showList() - }) + })*/ } refreshInfrastructures(){ @@ -165,10 +166,10 @@ class CCPInfrastructureList extends HTMLElement{ showDeployableRuntimes(infra){ const alreadydeployed = infra.runtimes.map(r=>r["descriptor-id"]) - const options = this.#runtimes.filter(r=>{ + const options = infra.available_runtimes.filter(r=>{ return infra.type === r.type && alreadydeployed.indexOf(r.id) === -1 }).map(r=>{ - return `` + return `` }).join("\n") return `