[PR #19936] [MERGED] Fixes #19916: restore Rack device representation behavior #15761

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/19936
Author: @jnovinger
Created: 7/23/2025
Status: Merged
Merged: 7/23/2025
Merged by: @jeremystretch

Base: mainHead: 19916-rack-options-selector-broken


📝 Commits (1)

  • f6d7dd1 Fixes #19916: restore Rack device representation behavior

📊 Changes

4 files changed (+7 additions, -7 deletions)

View changed files

📝 netbox/project-static/dist/netbox.js (+1 -1)
📝 netbox/project-static/dist/netbox.js.map (+3 -3)
📝 netbox/project-static/src/racks.ts (+2 -2)
📝 netbox/templates/dcim/inc/rack_elevation.html (+1 -1)

📄 Description

Fixes: #19916

The select list of 'Images and Label', 'Images Only', and 'Label Only' was broken during recent work while implementing #19823.

This fixes the issue by placing the rack_elevation class attribute on the <div> element that contains the SVG after being loaded by HTMX. In addition, we needed to slightly modify the selectors in the frontend code that looked for the elements within the SVG to hide and/or show. Previously, it was looking inside of a contentDocument embedded in an

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/19936 **Author:** [@jnovinger](https://github.com/jnovinger) **Created:** 7/23/2025 **Status:** ✅ Merged **Merged:** 7/23/2025 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `main` ← **Head:** `19916-rack-options-selector-broken` --- ### 📝 Commits (1) - [`f6d7dd1`](https://github.com/netbox-community/netbox/commit/f6d7dd1ddb369dd68b894ef443fbec0f645eb56f) Fixes #19916: restore Rack device representation behavior ### 📊 Changes **4 files changed** (+7 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `netbox/project-static/dist/netbox.js` (+1 -1) 📝 `netbox/project-static/dist/netbox.js.map` (+3 -3) 📝 `netbox/project-static/src/racks.ts` (+2 -2) 📝 `netbox/templates/dcim/inc/rack_elevation.html` (+1 -1) </details> ### 📄 Description ### Fixes: #19916 The select list of 'Images and Label', 'Images Only', and 'Label Only' was broken during recent work while implementing #19823. This fixes the issue by placing the `rack_elevation` class attribute on the `<div>` element that contains the SVG after being loaded by HTMX. In addition, we needed to slightly modify the selectors in the frontend code that looked for the elements within the SVG to hide and/or show. Previously, it was looking inside of a contentDocument embedded in an <object> element. The simplified version just looks inside of the SVG containing div. <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be approved and assigned prior to opening a pull request. This helps avoid waste time and effort on a proposed change that we might not be able to accept. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ISSUE WHICH HAS BEEN ASSIGNED TO YOU, IT WILL BE CLOSED AUTOMATICALLY. Please specify your assigned issue number on the line below. --> <!-- Please include a summary of the proposed changes below. --> --- <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:54 +01:00
adam closed this issue 2025-12-30 00:23: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#15761