fix(ui): open WS only once
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 17 Feb 2024 13:21:13 +0000 (14:21 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 17 Feb 2024 13:21:13 +0000 (14:21 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
ui/web/src/composables/UIClient.ts
ui/web/src/main.ts

index 572dc5d48182c5a6ed883b8472842a3c64326532..d321d3d50227ce0e13107ec9d69c8f8ad34f3b54 100644 (file)
@@ -115,7 +115,7 @@ export class UIClient {
     })
   }
 
-  public openWS(): void {
+  private openWS(): void {
     const protocols =
       this.configuration.uiServer.authentication?.enabled === true &&
       this.configuration.uiServer.authentication?.type === AuthenticationType.PROTOCOL_BASIC_AUTH
index 1c213741953a0e4571411d72f29c7771b3c6b128..771d42a7202d77cdc0f783ec4fbc2b59d09cbde7 100644 (file)
@@ -13,7 +13,6 @@ const initializeApp = async (config: ConfigurationData) => {
     // TODO: Add code for UI notifications or other error handling logic
   }
   app.config.globalProperties.$UIClient = UIClient.getInstance(config)
-  app.config.globalProperties.$UIClient.openWS()
   app.use(router).mount('#app')
 }
 
@@ -28,4 +27,5 @@ fetch('/config.json')
   })
   .catch(error => {
     console.error('Error at initializing app:', error)
+    throw error
   })