From: Jérôme Benoit Date: Fri, 26 Aug 2022 10:06:17 +0000 (+0200) Subject: Web UI: method namespace cleanup X-Git-Tag: v1.1.67~3 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=16fe3949f743c57db407cc02a5c017af4da1c7a9;p=e-mobility-charging-stations-simulator.git Web UI: method namespace cleanup Signed-off-by: Jérôme Benoit --- diff --git a/src/ui/web/src/composable/UIClient.ts b/src/ui/web/src/composable/UIClient.ts index d0a93bee..22e3a7f2 100644 --- a/src/ui/web/src/composable/UIClient.ts +++ b/src/ui/web/src/composable/UIClient.ts @@ -33,7 +33,7 @@ export default class UIClient { return UIClient._instance; } - public onOpen(listener: (this: WebSocket, ev: Event) => void) { + public registerWSonOpenListener(listener: (this: WebSocket, ev: Event) => void) { this._ws.addEventListener('open', listener); } diff --git a/src/ui/web/src/views/ChargingStationsView.vue b/src/ui/web/src/views/ChargingStationsView.vue index 10d6e4da..9a5a2ce1 100644 --- a/src/ui/web/src/views/ChargingStationsView.vue +++ b/src/ui/web/src/views/ChargingStationsView.vue @@ -28,7 +28,7 @@ import { ChargingStationData } from '@/type/ChargingStationType'; const UIClientInstance = UIClient.instance; onMounted(() => { - UIClientInstance.onOpen(load); + UIClientInstance.registerWSonOpenListener(load); }); type State = {