Merge branch 'master' of https://code-repo.d4science.org/gCubeSystem/cdn-experiments
This commit is contained in:
commit
33f4c25e5d
|
@ -22,7 +22,7 @@
|
|||
</template>
|
||||
<template id="EXECUTION_FORM_EMPTY_TEMPLATE">
|
||||
<div name="execution_form">
|
||||
<i>Select a method</i>
|
||||
<i style="padding:3rem">Select a method</i>
|
||||
</div>
|
||||
</template>
|
||||
<div name="execution_form"></div>
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
class CCPInfrastructureList extends HTMLElement{
|
||||
|
||||
#boot;
|
||||
#data;
|
||||
|
||||
#serviceurl = "https://nubis1.int.d4science.net:8080"
|
||||
|
||||
constructor(){
|
||||
super()
|
||||
this.#boot = document.querySelector("d4s-boot-2")
|
||||
this.fetchInfrastructures()
|
||||
}
|
||||
|
||||
fetchInfrastuctures(){
|
||||
this.#boot.service(this.#serviceurl + "/infrastructures", "GET",
|
||||
(resp)=>this.updateList(resp),
|
||||
()=>{ alert("An error occurred while fetching CCP infrastructures.") })
|
||||
}
|
||||
|
||||
updateList(resp){
|
||||
this.#data = JSON.parse(resp)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
window.customElements.define('d4s-ccp-infrastructurelist', CCPInfrastructureList);
|
Loading…
Reference in New Issue