Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion images/openwisp_dashboard/module_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,14 @@
else f":{HTTP_PORT}"
)
API_BASEURL = f'{HTTP_SCHEME}://{os.environ["API_DOMAIN"]}{HTTP_PORT}'
DASHBOARD_BASEURL = f'{HTTP_SCHEME}://{os.environ["DASHBOARD_DOMAIN"]}{HTTP_PORT}'

OPENWISP_NETWORK_TOPOLOGY_API_URLCONF = "openwisp_network_topology.urls"
OPENWISP_MONITORING_API_URLCONF = "openwisp_monitoring.urls"
OPENWISP_RADIUS_API_URLCONF = "openwisp_radius.urls"
OPENWISP_NETWORK_TOPOLOGY_API_BASEURL = API_BASEURL
OPENWISP_NOTIFICATIONS_HOST = API_BASEURL
OPENWISP_CONTROLLER_API_HOST = API_BASEURL
OPENWISP_MONITORING_API_BASEURL = API_BASEURL
OPENWISP_MONITORING_API_BASEURL = DASHBOARD_BASEURL
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would removing OPENWISP_MONITORING_API_BASEURL completely work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, removing OPENWISP_MONITORING_API_BASEURL completely should work. I checked the openwisp-monitoring source and the default value is None, which means the charts will use relative URLs and load from the current domain (the dashboard domain).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do that then and simplify this. This way we don't need to define DASHBOARD_BASEURL.
Keep it simple. Please do manual testing to ensure the approach work and record a video showing the result.

OPENWISP_FIRMWARE_API_BASEURL = API_BASEURL
OPENWISP_RADIUS_API_BASEURL = API_BASEURL