From 30fc5f08f040907e439a8fbedf66aa17c2100811 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 19 Feb 2024 20:43:21 +0100 Subject: [PATCH] fix: ensure charging stations array global property is initialized MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- ui/web/src/main.ts | 6 +++++- ui/web/src/views/ChargingStationsView.vue | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/web/src/main.ts b/ui/web/src/main.ts index 97f0167a..d0c427bf 100644 --- a/ui/web/src/main.ts +++ b/ui/web/src/main.ts @@ -14,7 +14,11 @@ const initializeApp = (config: ConfigurationData) => { console.info('Error info:', info) // TODO: add code for UI notifications or other error handling logic } - app.config.globalProperties.$uiClient = UIClient.getInstance(config.uiServer) + app.config.globalProperties.$configuration = config + app.config.globalProperties.$chargingStations = [] + app.config.globalProperties.$uiClient = UIClient.getInstance( + app.config.globalProperties.$configuration.uiServer + ) app.config.globalProperties.$uiClient.registerWSEventListener('open', () => { app.config.globalProperties.$uiClient .listChargingStations() diff --git a/ui/web/src/views/ChargingStationsView.vue b/ui/web/src/views/ChargingStationsView.vue index 5639c991..b4f7873b 100644 --- a/ui/web/src/views/ChargingStationsView.vue +++ b/ui/web/src/views/ChargingStationsView.vue @@ -12,7 +12,7 @@ @click="loadChargingStations(() => $router.go(0))" /> - + -- 2.34.1