From: Jérôme Benoit Date: Sat, 17 Feb 2024 13:21:13 +0000 (+0100) Subject: fix(ui): open WS only once X-Git-Tag: v1.2.37~31 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=9e1d6e03d8c2add7d029b3ca756711ff702b7f99;p=e-mobility-charging-stations-simulator.git fix(ui): open WS only once Signed-off-by: Jérôme Benoit --- diff --git a/ui/web/src/composables/UIClient.ts b/ui/web/src/composables/UIClient.ts index 572dc5d4..d321d3d5 100644 --- a/ui/web/src/composables/UIClient.ts +++ b/ui/web/src/composables/UIClient.ts @@ -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 diff --git a/ui/web/src/main.ts b/ui/web/src/main.ts index 1c213741..771d42a7 100644 --- a/ui/web/src/main.ts +++ b/ui/web/src/main.ts @@ -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 })