mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-21 19:47:20 -06:00
Merge pull request #3673 from ananace/cable-color-display
3457 Display cable colors in device interface list
This commit is contained in:
commit
053f49c76a
@ -457,6 +457,14 @@ table.report th a {
|
|||||||
width: 80px;
|
width: 80px;
|
||||||
border: 1px solid grey;
|
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 {
|
.text-nowrap {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,9 @@
|
|||||||
<td class="text-nowrap">
|
<td class="text-nowrap">
|
||||||
{% if iface.cable %}
|
{% if iface.cable %}
|
||||||
<a href="{{ iface.cable.get_absolute_url }}">{{ iface.cable }}</a>
|
<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">
|
<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>
|
<i class="fa fa-share-alt" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
|
Loading…
Reference in New Issue
Block a user