Skip to content

Web Ui topology is broken if ot-br runs on a port different from 8081 #2823

@jeantil

Description

@jeantil

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

Image

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

Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions