Skip to content

Commit 9dad7e4

Browse files
committed
Fixes #7701: Fix conflation of assigned IP status & role in interface tables
1 parent d08ed9f commit 9dad7e4

File tree

6 files changed

+12
-15
lines changed

6 files changed

+12
-15
lines changed

docs/release-notes/version-3.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
### Bug Fixes
1010

11+
* [#7701](https://github.com/netbox-community/netbox/issues/7701) - Fix conflation of assigned IP status & role in interface tables
1112
* [#7752](https://github.com/netbox-community/netbox/issues/7752) - Fix minimum version check under Python v3.10
1213
* [#7766](https://github.com/netbox-community/netbox/issues/7766) - Add missing outer dimension columns to rack table
1314
* [#7780](https://github.com/netbox-community/netbox/issues/7780) - Preserve mutli-line values during CSV file import

netbox/dcim/tables/template_code.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,13 @@
4040

4141
INTERFACE_IPADDRESSES = """
4242
<div class="table-badge-group">
43-
{% for ip in record.ip_addresses.all %}
44-
<a
45-
class="table-badge{% if ip.status != 'active' %} badge bg-{{ ip.get_status_class }}{% elif ip.role %} badge bg-{{ ip.get_role_class }}{% endif %}"
46-
href="{{ ip.get_absolute_url }}"
47-
{% if ip.status != 'active'%}data-bs-toggle="tooltip" data-bs-placement="left" title="{{ ip.get_status_display }}"
48-
{% elif ip.role %}data-bs-toggle="tooltip" data-bs-placement="left" title="{{ ip.get_role_display }}"
49-
{% endif %}
50-
>
51-
{{ ip }}
52-
</a>
53-
{% endfor %}
43+
{% for ip in record.ip_addresses.all %}
44+
{% if ip.status != 'active' %}
45+
<a href="{{ ip.get_absolute_url }}" class="table-badge badge bg-{{ ip.get_status_class }}" data-bs-toggle="tooltip" data-bs-placement="left" title="{{ ip.get_status_display }}">{{ ip }}</a>
46+
{% else %}
47+
<a href="{{ ip.get_absolute_url }}" class="table-badge">{{ ip }}</a>
48+
{% endif %}
49+
{% endfor %}
5450
</div>
5551
"""
5652

netbox/project-static/dist/netbox-dark.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

netbox/project-static/dist/netbox-light.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

netbox/project-static/dist/netbox-print.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

netbox/project-static/styles/netbox.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ table .table-badge-group {
814814
}
815815

816816
&.badge:not(:last-of-type):not(:only-child) {
817-
margin-bottom: map.get($spacers, 2);
817+
margin-bottom: map.get($spacers, 1);
818818
}
819819
}
820820
}

0 commit comments

Comments
 (0)