[PR #5251] [MERGED] #4786: Convert device component templates to tables #12988

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/5251
Author: @jeremystretch
Created: 10/19/2020
Status: Merged
Merged: 10/19/2020
Merged by: @jeremystretch

Base: develop-2.10Head: 4786-device-component-tables


📝 Commits (10+)

  • 769b240 Extend device component tables to include cable peer
  • 35273c7 Add connection column for path endpoints
  • 99352a5 Convert device console ports list to table
  • 60c30b9 Convert device console server ports list to table
  • 3a47e0e Convert device power ports list to table
  • eed2e4a Convert device power outlets list to table
  • 68060cf Convert device front ports list to table
  • e3f98a0 Convert device rear ports list to table
  • 2146c38 Convert device interfaces list to table
  • 7c13166 Convert device device bays list to table

📊 Changes

20 files changed (+575 additions, -1230 deletions)

View changed files

📝 netbox/dcim/tables/devices.py (+283 -19)
📝 netbox/dcim/tables/power.py (+6 -12)
📝 netbox/dcim/tables/template_code.py (+167 -1)
📝 netbox/dcim/views.py (+37 -9)
📝 netbox/project-static/js/interface_toggles.js (+0 -13)
📝 netbox/templates/dcim/device.html (+40 -225)
netbox/templates/dcim/inc/consoleport.html (+0 -77)
netbox/templates/dcim/inc/consoleserverport.html (+0 -79)
netbox/templates/dcim/inc/devicebay.html (+0 -71)
netbox/templates/dcim/inc/frontport.html (+0 -72)
netbox/templates/dcim/inc/interface.html (+0 -200)
netbox/templates/dcim/inc/inventoryitem.html (+0 -40)
netbox/templates/dcim/inc/poweroutlet.html (+0 -93)
netbox/templates/dcim/inc/powerport.html (+0 -82)
netbox/templates/dcim/inc/rearport.html (+0 -69)
netbox/templates/virtualization/inc/vminterface.html (+0 -136)
📝 netbox/templates/virtualization/virtualmachine.html (+1 -29)
📝 netbox/utilities/tables.py (+1 -1)
📝 netbox/virtualization/tables.py (+34 -0)
📝 netbox/virtualization/views.py (+6 -2)

📄 Description

Closes: #4786

  • Create a device view-specific subclass of each component table
  • Ditch the component inclusion templates

Still to do: Enable user configuration of each table (same as what's currently supported in the component list views)


🔄 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/5251 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 10/19/2020 **Status:** ✅ Merged **Merged:** 10/19/2020 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop-2.10` ← **Head:** `4786-device-component-tables` --- ### 📝 Commits (10+) - [`769b240`](https://github.com/netbox-community/netbox/commit/769b240164ab23da501d842fc5443bf734f035f5) Extend device component tables to include cable peer - [`35273c7`](https://github.com/netbox-community/netbox/commit/35273c7bfe3623d00ddfa27f7d74db055088394e) Add connection column for path endpoints - [`99352a5`](https://github.com/netbox-community/netbox/commit/99352a5d30135168d82b34d87ffcb5d50810f515) Convert device console ports list to table - [`60c30b9`](https://github.com/netbox-community/netbox/commit/60c30b92bab6f745d879feee6e031e755f979874) Convert device console server ports list to table - [`3a47e0e`](https://github.com/netbox-community/netbox/commit/3a47e0e2edb68d5ab1f44bfe5449bf5d224bf433) Convert device power ports list to table - [`eed2e4a`](https://github.com/netbox-community/netbox/commit/eed2e4a15bfb5c857e2115ff5a3b72b254be8ce4) Convert device power outlets list to table - [`68060cf`](https://github.com/netbox-community/netbox/commit/68060cf9e93f17fe15476c39ead5bc0fb4fab5b6) Convert device front ports list to table - [`e3f98a0`](https://github.com/netbox-community/netbox/commit/e3f98a011c16e9543f9b5ab3ee62744ceb28c82a) Convert device rear ports list to table - [`2146c38`](https://github.com/netbox-community/netbox/commit/2146c38748b3517a6a515b5953f73daff61c1bf0) Convert device interfaces list to table - [`7c13166`](https://github.com/netbox-community/netbox/commit/7c1316619b210dec63cc3a75877ad235c1cecc75) Convert device device bays list to table ### 📊 Changes **20 files changed** (+575 additions, -1230 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/tables/devices.py` (+283 -19) 📝 `netbox/dcim/tables/power.py` (+6 -12) 📝 `netbox/dcim/tables/template_code.py` (+167 -1) 📝 `netbox/dcim/views.py` (+37 -9) 📝 `netbox/project-static/js/interface_toggles.js` (+0 -13) 📝 `netbox/templates/dcim/device.html` (+40 -225) ➖ `netbox/templates/dcim/inc/consoleport.html` (+0 -77) ➖ `netbox/templates/dcim/inc/consoleserverport.html` (+0 -79) ➖ `netbox/templates/dcim/inc/devicebay.html` (+0 -71) ➖ `netbox/templates/dcim/inc/frontport.html` (+0 -72) ➖ `netbox/templates/dcim/inc/interface.html` (+0 -200) ➖ `netbox/templates/dcim/inc/inventoryitem.html` (+0 -40) ➖ `netbox/templates/dcim/inc/poweroutlet.html` (+0 -93) ➖ `netbox/templates/dcim/inc/powerport.html` (+0 -82) ➖ `netbox/templates/dcim/inc/rearport.html` (+0 -69) ➖ `netbox/templates/virtualization/inc/vminterface.html` (+0 -136) 📝 `netbox/templates/virtualization/virtualmachine.html` (+1 -29) 📝 `netbox/utilities/tables.py` (+1 -1) 📝 `netbox/virtualization/tables.py` (+34 -0) 📝 `netbox/virtualization/views.py` (+6 -2) </details> ### 📄 Description ### Closes: #4786 - Create a device view-specific subclass of each component table - Ditch the component inclusion templates Still to do: Enable user configuration of each table (same as what's currently supported in the component list views) --- <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:45 +01:00
adam closed this issue 2025-12-29 22:24:45 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12988