This commit is contained in:
root 2022-03-29 16:11:18 +02:00
commit 33f4c25e5d
2 changed files with 27 additions and 1 deletions

View File

@ -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>

View File

@ -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);