Fixes #7701: Fix conflation of assigned IP status & role in interface tables

This commit is contained in:
jeremystretch 2021-11-09 16:04:16 -05:00
parent d08ed9fe5f
commit 9dad7e4daf
6 changed files with 9 additions and 12 deletions

View File

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

View File

@ -41,15 +41,11 @@ DEVICEBAY_STATUS = """
INTERFACE_IPADDRESSES = """ INTERFACE_IPADDRESSES = """
<div class="table-badge-group"> <div class="table-badge-group">
{% for ip in record.ip_addresses.all %} {% for ip in record.ip_addresses.all %}
<a {% if ip.status != 'active' %}
class="table-badge{% if ip.status != 'active' %} badge bg-{{ ip.get_status_class }}{% elif ip.role %} badge bg-{{ ip.get_role_class }}{% endif %}" <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>
href="{{ ip.get_absolute_url }}" {% else %}
{% if ip.status != 'active'%}data-bs-toggle="tooltip" data-bs-placement="left" title="{{ ip.get_status_display }}" <a href="{{ ip.get_absolute_url }}" class="table-badge">{{ ip }}</a>
{% elif ip.role %}data-bs-toggle="tooltip" data-bs-placement="left" title="{{ ip.get_role_display }}"
{% endif %} {% endif %}
>
{{ ip }}
</a>
{% endfor %} {% endfor %}
</div> </div>
""" """

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -814,7 +814,7 @@ table .table-badge-group {
} }
&.badge:not(:last-of-type):not(:only-child) { &.badge:not(:last-of-type):not(:only-child) {
margin-bottom: map.get($spacers, 2); margin-bottom: map.get($spacers, 1);
} }
} }
} }