From: Jérôme Benoit Date: Sun, 18 Feb 2024 10:53:46 +0000 (+0100) Subject: feat(ui): add set supervision url action X-Git-Tag: v1.2.37~14 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=f8696170fe4343a6fef450a6f0d4a47daccbcee0;p=e-mobility-charging-stations-simulator.git feat(ui): add set supervision url action Signed-off-by: Jérôme Benoit --- diff --git a/ui/web/src/components/actions/SetSupervisionUrl.vue b/ui/web/src/components/actions/SetSupervisionUrl.vue new file mode 100644 index 00000000..00f4ef3d --- /dev/null +++ b/ui/web/src/components/actions/SetSupervisionUrl.vue @@ -0,0 +1,52 @@ + + + + + diff --git a/ui/web/src/components/charging-stations/CSData.vue b/ui/web/src/components/charging-stations/CSData.vue index 107df494..4502f53c 100644 --- a/ui/web/src/components/charging-stations/CSData.vue +++ b/ui/web/src/components/charging-stations/CSData.vue @@ -22,6 +22,18 @@ + diff --git a/ui/web/src/composables/UIClient.ts b/ui/web/src/composables/UIClient.ts index c5f20ce0..ce459f1b 100644 --- a/ui/web/src/composables/UIClient.ts +++ b/ui/web/src/composables/UIClient.ts @@ -67,6 +67,13 @@ export class UIClient { return this.sendRequest(ProcedureName.DELETE_CHARGING_STATIONS, { hashIds: [hashId] }) } + public async setSupervisionUrl(hashId: string, supervisionUrl: string): Promise { + return this.sendRequest(ProcedureName.SET_SUPERVISION_URL, { + hashIds: [hashId], + url: supervisionUrl + }) + } + public async startChargingStation(hashId: string): Promise { return this.sendRequest(ProcedureName.START_CHARGING_STATION, { hashIds: [hashId] }) } diff --git a/ui/web/src/router/index.ts b/ui/web/src/router/index.ts index 0d250c51..bdb22503 100644 --- a/ui/web/src/router/index.ts +++ b/ui/web/src/router/index.ts @@ -2,6 +2,7 @@ import { createRouter, createWebHistory } from 'vue-router' import ChargingStationsView from '@/views/ChargingStationsView.vue' import StartTransaction from '@/components/actions/StartTransaction.vue' import AddChargingStations from '@/components/actions/AddChargingStations.vue' +import SetSupervisionUrl from '@/components/actions/SetSupervisionUrl.vue' export const router = createRouter({ history: createWebHistory(), @@ -21,6 +22,15 @@ export const router = createRouter({ action: AddChargingStations } }, + { + path: '/set-supervision-url/:hashId/:chargingStationId', + name: 'set-supervision-url', + components: { + default: ChargingStationsView, + action: SetSupervisionUrl + }, + props: { default: false, action: true } + }, { path: '/start-transaction/:hashId/:chargingStationId/:connectorId', name: 'start-transaction', diff --git a/ui/web/src/types/UIProtocol.ts b/ui/web/src/types/UIProtocol.ts index 9e7a71a8..afc55b03 100644 --- a/ui/web/src/types/UIProtocol.ts +++ b/ui/web/src/types/UIProtocol.ts @@ -31,6 +31,7 @@ export enum ProcedureName { LIST_CHARGING_STATIONS = 'listChargingStations', ADD_CHARGING_STATIONS = 'addChargingStations', DELETE_CHARGING_STATIONS = 'deleteChargingStations', + SET_SUPERVISION_URL = 'setSupervisionUrl', START_CHARGING_STATION = 'startChargingStation', STOP_CHARGING_STATION = 'stopChargingStation', OPEN_CONNECTION = 'openConnection',