[PR #19549] [CLOSED] #19550 Enhancement: Refactor rack elevations template for lazy loading /dcim/rack-elevations/ #15672

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/19549
Author: @tbotnz
Created: 5/21/2025
Status: Closed

Base: mainHead: add-rack-lazy-loading


📝 Commits (4)

  • 34a0d89 Refactor rack elevation template to use htmx for dynamic loading and improved user experience
  • 17cbd19 rework to prevent dup loading
  • bb20578 Update netbox/templates/dcim/inc/rack_elevation.html
  • 33f7f15 Update netbox/templates/dcim/inc/rack_elevation.html

📊 Changes

1 file changed (+12 additions, -1 deletions)

View changed files

📝 netbox/templates/dcim/inc/rack_elevation.html (+12 -1)

📄 Description

Closes: #19550

The existing rack elevations template does not scale well, for e.g if the user has the pagination set 1000, the rack elevation template will try and make a rack http call for every rack when the page loads (#19550)

this PR does the following

  • introduce lazy loading so that racks are only loaded once they intersect with the viewport
  • spinner added to show while racks are being lazy loaded

🔄 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/19549 **Author:** [@tbotnz](https://github.com/tbotnz) **Created:** 5/21/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `add-rack-lazy-loading` --- ### 📝 Commits (4) - [`34a0d89`](https://github.com/netbox-community/netbox/commit/34a0d89cba35d570f6d248c90ca3fcf58d027442) Refactor rack elevation template to use htmx for dynamic loading and improved user experience - [`17cbd19`](https://github.com/netbox-community/netbox/commit/17cbd1979adfc07c6f841b2a31ff3b7c30b56f56) rework to prevent dup loading - [`bb20578`](https://github.com/netbox-community/netbox/commit/bb20578bd63f3db4bbe9d23680687023636652e3) Update netbox/templates/dcim/inc/rack_elevation.html - [`33f7f15`](https://github.com/netbox-community/netbox/commit/33f7f15e3337ed6c1c047fec199cfe0cbbe605a9) Update netbox/templates/dcim/inc/rack_elevation.html ### 📊 Changes **1 file changed** (+12 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `netbox/templates/dcim/inc/rack_elevation.html` (+12 -1) </details> ### 📄 Description ### Closes: #19550 The existing rack elevations template does not scale well, for e.g if the user has the pagination set 1000, the rack elevation template will try and make a rack http call for every rack when the page loads (#19550) this PR does the following - introduce lazy loading so that racks are only loaded once they intersect with the viewport - spinner added to show while racks are being lazy loaded --- <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-30 00:23:20 +01:00
adam closed this issue 2025-12-30 00:23:20 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15672