Commit | Line | Data |
---|---|---|
32de5a57 LM |
1 | # Web UI |
2 | ||
3 | ## Project setup | |
4 | ||
d6b76da3 | 5 | ```shell |
603f1011 | 6 | corepack enable |
1a662d29 | 7 | corepack prepare pnpm@latest --activate |
603f1011 | 8 | pnpm install |
32de5a57 LM |
9 | ``` |
10 | ||
8228f972 JB |
11 | The simulator UI server must be enabled, use WebSocket and disable authentication. The simulator main configuration file should have a `uiServer` section like this: |
12 | ||
13 | ```json | |
14 | "uiServer": { | |
15 | "enabled": true, | |
16 | "type": "ws", | |
17 | "authentication": { | |
18 | "enabled": false, | |
19 | "type": "basic-auth", | |
20 | "username": "admin", | |
21 | "password": "admin" | |
22 | } | |
23 | }, | |
24 | ``` | |
25 | ||
15124b9a | 26 | See [here](../../README.md#charging-stations-simulator-configuration) for more details. |
8228f972 | 27 | |
32de5a57 LM |
28 | ### Run |
29 | ||
efdd1922 | 30 | #### Compiles and run for production |
32de5a57 | 31 | |
d6b76da3 | 32 | ```shell |
603f1011 | 33 | pnpm start |
32de5a57 LM |
34 | ``` |
35 | ||
efdd1922 | 36 | #### Compiles and run for development |
32de5a57 | 37 | |
d6b76da3 | 38 | ```shell |
603f1011 | 39 | pnpm run serve |
32de5a57 | 40 | ``` |
bbe10d5f | 41 | |
d07e35d2 MK |
42 | #### Try it out |
43 | ||
44 | 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 | |
45 | ||
46 | ![webui](./assets/webui.png) | |
47 | ||
48 | 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)` | |
49 | 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 |
50 | |
51 | ### Compiles and minifies for production | |
52 | ||
d6b76da3 | 53 | ```shell |
603f1011 | 54 | pnpm run build |
32de5a57 LM |
55 | ``` |
56 | ||
57 | ### Lints files | |
58 | ||
d6b76da3 | 59 | ```shell |
603f1011 | 60 | pnpm run lint |
32de5a57 | 61 | ``` |