aligned execution form to new compatibility mode based on infrastructures
This commit is contained in:
parent
6091914e10
commit
4be50cdd31
|
@ -88,12 +88,9 @@ class CCPExecutionForm extends HTMLElement{
|
|||
}
|
||||
).then(data=>{
|
||||
this.#data = data
|
||||
const rts =
|
||||
this.#data.links
|
||||
.filter(l => l.rel === "compatibleWith")
|
||||
.map(l=>l.href.replace("runtimes/",""))
|
||||
.join(" ")
|
||||
return this.#boot.secureFetch(this.#serviceurl + "/infrastructures/runtimes?runtimes=" + rts)
|
||||
const infra =
|
||||
this.#data.links.filter(l => l.rel === "compatibleWith")[0]
|
||||
return this.#boot.secureFetch(this.#serviceurl + "/" + infra.href)
|
||||
|
||||
}).then(resp=>{
|
||||
this.#data.executable = resp.status === 200
|
||||
|
@ -195,12 +192,9 @@ class CCPExecutionForm extends HTMLElement{
|
|||
this.#data = m_and_r[0]
|
||||
requestdata = m_and_r[1]
|
||||
this.#method = this.#data.id
|
||||
const rts =
|
||||
this.#data.links
|
||||
.filter(l => l.rel === "compatibleWith")
|
||||
.map(l=>l.href.replace("runtimes/",""))
|
||||
.join(" ")
|
||||
return this.#boot.secureFetch(this.#serviceurl + "/infrastructures/runtimes?runtimes=" + rts)
|
||||
const infra =
|
||||
this.#data.links.filter(l => l.rel === "compatibleWith")[0]
|
||||
return this.#boot.secureFetch(this.#serviceurl + "/" + infra.href)
|
||||
}).then(resp=>{
|
||||
this.#data.executable = resp.status === 200
|
||||
}).then(()=>{
|
||||
|
@ -312,35 +306,3 @@ class CCPExecutionForm extends HTMLElement{
|
|||
}
|
||||
|
||||
window.customElements.define('d4s-ccp-executionform', CCPExecutionForm);
|
||||
|
||||
class CCPExecutionEnvironmentOption extends HTMLOptionElement{
|
||||
|
||||
#infrastructure;
|
||||
#runtime;
|
||||
|
||||
constructor(runtime, infrastructure){
|
||||
super(`${runtime.name} [${infrastructure.name}]`, runtime["descriptor-id"])
|
||||
this.#runtime = runtime
|
||||
this.#infrastructure = infrastructure
|
||||
this.textContent = `${runtime.name} [${infrastructure.name}]`
|
||||
this.value = this.runtimeId
|
||||
}
|
||||
|
||||
get infrastructureName(){
|
||||
return this.#infrastructure.name
|
||||
}
|
||||
|
||||
get infrastructureId(){
|
||||
return this.#infrastructure.id
|
||||
}
|
||||
|
||||
get runtimeName(){
|
||||
return this.#runtime.name
|
||||
}
|
||||
|
||||
get runtimeId(){
|
||||
return this.#runtime["descriptor-id"]
|
||||
}
|
||||
}
|
||||
|
||||
window.customElements.define('d4s-ccp-environment-option', CCPExecutionEnvironmentOption, {extends:'option'});
|
||||
|
|
Loading…
Reference in New Issue