improved service and broadcast urls

This commit is contained in:
dcore94 2022-07-28 14:36:23 +02:00
parent be9273af73
commit 6e46e96078
1 changed files with 9 additions and 2 deletions

View File

@ -2,7 +2,8 @@ class CCPExecutionMonitor extends HTMLElement {
#boot = null;
#rootdoc = null;
#broadcasturl = "wss://nubis1.int.d4science.net:8080/ws/notification";
#serviceurl = null;
#broadcasturl = null;
#executions = [];
#socket = null;
@ -10,6 +11,12 @@ class CCPExecutionMonitor extends HTMLElement {
super()
this.#boot = document.querySelector("d4s-boot-2")
this.#rootdoc = this.attachShadow({ "mode" : "open"})
this.#serviceurl = this.getAttribute("serviceurl")
this.#broadcasturl = this.getAttribute("broadcasturl")
if(!this.#broadcasturl){
this.#broadcasturl = this.#serviceurl.replace(/^http/, "ws")
}
this.#broadcasturl = this.#broadcasturl + "/ws/notification"
this.connectBroadcast()
}