-
-
Notifications
You must be signed in to change notification settings - Fork 143
[feature] Added indoor maps #662 #688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] Added indoor maps #662 #688
Conversation
9b399f4
to
1ca5856
Compare
49ee46c
to
7ae5d2f
Compare
openwisp_monitoring/device/static/monitoring/css/device-map.css
Outdated
Show resolved
Hide resolved
7ae5d2f
to
0ae92f7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves the device popup UI in the device map according to a Figma design and adds filtering functionality based on device name, MAC address, and monitoring health status. It also introduces a new floorplan view feature.
- Redesigned the device popup UI with improved styling and interactive elements
- Added search and filter functionality for devices by name, MAC address, and health status
- Implemented a new floorplan visualization feature with floor navigation
Reviewed Changes
Copilot reviewed 11 out of 14 changed files in this pull request and generated 6 comments.
Show a summary per file
File | Description |
---|---|
device_map.html | Added indoor coordinates URL configuration |
floorplan.js | New file implementing floorplan visualization and navigation logic |
device-map.js | Enhanced popup with search, filtering, and floorplan integration |
netjsongraph.css | Updated popup styling to full width |
floorplan.css | New CSS styles for floorplan modal and navigation |
device-map.css | Updated styling for improved popup UI and health status indicators |
apps.py | Added floorplan assets and indoor coordinates URL configuration |
views.py | Added new indoor coordinates API view with test pagination |
urls.py | Added new API endpoint for indoor coordinates |
serializers.py | Added monitoring indoor coordinates serializer |
filters.py | Added filtering logic for device search and status filtering |
openwisp_monitoring/device/static/monitoring/css/device-map.css
Outdated
Show resolved
Hide resolved
openwisp_monitoring/device/static/monitoring/css/device-map.css
Outdated
Show resolved
Hide resolved
a485a1f
to
8c6bb02
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work @dee077!
I reviewed device-map.js and selenium tests thoroughly. We need to add some more selenium tests.
openwisp_monitoring/device/static/monitoring/css/device-map.css
Outdated
Show resolved
Hide resolved
openwisp_monitoring/device/static/monitoring/css/netjsongraph.css
Outdated
Show resolved
Hide resolved
openwisp_monitoring/settings.py
Outdated
HEALTH_STATUS_LABELS = { | ||
"ok": "Ok", | ||
"problem": "Problem", | ||
"critical": "Critical", | ||
"unknown": "Unknown", | ||
"deactivated": "Deactivated", | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we require this? We already have a setting for this which we discussed on our 1-on-1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This way we can check the custom label as well
let me know if it is not required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to custom label names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The zooming in issue after exiting the fullscreen still exists.
device-map-2025-07-28_22.13.14.mp4
@dee077 can we hide the controls of the geographic map when floorplan is shown.
openwisp_monitoring/device/static/monitoring/css/device-map.css
Outdated
Show resolved
Hide resolved
openwisp_monitoring/device/static/monitoring/css/device-map.css
Outdated
Show resolved
Hide resolved
openwisp_monitoring/device/static/monitoring/css/device-map.css
Outdated
Show resolved
Hide resolved
openwisp_monitoring/device/static/monitoring/css/device-map.css
Outdated
Show resolved
Hide resolved
ac7a1aa
to
e4b6954
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
device-map-2025-08-11_21.29.10.mp4
@dee077 the fullscreen zoom-in and zoom-out works perfectly for the first 4 image which are square-ish
It is not handling the last image properly. I am using the below floorplan.

Pending things:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nemesifier @dee077 and I discussed the following changes to the UI today
- Device popup heading margin should be set to 0
- Heading and close button should be at the same level
- Device table height is 180px (max height)
- If there's only one device, than it shall adapt accordingly
- If there are more than 3 devices, then show a scroll bar. Otherwise, just show the three devices.
- Make the filters highlighted when they are selected.
- The default opacity should be 0.8
- After clicking, the filter the opacity should be 1 (
.health-status.active {opacity: 1}
)
- Reduce the opacity of the disabled navigation arrow to 0.3
- Set
{cursor: default}
on the disabled navigation arrow
- Set
- Set
{cursor: default}
to active floor buttonfloor-btn.active.selected
- Change the color of active arrow to #737985
- Changes to the floorplan overlay
- Remove padding on floorplan heading
- Add
margin-bottom: 10px
to the heading - Update the position of the close button
#floorplan-heading { margin-bottom: 10px; // remove padding } #floorplan-close-btn { top: 8px; right: 8px; }
- Add hover effect on the close icons (set
color: black
on hover) - Floorplan navigation widget - if there are more floors available, and the selected floor is in the middle, then clicking on the navigation button should add new floors to the navigation widget instead of moving the selected floor.
- Increase the margin of the floorplan navigation arrow (@dee077 I missed to write down the value of the margin, I guess it was 8px)
In our debugging session today, we found that the fullscreen can only be toggled by user gesture (not by JS from an async function). Problem: Fullscreen mode can only be triggered by user gesturePossible solution for the fullscreen navigation:
|
I think we need to go with 2. Not allowing to navigate floors is not acceptable. In the meantime we need to investigate option 3. Please @pandafy @dee077 think on whether we could add logic in netjsongraph.js to facilitate option 3 and if it's technically feasible we can create a follow up issue to work on it in the coming months. |
name="api_wifi_session_detail", | ||
), | ||
path( | ||
"api/v1/monitoring/location/<str:pk>/indoor-coordinates/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be added to the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still pending. Let's not wait for this as it can be addressed very quickly and I am worried if we delay this we may forget.
}, | ||
error() { | ||
console.error("Could not load more devices from", url); | ||
alert("Could not load more devices."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flag as translatable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CSS adjustments
I tried re-adjusting sizes and move things around (180edaf), but this requires changing also a few details in openwisp-utils hence I opened openwisp/openwisp-utils#509 and made this PR depend on that branch, the result looks as follows:

The pop up autopan is not always working
Try this:
This happens because at the moment of opening the pop up, the rows are not rendered yet.
@dee077 can we fix this? For example, can we render the rows before opening the pop up? Or any other solution that ensures the pop up is fully visible after clicked in every situation.
Opening a map popup does not give "loading" visual feedback
Try opening a map point with throttling enabled in the browser console: there's no visual feedback about the loading operation.
It seems this problem is pre-existing, so I propose to create a new follow-up issue for this to be worked on later, unless you have a quick solution for this.
Lots of strings not flagged as translatable
Please flag all user facing strings as translatable.
Docs missing
We need to update the docs, but it seems counter productive to work on this now while we still have adjustments to make, I see we have a dedicated issue for that (#660) so let's work on that once we are done with the main changes.
Opened #704 |
Updates:
Screencast.from.2025-09-11.19-06-47.webmwating for openwisp/openwisp-utils#509 |
e1c7c13
to
1ed30c3
Compare
1ed30c3
to
acec94b
Compare
|
||
|
||
class SeleniumTestMixin(BaseSeleniumTestMixin): | ||
browser = "chrome" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I accidentally added this in my previous commit
# TODO: Remove before merging - install branch build of openwisp-utils for CI testing | ||
pip install -U -I "openwisp-utils @ https://github.com/openwisp/openwisp-utils/tarball/gsoc25-map-adjustments" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocker openwisp/openwisp-utils#509
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed a minor adjustment for narrow screens 6556f36.
There's only one comment pending, then we can merge.
name="api_wifi_session_detail", | ||
), | ||
path( | ||
"api/v1/monitoring/location/<str:pk>/indoor-coordinates/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still pending. Let's not wait for this as it can be addressed very quickly and I am worried if we delay this we may forget.
Checklist
Reference to Existing Issue
Closes #662.
Description of Changes
Screenshot
Pending things:
[bug] Overlaying Indoor Map with L.CRS.Simple Overrides Geo Map Interaction and CRS Settings netjsongraph.js#397
[feature] Add popup on click of a node configurable from config netjsongraph.js#402
Explored solution for coordinate conversion
image width/height
andbounding box
.