Web UI: method namespace cleanup
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 26 Aug 2022 10:06:17 +0000 (12:06 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 26 Aug 2022 10:06:17 +0000 (12:06 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/ui/web/src/composable/UIClient.ts
src/ui/web/src/views/ChargingStationsView.vue

index d0a93beeb3a640ce2f4a7d70cb3c8e938638034d..22e3a7f25ddab066606b32cc236466b2ba889b2c 100644 (file)
@@ -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);
   }
 
index 10d6e4da87596d64f2d44924ec9f5991398a61fc..9a5a2ce1d95a7bd8e0ddfd6495ad257abf4a5539 100644 (file)
@@ -28,7 +28,7 @@ import { ChargingStationData } from '@/type/ChargingStationType';
 const UIClientInstance = UIClient.instance;
 
 onMounted(() => {
-  UIClientInstance.onOpen(load);
+  UIClientInstance.registerWSonOpenListener(load);
 });
 
 type State = {