3457 Display cable colors in device interface list
@@ -457,6 +457,14 @@ table.report th a {
width: 80px;
border: 1px solid grey;
}
+.inline-color-block {
+ display: inline-block;
+ width: 1.5em;
+ height: 1.5em;
+ border: 1px solid grey;
+ border-radius: .25em;
+ vertical-align: middle;
+}
.text-nowrap {
white-space: nowrap;
@@ -48,6 +48,9 @@
<td class="text-nowrap">
{% if iface.cable %}
<a href="{{ iface.cable.get_absolute_url }}">{{ iface.cable }}</a>
+ {% if iface.cable.color %}
+ <span class="inline-color-block" style="background-color: #{{ iface.cable.color }}"> </span>
+ {% endif %}
<a href="{% url 'dcim:interface_trace' pk=iface.pk %}" class="btn btn-primary btn-xs" title="Trace">
<i class="fa fa-share-alt" aria-hidden="true"></i>
</a>