Skip to content

Optical node map updates#20

Open
bergroth wants to merge 9 commits intoNORDUnet:masterfrom
bergroth:optical-node-map-updates
Open

Optical node map updates#20
bergroth wants to merge 9 commits intoNORDUnet:masterfrom
bergroth:optical-node-map-updates

Conversation

@bergroth
Copy link
Copy Markdown
Contributor

Optical Node Map Enhancements

This PR enhances the optical node map visualization with improved markers, interactive optical path selection, and direct navigation from optical path detail pages.

Map Improvements

  • Smaller, cleaner markers: Reduced marker size for better map visibility
  • Hover tooltips: Node names appear on hover without requiring clicks
  • Double-click navigation: Quick access to node detail pages
  • Optical Links instead of Cables: Updated to show Optical_Link connections between optical nodes (removed TSS type filter to include all optical node types)

Interactive Optical Path Visualization

  • Side panel with path selector: Added 300px panel listing available optical paths when a node is selected
  • Visual path rendering: Color-coded paths drawn on the map with zoom-aware offset calculations to prevent overlapping parallel paths
  • Path toggling: Checkboxes to show/hide individual paths with automatic spacing adjustment
  • Smart path deduplication: Prevents duplicate path entries when switching between nodes along the same path
  • Clickable path names: Path names link directly to their detail pages

Backend & API

  • New endpoint: /gmaps/optical-paths/<node_handle_id>.json for fetching optical paths
  • Graph traversal: DFS algorithm builds ordered node sequences from optical link relationships
  • Filtered results: Returns only "In service" operational paths with proper geo-coordinates

Direct Navigation

  • "Show in Optical Node Map" button: Added to optical path detail pages
  • URL parameter support: Map accepts ?path=<id> for direct path linking
  • Auto-selection: Map automatically finds, selects, displays, and centers on the specified path when navigating from detail pages

- Updated query to find optical nodes via Optical_Link -> Port -> Optical_Node relationship
- Removed TSS type filter to include all optical node types
- Changed label from 'Cable:' to 'Optical Link:' in map tooltips
Enhanced google_maps.html with optical path visualization features: Added 300px side panel for displaying available optical paths, implemented node selection with visual highlighting (blue marker for selected node), added path checkboxes with color-coded indicators for toggling path visibility, implemented zoom-aware path rendering with automatic redraw on zoom changes, added path segment offset calculation to handle overlapping paths, styled path panel with collapsible path items showing name, description, and operational state.

Added new API endpoint in urls.py: Added /gmaps/optical-paths/<node_handle_id>.json endpoint for fetching optical paths.

Implemented backend logic in other.py: Added gmaps_optical_paths() view function to query Neo4j for optical paths, filters paths by operational_state In service and node connectivity, builds ordered node sequences using graph traversal with DFS algorithm, returns JSON with path metadata and geo-coordinates for all nodes in each path, properly handles adjacency graph construction from optical links and multiplex sections.
- Remove hover highlight effects from optical links
- Prevent duplicate optical paths when switching between nodes
- Redraw all paths with correct spacing when deselecting a path
- Make optical path names clickable links to their detail pages
- Use event delegation for checkbox handlers to prevent duplicate event bindings
- Add 'Show in Optical Node Map' button to optical path detail page
- Pass path ID as URL parameter to the map view
- Implement automatic path preloading after map loads
- Search through all optical nodes to find and display the specified path
- Auto-check path in selector and center map on path location
…sit)

- Categorize paths based on selected node position (first/last/middle)
- Add collapsible section headers with path counts
- Transit section collapsed by default
- Update backend query to find all paths through a node (not just endpoints)
- Re-categorize all paths when switching nodes
- Maintain checked state across node switches
- Combine Ingress/Egress into single 'Endpoint' section (first or last node)
- Keep Transit section for middle nodes (collapsed by default)
- Better reflects non-directional nature of optical paths
- Add 'Download KMZ' button to optical path detail page
- Implement optical_path_kmz() view to generate KMZ files
- Query path nodes and build ordered sequence using DFS traversal
- Generate KML with placemarks for each node and LineString for path
- Zip KML into KMZ format for download
- Add URL route /optical-path/<handle_id>/kmz/
- Add xml_escape() to properly escape special characters in KML
- Escape path names, descriptions, and node names to prevent XML parse errors
- Round coordinates to 3 decimal places (~111m precision) for security
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant