[PR #11518] [MERGED] Closes #8184: Enable HTMX for embedded tables #13804

Closed
opened 2025-12-29 23:20:54 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/11518
Author: @jeremystretch
Created: 1/16/2023
Status: Merged
Merged: 1/16/2023
Merged by: @jeremystretch

Base: featureHead: 8184-htmx-tables


📝 Commits (8)

  • 807753a Enable HTMX rendering for embedded tables
  • c2b43e2 Start converting embedded tables to use HTMX (WIP)
  • 30578bf Additional table conversions (WIP)
  • 212356f Standardize HTMX usage for nested group models
  • 757a27d Enable HTMX for additional emebedded tables
  • 459997e Fix HTMX table rendering for ObjectChildrenView
  • 4d329a7 Standardize usage of inc/panel_table.html
  • 67f70c7 Hide selection boxes in embedded tables

📊 Changes

65 files changed (+385 additions, -671 deletions)

View changed files

📝 netbox/circuits/views.py (+0 -38)
📝 netbox/dcim/views.py (+9 -136)
📝 netbox/ipam/views.py (+2 -58)
📝 netbox/netbox/tables/tables.py (+16 -1)
📝 netbox/netbox/views/generic/bulk_views.py (+6 -1)
📝 netbox/templates/circuits/circuittype.html (+5 -5)
📝 netbox/templates/circuits/provider.html (+5 -5)
📝 netbox/templates/circuits/providernetwork.html (+4 -4)
📝 netbox/templates/dcim/connections_list.html (+1 -1)
📝 netbox/templates/dcim/device/consoleports.html (+1 -1)
📝 netbox/templates/dcim/device/consoleserverports.html (+1 -1)
📝 netbox/templates/dcim/device/devicebays.html (+1 -1)
📝 netbox/templates/dcim/device/frontports.html (+1 -1)
📝 netbox/templates/dcim/device/interfaces.html (+1 -1)
📝 netbox/templates/dcim/device/inventory.html (+1 -1)
📝 netbox/templates/dcim/device/modulebays.html (+1 -1)
📝 netbox/templates/dcim/device/poweroutlets.html (+1 -1)
📝 netbox/templates/dcim/device/powerports.html (+1 -1)
📝 netbox/templates/dcim/device/rearports.html (+1 -1)
📝 netbox/templates/dcim/devicerole.html (+6 -6)

...and 45 more files

📄 Description

Closes: #8184

  • Introduce the is_embedded() utility function for determining whether an HTMX request originates from the same view
  • Add the htmx_url property to NetBoxTable
  • Replace static table embeds using render_table with lazy-loaded HTMX includes
  • Remove now-unneeded logic from object detail 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/11518 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 1/16/2023 **Status:** ✅ Merged **Merged:** 1/16/2023 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `8184-htmx-tables` --- ### 📝 Commits (8) - [`807753a`](https://github.com/netbox-community/netbox/commit/807753aa35a1de55650323a60371ceb16414bf7a) Enable HTMX rendering for embedded tables - [`c2b43e2`](https://github.com/netbox-community/netbox/commit/c2b43e27726e46ab144fef7a355967c2b1307adf) Start converting embedded tables to use HTMX (WIP) - [`30578bf`](https://github.com/netbox-community/netbox/commit/30578bfc9793225586e23af1e6f9a62406f145ca) Additional table conversions (WIP) - [`212356f`](https://github.com/netbox-community/netbox/commit/212356fc02e6de8608a0b29fb4af131708a9eda2) Standardize HTMX usage for nested group models - [`757a27d`](https://github.com/netbox-community/netbox/commit/757a27d90ab2c87bfc35f0ba282e569e758ee6ea) Enable HTMX for additional emebedded tables - [`459997e`](https://github.com/netbox-community/netbox/commit/459997ec5c5f965ec5fd46724f540bff4b81dc51) Fix HTMX table rendering for ObjectChildrenView - [`4d329a7`](https://github.com/netbox-community/netbox/commit/4d329a7c9b5ce02dfb28f737d24dc79b24c0b8ab) Standardize usage of inc/panel_table.html - [`67f70c7`](https://github.com/netbox-community/netbox/commit/67f70c7654d2ec960b8ef669cad997106d3deeaf) Hide selection boxes in embedded tables ### 📊 Changes **65 files changed** (+385 additions, -671 deletions) <details> <summary>View changed files</summary> 📝 `netbox/circuits/views.py` (+0 -38) 📝 `netbox/dcim/views.py` (+9 -136) 📝 `netbox/ipam/views.py` (+2 -58) 📝 `netbox/netbox/tables/tables.py` (+16 -1) 📝 `netbox/netbox/views/generic/bulk_views.py` (+6 -1) 📝 `netbox/templates/circuits/circuittype.html` (+5 -5) 📝 `netbox/templates/circuits/provider.html` (+5 -5) 📝 `netbox/templates/circuits/providernetwork.html` (+4 -4) 📝 `netbox/templates/dcim/connections_list.html` (+1 -1) 📝 `netbox/templates/dcim/device/consoleports.html` (+1 -1) 📝 `netbox/templates/dcim/device/consoleserverports.html` (+1 -1) 📝 `netbox/templates/dcim/device/devicebays.html` (+1 -1) 📝 `netbox/templates/dcim/device/frontports.html` (+1 -1) 📝 `netbox/templates/dcim/device/interfaces.html` (+1 -1) 📝 `netbox/templates/dcim/device/inventory.html` (+1 -1) 📝 `netbox/templates/dcim/device/modulebays.html` (+1 -1) 📝 `netbox/templates/dcim/device/poweroutlets.html` (+1 -1) 📝 `netbox/templates/dcim/device/powerports.html` (+1 -1) 📝 `netbox/templates/dcim/device/rearports.html` (+1 -1) 📝 `netbox/templates/dcim/devicerole.html` (+6 -6) _...and 45 more files_ </details> ### 📄 Description ### Closes: #8184 - Introduce the `is_embedded()` utility function for determining whether an HTMX request originates from the same view - Add the `htmx_url` property to NetBoxTable - Replace static table embeds using `render_table` with lazy-loaded HTMX includes - Remove now-unneeded logic from object detail 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 23:20:54 +01:00
adam closed this issue 2025-12-29 23:20:54 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13804