mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Merge pull request #3673 from ananace/cable-color-display
3457 Display cable colors in device interface list
This commit is contained in:
@ -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>
|
||||
|
Reference in New Issue
Block a user