[PR #6960] [MERGED] Display device names in front of device front/rear images #13194

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/6960
Author: @candlerb
Created: 8/14/2021
Status: Merged
Merged: 10/7/2021
Merged by: @jeremystretch

Base: developHead: candlerb/6879-v3


📝 Commits (1)

  • eb9f2b3 Display device names in front of device front/rear images

📊 Changes

7 files changed (+85 additions, -74 deletions)

View changed files

📝 netbox/dcim/svg.py (+6 -0)
📝 netbox/project-static/dist/netbox.js (+7 -7)
📝 netbox/project-static/dist/netbox.js.map (+1 -1)
📝 netbox/project-static/src/racks.ts (+55 -57)
📝 netbox/project-static/src/stores/rackImages.ts (+4 -2)
📝 netbox/templates/dcim/rack.html (+5 -4)
📝 netbox/templates/dcim/rack_elevation_list.html (+7 -3)

📄 Description

Fixes: #6879 (for Netbox v3)

This replaces the hide images / show images toggle with four options from a select:

image

Images and Labels

image

Images or Labels

image

(This is the same as the current Netbox default)

Images only

image

Labels only

image

(This is the same as the current Netbox setting "hide images")

Notes

I am not a front-end programmer; both the typescript and the bootstrap styles need checking.

The typescript appears to work, but I've been unable to work out what command to run to get the the code type-checked. (yarn bundle:scripts doesn't seem to do much in the way of checking, and accepts pretty gross errors)

EDIT: I found yarn typecheck now, and will work on the errors it raises. Perhaps github CI should run this automatically.

EDIT: typescript validation now passes


🔄 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/6960 **Author:** [@candlerb](https://github.com/candlerb) **Created:** 8/14/2021 **Status:** ✅ Merged **Merged:** 10/7/2021 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `candlerb/6879-v3` --- ### 📝 Commits (1) - [`eb9f2b3`](https://github.com/netbox-community/netbox/commit/eb9f2b36ab740eae2ac33a38814f92ff8c82115d) Display device names in front of device front/rear images ### 📊 Changes **7 files changed** (+85 additions, -74 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/svg.py` (+6 -0) 📝 `netbox/project-static/dist/netbox.js` (+7 -7) 📝 `netbox/project-static/dist/netbox.js.map` (+1 -1) 📝 `netbox/project-static/src/racks.ts` (+55 -57) 📝 `netbox/project-static/src/stores/rackImages.ts` (+4 -2) 📝 `netbox/templates/dcim/rack.html` (+5 -4) 📝 `netbox/templates/dcim/rack_elevation_list.html` (+7 -3) </details> ### 📄 Description ### Fixes: #6879 (for Netbox v3) This replaces the hide images / show images toggle with four options from a select: ![image](https://user-images.githubusercontent.com/44789/129459827-e855fb9a-d4fd-4c97-8a57-ed248984c2bc.png) #### Images and Labels ![image](https://user-images.githubusercontent.com/44789/129459781-ba46b875-374c-49d4-88d8-753c822f1ac5.png) #### Images or Labels ![image](https://user-images.githubusercontent.com/44789/129459791-9564c799-a3b1-4825-82e8-b71dce57df4c.png) (This is the same as the current Netbox default) #### Images only ![image](https://user-images.githubusercontent.com/44789/129459798-6c467e05-73b0-40a9-9bcf-47fafdae6f2a.png) #### Labels only ![image](https://user-images.githubusercontent.com/44789/129459804-b438d6ea-0ee3-4bfe-afee-de97f553b1e9.png) (This is the same as the current Netbox setting "hide images") ### Notes I am not a front-end programmer; both the typescript and the bootstrap styles need checking. The typescript appears to work, but I've been unable to work out what command to run to get the the code type-checked. (`yarn bundle:scripts` doesn't seem to do much in the way of checking, and accepts pretty gross errors) EDIT: I found `yarn typecheck` now, and will work on the errors it raises. Perhaps github CI should run this automatically. EDIT: typescript validation now passes --- <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:25:55 +01:00
adam closed this issue 2025-12-29 22:25:56 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13194