made ws addres parametric to infrastructure

This commit is contained in:
dcore94 2024-06-13 14:51:51 +02:00
parent c95b62b1d4
commit ef6ab169df
1 changed files with 7 additions and 1 deletions

View File

@ -637,7 +637,13 @@ class CCPExecutionHistory extends HTMLElement {
async initWorkspace(){ async initWorkspace(){
if(!this.#ws){ if(!this.#ws){
const wsurl = "https://workspace-repository.dev.d4science.org/storagehub/workspace" const iss = document.querySelector("d4s-boot-2").loginToken.iss;
const addresses = {
"https://accounts.dev.d4science.org/auth/realms/d4science": "https://workspace-repository.dev.d4science.org/storagehub/workspace",
"https://accounts.pre.d4science.org/auth/realms/d4science": "https://pre.d4science.org/workspace",
"https://accounts.d4science.org/auth/realms/d4science": "https://api.d4science.org/workspace"
};
const wsurl = addresses[iss]
this.#ws = new D4SWorkspace(wsurl, this.#boot) this.#ws = new D4SWorkspace(wsurl, this.#boot)
} }