generated from SAP/repository-template
-
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Web UI: add and fix missing commands support
Signed-off-by: Jérôme Benoit <[email protected]>
- Loading branch information
Jérôme Benoit
committed
Aug 26, 2022
1 parent
4eca248
commit 5a010bf
Showing
17 changed files
with
228 additions
and
888 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './charging-station/Bootstrap'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 45 additions & 36 deletions
81
src/ui/web/src/components/charging-stations/CSConnector.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,74 @@ | ||
<template> | ||
<td class="cs-table__action-col"> | ||
<Button @click="startTransaction()">Start Transaction</Button> | ||
<!-- <TagInputModal | ||
:visibility="state.isTagModalVisible" | ||
:tag="state.tag" | ||
@close="hideTagModal()" | ||
@done="Utils.compose(state.transaction, hideTagModal)()" | ||
<!-- <IdTagInputModal | ||
:visibility="state.isIdTagModalVisible" | ||
:idTag="state.idTag" | ||
@close="hideIdTagModal()" | ||
@done="Utils.compose(state.transaction, hideIdTagModal)()" | ||
> | ||
Start Charging Session | ||
</TagInputModal> --> | ||
<!-- TODO: Use transactionId to stop transaction --> | ||
<!-- <Button @click="stopTransaction()">Stop Transaction</Button> --> | ||
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.bootStatus }}</td> | ||
<td class="cs-table__status-col">{{ connector.status }}</td> | ||
<td class="cs-table__transaction-col">{{ connector.transactionStarted }}</td> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import TagInputModal from './TagInputModal.vue'; | ||
// import IdTagInputModal from './IdTagInputModal.vue'; | ||
import Button from '../buttons/Button.vue'; | ||
import { reactive } from 'vue'; | ||
// import { reactive } from 'vue'; | ||
import UIClient from '@/composable/UIClient'; | ||
import { ConnectorStatus } from '@/type/ChargingStationType'; | ||
import Utils from '@/composable/Utils'; | ||
// import Utils from '@/composable/Utils'; | ||
const props = defineProps<{ | ||
hashId: string; | ||
connector: ConnectorStatus; | ||
transactionId?: number; | ||
connectorId?: number; | ||
tag?: string; | ||
connectorId: number; | ||
idTag?: string; | ||
}>(); | ||
type State = { | ||
isTagModalVisible: boolean; | ||
tag: string; | ||
transaction: () => void; | ||
}; | ||
const state: State = reactive({ | ||
isTagModalVisible: false, | ||
tag: '', | ||
transaction: startTransaction, | ||
}); | ||
// type State = { | ||
// isIdTagModalVisible: boolean; | ||
// idTag: string; | ||
// transaction: () => void; | ||
// }; | ||
function getTag(transaction: () => void): void { | ||
state.transaction = transaction; | ||
showTagModal(); | ||
} | ||
// const state: State = reactive({ | ||
// isIdTagModalVisible: false, | ||
// idTag: '', | ||
// transaction: startTransaction, | ||
// }); | ||
function showTagModal(): void { | ||
state.isTagModalVisible = true; | ||
} | ||
function hideTagModal(): void { | ||
state.isTagModalVisible = false; | ||
} | ||
// function getIdTag(transaction: () => void): void { | ||
// state.transaction = transaction; | ||
// showTagModal(); | ||
// } | ||
// function showTagModal(): void { | ||
// state.isIdTagModalVisible = true; | ||
// } | ||
// function hideIdTagModal(): void { | ||
// state.isIdTagModalVisible = false; | ||
// } | ||
function startTransaction(): void { | ||
UIClient.instance.startTransaction(props.hashId, props.connectorId, props.tag); | ||
UIClient.instance.startTransaction(props.hashId, props.connectorId, props.idTag); | ||
} | ||
function stopTransaction(): void { | ||
UIClient.instance.stopTransaction(props.hashId, props.transactionId); | ||
} | ||
function openConnection(): void { | ||
UIClient.instance.openConnection(props.hashId); | ||
} | ||
function closeConnection(): void { | ||
UIClient.instance.closeConnection(props.hashId); | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.