Skip to content

Conversation

Kani999
Copy link

@Kani999 Kani999 commented Aug 27, 2025

Summary

This merge request improves the BGP session display functionality on device detail pages by addressing several usability and performance issues.

Changes Made

🔧 Performance Improvements:

  • Originally the large table would be displayed as a whole, now it can be paged
  • Replaced manual table rendering with htmx_table for better performance and built-in pagination

🎨 UI/UX Improvements:

  • Originally columns would overflow the table, now it takes table configuration from the list view
  • Consistent table styling and column configuration across all BGP session views

⚙️ New Configuration Options:

  • Originally there was no option to display BGP sessions under a Device View Tab, now it is configurable
  • Added new tab display mode to device_ext_page configuration option
  • Users can now choose between: left, right, full_width, or tab display modes

Technical Details

  • New Tab View: Implemented DeviceBGPSessionTabView using ObjectChildrenView with conditional registration
  • Template Optimization: Simplified template extension by removing manual table creation and extra context dependencies
  • Configuration Enhancement: Enhanced documentation with detailed explanations of all display modes

Configuration Example

PLUGINS_CONFIG = {
    'netbox_bgp': {
        'device_ext_page': 'tab',  # New option: displays BGP sessions in a dedicated tab
    }
}

Files Modified

  • template_content.py - Added tab view and improved template handling
  • device_extend.html - Replaced manual table with htmx_table
  • README.md - Updated documentation with detailed display mode explanations

Backward Compatibility

✅ All existing display modes (left, right, full_width) continue to work as before
✅ Default behavior remains unchanged (defaults to right)

…dling

- Add new 'tab' option to device_ext_page configuration for dedicated BGP sessions tab
- Implement DeviceBGPSessionTabView with conditional registration based on config
- Replace manual table creation with htmx_table for better performance and filtering
- Remove extra_context dependency from template extension for cleaner implementation
- Update README with detailed documentation of all display modes (left/right/full_width/tab)
- Improve code formatting and consistency
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