master #18
|
@ -3,6 +3,7 @@ class CCPExecutionHistory extends HTMLElement {
|
||||||
#boot = null;
|
#boot = null;
|
||||||
#rootdoc = null;
|
#rootdoc = null;
|
||||||
#serviceurl = null;
|
#serviceurl = null;
|
||||||
|
#wsurl = null;
|
||||||
#broadcasturl = null;
|
#broadcasturl = null;
|
||||||
#archive = null;
|
#archive = null;
|
||||||
#data = [];
|
#data = [];
|
||||||
|
@ -78,6 +79,14 @@ class CCPExecutionHistory extends HTMLElement {
|
||||||
this.#broadcasturl = this.#broadcasturl + "/ws/notification"
|
this.#broadcasturl = this.#broadcasturl + "/ws/notification"
|
||||||
this.#archive = this.getAttribute("allow-archive") && this.getAttribute("allow-archive").toLowerCase() === "true"
|
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.connectNewExecution()
|
||||||
this.connectBroadcastWithSubject()
|
this.connectBroadcastWithSubject()
|
||||||
this.render()
|
this.render()
|
||||||
|
@ -637,14 +646,7 @@ class CCPExecutionHistory extends HTMLElement {
|
||||||
|
|
||||||
async initWorkspace(){
|
async initWorkspace(){
|
||||||
if(!this.#ws){
|
if(!this.#ws){
|
||||||
const iss = document.querySelector("d4s-boot-2").loginToken.iss;
|
this.#ws = new D4SWorkspace(this.#wsurl, this.#boot)
|
||||||
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)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!this.#execfolderid){
|
if(!this.#execfolderid){
|
||||||
|
|
Loading…
Reference in New Issue