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