repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
feat: expose template stats to UI server simulatorState command
[e-mobility-charging-stations-simulator.git]
/
ui
/
web
/
src
/
types
/
UIProtocol.ts
diff --git
a/ui/web/src/types/UIProtocol.ts
b/ui/web/src/types/UIProtocol.ts
index afc55b03069540e6f7a48b7e86dec88f4cea1291..5b3efcdcef1efb81cccc8eeddc5525ccda0797f1 100644
(file)
--- a/
ui/web/src/types/UIProtocol.ts
+++ b/
ui/web/src/types/UIProtocol.ts
@@
-25,6
+25,7
@@
export type ProtocolRequestHandler = (
) => ResponsePayload | Promise<ResponsePayload>
export enum ProcedureName {
) => ResponsePayload | Promise<ResponsePayload>
export enum ProcedureName {
+ SIMULATOR_STATE = 'simulatorState',
START_SIMULATOR = 'startSimulator',
STOP_SIMULATOR = 'stopSimulator',
LIST_TEMPLATES = 'listTemplates',
START_SIMULATOR = 'startSimulator',
STOP_SIMULATOR = 'stopSimulator',
LIST_TEMPLATES = 'listTemplates',
@@
-56,3
+57,16
@@
export interface ResponsePayload extends JsonObject {
status: ResponseStatus
hashIds?: string[]
}
status: ResponseStatus
hashIds?: string[]
}
+
+interface TemplateStatistics extends JsonObject {
+ configured: number
+ added: number
+ started: number
+ indexes: number[]
+}
+
+export interface SimulatorState extends JsonObject {
+ version: string
+ started: boolean
+ templateStatistics: Record<string, TemplateStatistics>
+}