-
Notifications
You must be signed in to change notification settings - Fork 242
Description
Describe the bug A clear and concise description of what the bug is.
If the ot-br agent runs on a port different from 8081 ( because the port is already used by another service for instance ) the otbr web ui will be unable to display the network topology.
The screen remains empty, with the loading animation running forever
the network console shows that the UI tries to connect to the current host on port 8081 for 2 endpoints:
http://localhost:8081/node
http://localhost:8081/diagnostics
This is consistent with the current frontend code on main where the port is directly hardcoded
https://github.com/openthread/ot-br-posix/blob/main/src/web/web-service/frontend/res/js/app.js#L435
and used to build the url to access the agent
Expected behavior
I would expect both the agent port to be loaded in the frontend from the backend configuration so the agent and web bui can be run from whatever port we want.
Going the extra mile would be to make the agent host optionally configurable in the backend and returned to the frontend along with the port, defaulting to the current url host if absent.
This would allow to run the web ui and agent on different servers and have all screens work as expected.