-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Put the weather station configuration in a struct for the config. The holfuy API URL should be outside. Make the config have an array of such structs.
In the client, have a hidden template with the config fields for each kind of weather station. Each field should have a special class instead of id.
For each row in the configs array, copy the right template, make it visible, fill the values. Have a button to remove each weather station's config section.
Add buttons to add a new weather station.
When the user presses the Config button in the browser, if the client does not have a list of stations, send a msg to the server. In the mean while it just shows the Station's id.
When the server has network access (ST mode), it requests the stations.json file from the server and parses it. For each station, send a json msg to the client that adds/replaces it in its list. When the server is done, it sends a message to the client, the client changes all the station id fields from type=text to a selection list, with the old value selected. Update the template as well.