[PR #6755] [MERGED] Closes #6000: SVG rendering for cable tracing #13165

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/6755
Author: @jeremystretch
Created: 7/14/2021
Status: Merged
Merged: 7/16/2021
Merged by: @jeremystretch

Base: featureHead: 6000-cable-trace-svg


📝 Commits (6)

  • ce7fa95 Initial work on SVG support for cable tracing
  • 9f615cd Replace CSS-based cable trace diagrams with SVG images
  • 8b57191 Add SVG trace support for ProviderNetwork attachments
  • 8966212 Clean up SVG image styling
  • c5178fd Extend foreground_color() utility to support custom dark/light colors
  • 145be09 Merge branch 'feature' into 6000-cable-trace-svg

📊 Changes

17 files changed (+620 additions, -368 deletions)

View changed files

📝 netbox/dcim/api/views.py (+8 -4)
netbox/dcim/elevations.py (+0 -233)
📝 netbox/dcim/models/device_components.py (+5 -0)
📝 netbox/dcim/models/racks.py (+1 -1)
netbox/dcim/svg.py (+506 -0)
📝 netbox/dcim/views.py (+8 -4)
📝 netbox/project-static/bundle.js (+1 -0)
netbox/project-static/dist/cable_trace.css (+2 -0)
netbox/project-static/dist/cable_trace.css.map (+1 -0)
📝 netbox/project-static/dist/netbox-dark.css (+1 -1)
📝 netbox/project-static/dist/netbox-dark.css.map (+1 -1)
📝 netbox/project-static/dist/netbox-light.css (+1 -1)
📝 netbox/project-static/dist/netbox-light.css.map (+1 -1)
netbox/project-static/styles/_cable_trace.scss (+39 -0)
📝 netbox/project-static/styles/netbox.scss (+0 -41)
📝 netbox/templates/dcim/cable_trace.html (+38 -77)
📝 netbox/utilities/utils.py (+7 -4)

📄 Description

Closes: #6000

  • Introduces the new CableTraceSVG class for SVG image rendering (similar to RackElevationSVG)
  • Extends the "trace" REST API endpoints to support SVG rendering with ?render=svg
  • Replaces the HTML and CSS rendering with an embedded SVG image within the "trace" view"

🔄 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/6755 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 7/14/2021 **Status:** ✅ Merged **Merged:** 7/16/2021 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `6000-cable-trace-svg` --- ### 📝 Commits (6) - [`ce7fa95`](https://github.com/netbox-community/netbox/commit/ce7fa95546758f1629eaf6144ad0a740fe0020cb) Initial work on SVG support for cable tracing - [`9f615cd`](https://github.com/netbox-community/netbox/commit/9f615cde798e72120172d32354c601efc48823a0) Replace CSS-based cable trace diagrams with SVG images - [`8b57191`](https://github.com/netbox-community/netbox/commit/8b571912cf51459cb5a43d47da39f9213ccd0d72) Add SVG trace support for ProviderNetwork attachments - [`8966212`](https://github.com/netbox-community/netbox/commit/89662124e570325c1993f666d63095915bbe52b2) Clean up SVG image styling - [`c5178fd`](https://github.com/netbox-community/netbox/commit/c5178fd90ea5e5f86a34c91b5a0ef55980753d79) Extend foreground_color() utility to support custom dark/light colors - [`145be09`](https://github.com/netbox-community/netbox/commit/145be09cfd1aad3e8dd6b5c54d819af47dbc3851) Merge branch 'feature' into 6000-cable-trace-svg ### 📊 Changes **17 files changed** (+620 additions, -368 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/api/views.py` (+8 -4) ➖ `netbox/dcim/elevations.py` (+0 -233) 📝 `netbox/dcim/models/device_components.py` (+5 -0) 📝 `netbox/dcim/models/racks.py` (+1 -1) ➕ `netbox/dcim/svg.py` (+506 -0) 📝 `netbox/dcim/views.py` (+8 -4) 📝 `netbox/project-static/bundle.js` (+1 -0) ➕ `netbox/project-static/dist/cable_trace.css` (+2 -0) ➕ `netbox/project-static/dist/cable_trace.css.map` (+1 -0) 📝 `netbox/project-static/dist/netbox-dark.css` (+1 -1) 📝 `netbox/project-static/dist/netbox-dark.css.map` (+1 -1) 📝 `netbox/project-static/dist/netbox-light.css` (+1 -1) 📝 `netbox/project-static/dist/netbox-light.css.map` (+1 -1) ➕ `netbox/project-static/styles/_cable_trace.scss` (+39 -0) 📝 `netbox/project-static/styles/netbox.scss` (+0 -41) 📝 `netbox/templates/dcim/cable_trace.html` (+38 -77) 📝 `netbox/utilities/utils.py` (+7 -4) </details> ### 📄 Description ### Closes: #6000 - Introduces the new CableTraceSVG class for SVG image rendering (similar to RackElevationSVG) - Extends the "trace" REST API endpoints to support SVG rendering with `?render=svg` - Replaces the HTML and CSS rendering with an embedded SVG image within the "trace" view" --- <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:45 +01:00
adam closed this issue 2025-12-29 22:25:45 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13165