Commit | Line | Data |
---|---|---|
32de5a57 LM |
1 | # Web UI |
2 | ||
3 | ## Project setup | |
4 | ||
d6b76da3 | 5 | ```shell |
603f1011 JB |
6 | corepack enable |
7 | pnpm install | |
32de5a57 LM |
8 | ``` |
9 | ||
8228f972 JB |
10 | The simulator UI server must be enabled, use WebSocket and disable authentication. The simulator main configuration file should have a `uiServer` section like this: |
11 | ||
12 | ```json | |
13 | "uiServer": { | |
14 | "enabled": true, | |
15 | "type": "ws", | |
16 | "authentication": { | |
17 | "enabled": false, | |
18 | "type": "basic-auth", | |
19 | "username": "admin", | |
20 | "password": "admin" | |
21 | } | |
22 | }, | |
23 | ``` | |
24 | ||
15124b9a | 25 | See [here](../../README.md#charging-stations-simulator-configuration) for more details. |
8228f972 | 26 | |
32de5a57 LM |
27 | ### Run |
28 | ||
efdd1922 | 29 | #### Compiles and run for production |
32de5a57 | 30 | |
d6b76da3 | 31 | ```shell |
603f1011 | 32 | pnpm start |
32de5a57 LM |
33 | ``` |
34 | ||
efdd1922 | 35 | #### Compiles and run for development |
32de5a57 | 36 | |
d6b76da3 | 37 | ```shell |
603f1011 | 38 | pnpm run serve |
32de5a57 | 39 | ``` |
bbe10d5f | 40 | |
d07e35d2 MK |
41 | #### Try it out |
42 | ||
43 | For both options above you can then follow the link displayed in the terminal at the end of compilation. The Web UI looks like the following | |
44 | ||
45 | ![webui](./assets/webui.png) | |
46 | ||
47 | 1. With the top 2 buttons you can now stop and afterwards start the simulator and inspect the server console for the number of charging stations, e.g. with the default configuration: `Charging stations simulator ... started with 10 charging station(s)` | |
48 | 2. Each charging station is a row in the table below, try "Stop Charging Station" and refresh with the large blue button and see the status Started turns from Yes into No. | |
32de5a57 LM |
49 | |
50 | ### Compiles and minifies for production | |
51 | ||
d6b76da3 | 52 | ```shell |
603f1011 | 53 | pnpm run build |
32de5a57 LM |
54 | ``` |
55 | ||
56 | ### Lints files | |
57 | ||
d6b76da3 | 58 | ```shell |
603f1011 | 59 | pnpm run lint |
32de5a57 | 60 | ``` |