Now that we have project JS client side, etc WAS URL handling will need to be updated.
Current in-progress thinking:
- Next.js build artifacts to go to static/admin in WAS FastAPI
- WAS updated to support CORS (with * out of box)
- WAS updated with StaticFiles and
html=True
- Users can figure out how to get to the WAS admin URL in their environment
- For initial configuration for WAS WS URL use JS window location to get protocol, hostname, and port.
- Pre-populate WAS URL input field with some handling: if https, use wss. Otherwise ws, then hostname and port for either. With hosting API and UI out of FastAPI WAS only needs to listen on one port now.
- Allow user to override WAS URL in the event they have more complex network configurations where their Willow devices may need to access it via an alternative URL
- The WAS URL from the UI will need to get POSTed to WAS and stored so WAS can self-reference itself for OTA, etc
- We may need to implement sqlite or similar to store this data and additional data down the road
Now that we have project JS client side, etc WAS URL handling will need to be updated.
Current in-progress thinking:
html=True