Explorar el Código

Fixes #6974: Show contextual label for IP address role

jeremystretch hace 4 años
padre
commit
1fc3c6d9d2
Se han modificado 2 ficheros con 2 adiciones y 1 borrados
  1. 1 0
      docs/release-notes/version-2.11.md
  2. 1 1
      netbox/templates/ipam/ipaddress.html

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

@@ -13,6 +13,7 @@
 
 * [#5968](https://github.com/netbox-community/netbox/issues/5968) - Model forms should save empty custom field values as null
 * [#6686](https://github.com/netbox-community/netbox/issues/6686) - Force assignment of null custom field values to objects
+* [#6974](https://github.com/netbox-community/netbox/issues/6974) - Show contextual label for IP address role
 
 ---
 

+ 1 - 1
netbox/templates/ipam/ipaddress.html

@@ -56,7 +56,7 @@
                     <td>Role</td>
                     <td>
                         {% if object.role %}
-                            <a href="{% url 'ipam:ipaddress_list' %}?role={{ object.role }}">{{ object.get_role_display }}</a>
+                            <a href="{% url 'ipam:ipaddress_list' %}?role={{ object.role }}" class="label label-{{ object.get_role_class }}">{{ object.get_role_display }}</a>
                         {% else %}
                             <span class="text-muted">None</span>
                         {% endif %}