Skip to content

Conversation

@bctiemann
Copy link
Contributor

@bctiemann bctiemann commented Jan 23, 2026

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:

Screenshot 2026-01-22 at 9 58 26 PM
        11:22:33:44:55:66      <-- Single MAC address on interface, assigned as primary
        11:22:33:44:55:66 (2)  <-- Multiple MAC addresses on interface, one assigned as primary
        2 available            <-- 1 or more MAC addresses on interface, none assigned as primary
        -                      <-- No MAC addresses on interface

Note: this same logic is reflected on the interface detail page.

@bctiemann bctiemann requested review from a team and jeremystretch and removed request for a team January 23, 2026 03:01
)
primary_mac_address = tables.Column(
verbose_name=_('MAC Address'),
accessor=Accessor('mac_address_display'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

{% if object.primary_mac_address %}
<span class="font-monospace">{{ object.primary_mac_address|linkify }}</span>
<span class="badge text-bg-primary">{% trans "Primary" %}</span>
{% if object.mac_address_display %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same general note as above. Rather than only showing the primary MAC and hinting whether there are other MACs assigned, let's just display all the MACs and annotate the primary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rework multiple MAC UI representation

3 participants