[PR #4790] [MERGED] #4788: Add individual views for device components #12919

Closed
opened 2025-12-29 22:24:22 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/4790
Author: @jeremystretch
Created: 6/25/2020
Status: Merged
Merged: 6/25/2020
Merged by: @jeremystretch

Base: develop-2.9Head: 4788-component-views


📝 Commits (10+)

  • 68ef517 Introduce template filters for checking dynamic permissions
  • 2f19350 Tweak url_name template filter to work with URLs which need a PK
  • 909ddd6 Extend ObjectView to provide a default get() method
  • ecf40e1 Add/update device component templates
  • b08d9a5 Add individual views for device components
  • 3badfd7 Extend DeviceComponentViewTestCase to include GetObjectViewTestCase
  • 2001cfe Update and simplify device component tables
  • 8695714 Fix device component changelog display
  • 0fcdd63 Linkify components under device view
  • 103a449 Changelog for Locations are not sorted naturally (#4788)

📊 Changes

28 files changed (+1133 additions, -481 deletions)

View changed files

📝 docs/release-notes/version-2.9.md (+1 -0)
📝 netbox/dcim/models/device_components.py (+11 -5)
📝 netbox/dcim/tables.py (+51 -187)
📝 netbox/dcim/tests/test_views.py (+11 -5)
📝 netbox/dcim/urls.py (+24 -10)
📝 netbox/dcim/views.py (+53 -27)
📝 netbox/extras/views.py (+1 -0)
netbox/templates/dcim/consoleport.html (+103 -0)
netbox/templates/dcim/consoleserverport.html (+103 -0)
netbox/templates/dcim/device_component.html (+41 -0)
netbox/templates/dcim/devicebay.html (+70 -0)
netbox/templates/dcim/frontport.html (+91 -0)
📝 netbox/templates/dcim/inc/consoleport.html (+2 -1)
📝 netbox/templates/dcim/inc/consoleserverport.html (+2 -1)
📝 netbox/templates/dcim/inc/devicebay.html (+2 -1)
📝 netbox/templates/dcim/inc/frontport.html (+2 -1)
📝 netbox/templates/dcim/inc/poweroutlet.html (+2 -1)
📝 netbox/templates/dcim/inc/powerport.html (+2 -1)
📝 netbox/templates/dcim/inc/rearport.html (+2 -1)
📝 netbox/templates/dcim/interface.html (+200 -227)

...and 8 more files

📄 Description

Closes #4788

  • Establish individual views for all device components (console ports, power ports, etc.) (interfaces already have individual views)
  • Add the necessary template for each view, based on dcim/device_component.html
  • Remove redundant tables; each component model now utilizes a single table class for all functions

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/4790 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 6/25/2020 **Status:** ✅ Merged **Merged:** 6/25/2020 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop-2.9` ← **Head:** `4788-component-views` --- ### 📝 Commits (10+) - [`68ef517`](https://github.com/netbox-community/netbox/commit/68ef5177f0519d1bb889a51974fdd5f075c8b0f0) Introduce template filters for checking dynamic permissions - [`2f19350`](https://github.com/netbox-community/netbox/commit/2f19350ff57a3d538a6ca4477d2084303e05d734) Tweak url_name template filter to work with URLs which need a PK - [`909ddd6`](https://github.com/netbox-community/netbox/commit/909ddd653c3072c2fcad8bb27115015ee15a8dc4) Extend ObjectView to provide a default get() method - [`ecf40e1`](https://github.com/netbox-community/netbox/commit/ecf40e1525c07ca029d4a5ff8d4c251707d7cccd) Add/update device component templates - [`b08d9a5`](https://github.com/netbox-community/netbox/commit/b08d9a5a8e06bb1c2051991923c6d62495f66fc4) Add individual views for device components - [`3badfd7`](https://github.com/netbox-community/netbox/commit/3badfd756c597a1a1f59609ae25a3efe9d6c88fd) Extend DeviceComponentViewTestCase to include GetObjectViewTestCase - [`2001cfe`](https://github.com/netbox-community/netbox/commit/2001cfe864e0b80e13ac9ac666f82182c7077a05) Update and simplify device component tables - [`8695714`](https://github.com/netbox-community/netbox/commit/8695714c657a802b16a08d6783b3ce508e5e5698) Fix device component changelog display - [`0fcdd63`](https://github.com/netbox-community/netbox/commit/0fcdd639417d606f8127ce71425a4eb93983917d) Linkify components under device view - [`103a449`](https://github.com/netbox-community/netbox/commit/103a44991aed8246e2792d8f54da1f0725bba0e3) Changelog for #4788 ### 📊 Changes **28 files changed** (+1133 additions, -481 deletions) <details> <summary>View changed files</summary> 📝 `docs/release-notes/version-2.9.md` (+1 -0) 📝 `netbox/dcim/models/device_components.py` (+11 -5) 📝 `netbox/dcim/tables.py` (+51 -187) 📝 `netbox/dcim/tests/test_views.py` (+11 -5) 📝 `netbox/dcim/urls.py` (+24 -10) 📝 `netbox/dcim/views.py` (+53 -27) 📝 `netbox/extras/views.py` (+1 -0) ➕ `netbox/templates/dcim/consoleport.html` (+103 -0) ➕ `netbox/templates/dcim/consoleserverport.html` (+103 -0) ➕ `netbox/templates/dcim/device_component.html` (+41 -0) ➕ `netbox/templates/dcim/devicebay.html` (+70 -0) ➕ `netbox/templates/dcim/frontport.html` (+91 -0) 📝 `netbox/templates/dcim/inc/consoleport.html` (+2 -1) 📝 `netbox/templates/dcim/inc/consoleserverport.html` (+2 -1) 📝 `netbox/templates/dcim/inc/devicebay.html` (+2 -1) 📝 `netbox/templates/dcim/inc/frontport.html` (+2 -1) 📝 `netbox/templates/dcim/inc/poweroutlet.html` (+2 -1) 📝 `netbox/templates/dcim/inc/powerport.html` (+2 -1) 📝 `netbox/templates/dcim/inc/rearport.html` (+2 -1) 📝 `netbox/templates/dcim/interface.html` (+200 -227) _...and 8 more files_ </details> ### 📄 Description ### Closes #4788 - Establish individual views for all device components (console ports, power ports, etc.) (interfaces already have individual views) - Add the necessary template for each view, based on `dcim/device_component.html` - Remove redundant tables; each component model now utilizes a single table class for all functions --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:24:22 +01:00
adam closed this issue 2025-12-29 22:24:22 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12919