[PR #1598] [MERGED] Avoid creating repeated graph nodes where device matches multiple regexps #12233

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/1598
Author: @candlerb
Created: 10/16/2017
Status: Merged
Merged: 10/16/2017
Merged by: @jeremystretch

Base: developHead: candlerb/1498


📝 Commits (1)

  • 5fc3eac Avoid creating repeated graph nodes where device matches multiple regexps

📊 Changes

1 file changed (+4 additions, -0 deletions)

View changed files

📝 netbox/extras/models.py (+4 -0)

📄 Description

Fixes: #1498

When generating graphviz output, don't output a node which has been output previously.

In fact, if graphviz sees a node with the same name more than once, it will be counted as the same node, so it will only appear once on the graph anyway. But it will appear in an unexpected place if it matches more than one regexp in the same topology map; this change makes it appear in the first row where it matches.


🔄 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/1598 **Author:** [@candlerb](https://github.com/candlerb) **Created:** 10/16/2017 **Status:** ✅ Merged **Merged:** 10/16/2017 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `candlerb/1498` --- ### 📝 Commits (1) - [`5fc3eac`](https://github.com/netbox-community/netbox/commit/5fc3eac0f669fccd0fae89ce84aa862bbcbe9af2) Avoid creating repeated graph nodes where device matches multiple regexps ### 📊 Changes **1 file changed** (+4 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `netbox/extras/models.py` (+4 -0) </details> ### 📄 Description ### Fixes: #1498 When generating graphviz output, don't output a node which has been output previously. In fact, if graphviz sees a node with the same name more than once, it will be counted as the same node, so it will only appear once on the graph anyway. But it will appear in an unexpected place if it matches more than one regexp in the same topology map; this change makes it appear in the first row where it matches. --- <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:20:23 +01:00
adam closed this issue 2025-12-29 22:20:23 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12233