Fixes: #19129 - Richer display of MAC addresses in InterfaceTable when multiple MACs are present#21270
Merged
jeremystretch merged 9 commits intomainfrom Feb 5, 2026
Merged
Conversation
jeremystretch
requested changes
Jan 23, 2026
netbox/dcim/tables/devices.py
Outdated
| ) | ||
| primary_mac_address = tables.Column( | ||
| verbose_name=_('MAC Address'), | ||
| accessor=Accessor('mac_address_display'), |
Member
There was a problem hiding this comment.
This adds significant overhead as currently implemented, triggering a count of MAC addresses for each interface in the table. Why don't we just introduce a non-default column that lists all assigned MAC addresses (perhaps annotating the primary), like we do for IP addresses? That seems much cleaner IMO, and it ensures the MAC addresses are efficiently prefetched.
Contributor
Author
There was a problem hiding this comment.
Agreed, that's a better pattern. Done, also synchronized the vminterface.html MAC Address field HTML with interface.html which was overlooked before.
… tables in list view and detail view
jeremystretch
requested changes
Jan 29, 2026
jeremystretch
approved these changes
Feb 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #19129
On the list view for Interface and VMInterface, the presence of multiple MAC addresses on an interface is now communicated in various ways depending on whether one is assigned:
Note: this same logic is reflected on the interface detail page.