[fix] Load charts using dashboard domain#528
[fix] Load charts using dashboard domain#528Adityashandilya555 wants to merge 17 commits intoopenwisp:masterfrom
Conversation
…p#477 Replaced archived django-celery-email with actively maintained django-post-office for async email handling. - Updated requirements.txt: django-celery-email -> django-post-office - Changed email backend configuration in Dockerfile - Updated settings.py to use post_office app conditionally Fixes openwisp#477
…penwisp#477 The archived django-celery-email package has been replaced with django-celery-email-reboot, a maintained fork that provides Django 4.x/5.x compatibility. This is a drop-in replacement with identical API. Changes: - Updated requirements.txt to use django-celery-email-reboot>=4.1.0,<5.0.0 - Changed EMAIL_BACKEND to djcelery_email.backends.CeleryEmailBackend - Updated settings.py to check for djcelery_email backend Testing performed following maintainer's approach: - Built all Docker images successfully with django-celery-email-reboot 4.1.0 - Tested email flow: docker compose run dashboard python manage.py sendtestemail - Verified postfix logs showing successful email pipeline: Django → Celery → Postfix (queue ID 95C4120370E8) - Email queued and delivery attempted successfully The entire email pipeline is working correctly with the new package. Fixes openwisp#477
This change addresses issue openwisp#526 by making monitoring charts load from the dashboard domain instead of the API domain. This prevents SSL certificate issues that can confuse new users when the API domain doesn't have a trusted certificate. Changes: - Added DASHBOARD_BASEURL configuration variable - Changed OPENWISP_MONITORING_API_BASEURL to use dashboard domain - Chart loading now uses the same domain as the dashboard interface Fixes openwisp#526
f063d92 to
8cb14af
Compare
| OPENWISP_NOTIFICATIONS_HOST = API_BASEURL | ||
| OPENWISP_CONTROLLER_API_HOST = API_BASEURL | ||
| OPENWISP_MONITORING_API_BASEURL = API_BASEURL | ||
| OPENWISP_MONITORING_API_BASEURL = DASHBOARD_BASEURL |
There was a problem hiding this comment.
Would removing OPENWISP_MONITORING_API_BASEURL completely work?
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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_NOTIFICATIONS_HOST = API_BASEURL | ||
| OPENWISP_CONTROLLER_API_HOST = API_BASEURL | ||
| OPENWISP_MONITORING_API_BASEURL = API_BASEURL | ||
| OPENWISP_MONITORING_API_BASEURL = DASHBOARD_BASEURL |
There was a problem hiding this comment.
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.
|
@Adityashandilya555 ping |
WalkthroughRemoved the Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
Comment |
|
Change.Device._.OpenWISP.Admin.1.mp4 |
Removed OPENWISP_MONITORING_API_BASEURL so that monitoring charts use relative URLs and load from the dashboard domain. This fixes SSL certificate issues for users without trusted certs on the API domain. Closes openwisp#526
9990783 to
4105107
Compare
Checklist
Reference to Existing Issue
Closes #526.
Description of Changes
DASHBOARD_BASEURLconfiguration variable using dashboard domainOPENWISP_MONITORING_API_BASEURLto useDASHBOARD_BASEURLinstead ofAPI_BASEURLScreenshot
Please include any relevant screenshots.