refactored urls

This commit is contained in:
dcore94 2022-03-22 19:03:42 +01:00
parent d802ebac51
commit afe2c67bd1
1 changed files with 6 additions and 5 deletions

View File

@ -5,8 +5,9 @@ class CCPMethodList extends HTMLElement{
#data;
#filtered;
#url = "http://localhost:8080/ccp/fragment.html"
//#url = "http://d4science-cdn-public:8984/resources/ccp/fragment.html"
#serviceurl = "https://nubis1.int.d4science.net:8080"
#cdnurl = "https://nubis1.int.d4science.net:8080/ccp/fragment.html"
//#cdnurl = "http://d4science-cdn-public:8984/resources/ccp/fragment.html"
constructor(){
super()
@ -16,7 +17,7 @@ class CCPMethodList extends HTMLElement{
}
fetchMarkup(){
return fetch(this.#url).then(
return fetch(this.#cdnurl).then(
(reply)=>{
if(reply.status === 200){
return reply.text()
@ -36,7 +37,7 @@ class CCPMethodList extends HTMLElement{
}
fetchProcesses(){
this.#boot.service("http://localhost:8080/processes", "GET", { limit : 1000}, (resp)=>this.showList(resp), ()=>{ alert("You are not allowed list CCP methods") })
this.#boot.service(this.#serviceurl + "/processes", "GET", { limit : 1000}, (resp)=>this.showList(resp), ()=>{ alert("You are not allowed list CCP methods") })
}
showList(resp){
@ -101,4 +102,4 @@ class CCPMethodList extends HTMLElement{
}
window.customElements.define('d4s-ccp-methodlist', CCPMethodList);
window.customElements.define('d4s-ccp-methodlist', CCPMethodList);