this.templateFileWatcher.close();
this.sharedLRUCache.deleteChargingStationTemplate(this.stationInfo?.templateHash);
this.bootNotificationResponse = null;
- parentPort.postMessage(MessageChannelUtils.buildStoppedMessage(this));
this.stopped = true;
+ parentPort.postMessage(MessageChannelUtils.buildStoppedMessage(this));
}
public async reset(reason?: StopTransactionReason): Promise<void> {
<template>
<teleport to="body">
- <div id="backdrop" v-if="visibility" @click.self="close()">
+ <div id="backdrop" v-if="props.visibility" @click.self="close()">
<slot></slot>
</div>
</teleport>
<template>
<td class="cs-table__action-col">
+ <Button @click="startChargingStation()">Start Charging Station</Button>
+ <Button @click="stopChargingStation()">Stop Charging Station</Button>
+ <Button @click="openConnection()">Open Connection</Button>
+ <Button @click="closeConnection()">Close Connection</Button>
<Button @click="startTransaction()">Start Transaction</Button>
<!-- <IdTagInputModal
:visibility="state.isIdTagModalVisible"
Start Transaction
</IdTagInputModal> -->
<Button @click="stopTransaction()">Stop Transaction</Button>
- <Button @click="openConnection()">Open Connection</Button>
- <Button @click="closeConnection()">Close Connection</Button>
</td>
<td class="cs-table__connector-col">{{ connectorId }}</td>
<td class="cs-table__status-col">{{ connector.status }}</td>
- <td class="cs-table__transaction-col">{{ connector.transactionStarted }}</td>
+ <td class="cs-table__transaction-col">{{ connector.transactionStarted ? 'Yes' : 'No' }}</td>
</template>
<script setup lang="ts">
// state.isIdTagModalVisible = false;
// }
-function startTransaction(): void {
- UIClient.instance.startTransaction(props.hashId, props.connectorId, props.idTag);
+function startChargingStation(): void {
+ UIClient.instance.startChargingStation(props.hashId);
}
-function stopTransaction(): void {
- UIClient.instance.stopTransaction(props.hashId, props.transactionId);
+function stopChargingStation(): void {
+ UIClient.instance.stopChargingStation(props.hashId);
}
function openConnection(): void {
UIClient.instance.openConnection(props.hashId);
function closeConnection(): void {
UIClient.instance.closeConnection(props.hashId);
}
+function startTransaction(): void {
+ UIClient.instance.startTransaction(props.hashId, props.connectorId, props.idTag);
+}
+function stopTransaction(): void {
+ UIClient.instance.stopTransaction(props.hashId, props.transactionId);
+}
</script>
:id-tag="props.idTag"
/>
<td class="cs-table__name-col">{{ getId() }}</td>
+ <td class="cs-table__stopped-col">{{ getStopped() }}</td>
<td class="cs-table__vendor-col">{{ getVendor() }}</td>
<td class="cs-table__model-col">{{ getModel() }}</td>
<td class="cs-table__firmware-col">{{ getFirmwareVersion() }}</td>
function getFirmwareVersion(): string {
return Utils.ifUndefined<string>(getInfo().firmwareVersion, 'Ø');
}
+function getStopped(): string {
+ return props.chargingStation.stopped ? 'Yes' : 'No';
+}
// function showTagModal(): void {
// state.isTagModalVisible = true;
// }
<template>
- <Modal :visibility="isVisible">
+ <Modal :visibility="props.isVisible">
<div class="card-info">vendor: {{ props.info.chargePointVendor }}</div>
</Modal>
</template>
<th scope="col" class="cs-table__status-col">Status</th>
<th scope="col" class="cs-table__transaction-col">Transaction</th>
<th scope="col" class="cs-table__name-col">Name</th>
+ <th scope="col" class="cs-table__stopped-col">Stopped</th>
<th scope="col" class="cs-table__vendor-col">Vendor</th>
<th scope="col" class="cs-table__model-col">Model</th>
<th scope="col" class="cs-table__firmware-col">Firmware Version</th>
#cs-table__body {
/* width: 100%; */
/* direction: rtl; */
- /* overflow: visible scroll; */
overflow: visible overlay;
flex-grow: 1;
}
width: 100%;
/* display: inline-block; */
display: flex;
+ justify-content: center;
+ align-items: center;
/* align-content: stretch; */
- /* align-items: baseline; */
}
#cs-table__head .cs-table__row {
background-color: rgb(194, 188, 188);
.cs-table__status-col,
.cs-table__transaction-col,
.cs-table__name-col,
+.cs-table__stopped-col,
.cs-table__model-col,
.cs-table__vendor-col,
.cs-table__firmware-col {
.cs-table__name-col {
/* min-width: 120px; */
}
+.cs-table__stopped-col {
+ /* min-width: 120px; */
+}
.cs-table__model-col {
/* min-width: 120px; */
}
<template>
- <Modal :visibility="visibility">
+ <Modal :visibility="props.visibility">
<label for="idTag">IdTag</label>
<!-- eslint-disable-next-line vue/no-mutating-props -->
<input type="text" name="idTag" v-model="props.idTag" @keypress.enter="done()" />
return this.sendRequest(ProcedureName.LIST_CHARGING_STATIONS, {});
}
+ public async startChargingStation(hashId: string): Promise<ResponsePayload> {
+ return this.sendRequest(ProcedureName.START_CHARGING_STATION, { hashId });
+ }
+
+ public async stopChargingStation(hashId: string): Promise<ResponsePayload> {
+ return this.sendRequest(ProcedureName.STOP_CHARGING_STATION, { hashId });
+ }
+
+ public async openConnection(hashId: string): Promise<ResponsePayload> {
+ return this.sendRequest(ProcedureName.OPEN_CONNECTION, {
+ hashId,
+ });
+ }
+
+ public async closeConnection(hashId: string): Promise<ResponsePayload> {
+ return this.sendRequest(ProcedureName.CLOSE_CONNECTION, {
+ hashId,
+ });
+ }
+
public async startTransaction(
hashId: string,
connectorId: number,
});
}
- public async openConnection(hashId: string): Promise<ResponsePayload> {
- return this.sendRequest(ProcedureName.OPEN_CONNECTION, {
- hashId,
- });
- }
-
- public async closeConnection(hashId: string): Promise<ResponsePayload> {
- return this.sendRequest(ProcedureName.CLOSE_CONNECTION, {
- hashId,
- });
- }
-
private openWS(): void {
this._ws = new WebSocket(
`ws://${config.emobility.host}:${config.emobility.port}`,