Parcourir la source

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

jeremystretch il y a 4 ans
Parent
commit
9dad7e4daf

+ 1 - 0
docs/release-notes/version-3.0.md

@@ -8,6 +8,7 @@
 
 ### 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
 * [#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

+ 7 - 11
netbox/dcim/tables/template_code.py

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

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
netbox/project-static/dist/netbox-dark.css


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
netbox/project-static/dist/netbox-light.css


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
netbox/project-static/dist/netbox-print.css


+ 1 - 1
netbox/project-static/styles/netbox.scss

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

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff