master #18

Merged
m.lettere merged 12 commits from master into prod 2024-06-14 12:47:54 +02:00
1 changed files with 10 additions and 8 deletions
Showing only changes of commit a4769a6281 - Show all commits

View File

@ -3,6 +3,7 @@ class CCPExecutionHistory extends HTMLElement {
#boot = null;
#rootdoc = null;
#serviceurl = null;
#wsurl = null;
#broadcasturl = null;
#archive = null;
#data = [];
@ -78,6 +79,14 @@ class CCPExecutionHistory extends HTMLElement {
this.#broadcasturl = this.#broadcasturl + "/ws/notification"
this.#archive = this.getAttribute("allow-archive") && this.getAttribute("allow-archive").toLowerCase() === "true"
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"
};
this.#wsurl = addresses[iss]
this.connectNewExecution()
this.connectBroadcastWithSubject()
this.render()
@ -637,14 +646,7 @@ class CCPExecutionHistory extends HTMLElement {
async initWorkspace(){
if(!this.#ws){
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(this.#wsurl, this.#boot)
}
if(!this.#execfolderid){