[PR #4215] [MERGED] Closes #1529: Rack elevation images #12792

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/4215
Author: @jeremystretch
Created: 2/20/2020
Status: Merged
Merged: 2/20/2020
Merged by: @jeremystretch

Base: developHead: 1529-rack-elevation-images


📝 Commits (6)

  • e07ed3d Ignore media files
  • d2157a3 Add front/rear images for device types; include in rack elevations
  • adf9221 Refactor rack elevation mixin to RackElevationSVG
  • ba6562a Add ability to toggle the inclusion of device images when rendering a rack elevation SVG
  • c78d30d Enable toggling of device images on elevations list
  • e8a8b39 Tweak gitignore to include devicetype-images directory

📊 Changes

14 files changed (+351 additions, -195 deletions)

View changed files

📝 netbox/dcim/api/serializers.py (+7 -0)
📝 netbox/dcim/api/views.py (+7 -1)
netbox/dcim/elevations.py (+192 -0)
📝 netbox/dcim/forms.py (+2 -2)
netbox/dcim/migrations/0098_devicetype_images.py (+23 -0)
📝 netbox/dcim/models/__init__.py (+57 -177)
netbox/media/devicetype-images/.gitignore (+2 -0)
📝 netbox/project-static/css/rack_elevation.css (+3 -1)
netbox/project-static/js/rack_elevations.js (+16 -0)
📝 netbox/templates/dcim/devicetype.html (+24 -0)
📝 netbox/templates/dcim/devicetype_edit.html (+7 -0)
📝 netbox/templates/dcim/inc/rack_elevation.html (+1 -4)
📝 netbox/templates/dcim/rack.html (+5 -5)
📝 netbox/templates/dcim/rack_elevation_list.html (+5 -5)

📄 Description

Fixes: #1529

  • Adds two new fields on the DeviceType model: front_image and rear_image
  • Embed front/rear device images in SVG rack elevations (for device types that have them)
  • Add a button to toggle the inclusion of device images when viewing elevations in the UI

🔄 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/4215 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 2/20/2020 **Status:** ✅ Merged **Merged:** 2/20/2020 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `1529-rack-elevation-images` --- ### 📝 Commits (6) - [`e07ed3d`](https://github.com/netbox-community/netbox/commit/e07ed3de93509bb3e852a6e34d7552d9a912cb44) Ignore media files - [`d2157a3`](https://github.com/netbox-community/netbox/commit/d2157a3423f9a620610b778b08bf1d5ecadf5a38) Add front/rear images for device types; include in rack elevations - [`adf9221`](https://github.com/netbox-community/netbox/commit/adf9221bab484154e9160715617550127fe4c23d) Refactor rack elevation mixin to RackElevationSVG - [`ba6562a`](https://github.com/netbox-community/netbox/commit/ba6562a5dbe1caeeb609ad63dfbbad6467f014db) Add ability to toggle the inclusion of device images when rendering a rack elevation SVG - [`c78d30d`](https://github.com/netbox-community/netbox/commit/c78d30d47e9158022332dab33ef100ed117537b8) Enable toggling of device images on elevations list - [`e8a8b39`](https://github.com/netbox-community/netbox/commit/e8a8b39c47da7bf02c9c04fc1743fa74dd16a12f) Tweak gitignore to include devicetype-images directory ### 📊 Changes **14 files changed** (+351 additions, -195 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/api/serializers.py` (+7 -0) 📝 `netbox/dcim/api/views.py` (+7 -1) ➕ `netbox/dcim/elevations.py` (+192 -0) 📝 `netbox/dcim/forms.py` (+2 -2) ➕ `netbox/dcim/migrations/0098_devicetype_images.py` (+23 -0) 📝 `netbox/dcim/models/__init__.py` (+57 -177) ➕ `netbox/media/devicetype-images/.gitignore` (+2 -0) 📝 `netbox/project-static/css/rack_elevation.css` (+3 -1) ➕ `netbox/project-static/js/rack_elevations.js` (+16 -0) 📝 `netbox/templates/dcim/devicetype.html` (+24 -0) 📝 `netbox/templates/dcim/devicetype_edit.html` (+7 -0) 📝 `netbox/templates/dcim/inc/rack_elevation.html` (+1 -4) 📝 `netbox/templates/dcim/rack.html` (+5 -5) 📝 `netbox/templates/dcim/rack_elevation_list.html` (+5 -5) </details> ### 📄 Description ### Fixes: #1529 - Adds two new fields on the DeviceType model: `front_image` and `rear_image` - Embed front/rear device images in SVG rack elevations (for device types that have them) - Add a button to toggle the inclusion of device images when viewing elevations in the UI --- <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:23:38 +01:00
adam closed this issue 2025-12-29 22:23:39 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12792