1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Standardized console/power/interface display

This commit is contained in:
Jeremy Stretch
2016-07-06 14:40:40 -04:00
parent cc17604220
commit c0ab9f70dc
4 changed files with 41 additions and 23 deletions

View File

@@ -5,27 +5,28 @@
<i class="fa fa-fw fa-comment-o" title="{{ iface.description }}"></i>
{% endif %}
</td>
<td>
<small>{{ iface.mac_address|default:'' }}</small>
</td>
{% if not iface.is_physical %}
<td>Virtual</td>
<td colspan="2">Virtual</td>
{% elif iface.connection %}
{% with iface.get_connected_interface as connected_iface %}
<td>
<a href="{% url 'dcim:device' pk=connected_iface.device.pk %}">{{ connected_iface.device }}</a>
&Colon;
</td>
<td>
<span title="{{ connected_iface.get_form_factor_display }}">{{ connected_iface }}</span>
</td>
{% endwith %}
{% elif iface.circuit %}
<td>
<td colspan="2">
<a href="{% url 'circuits:circuit' pk=iface.circuit.pk %}">{{ iface.circuit }}</a>
</td>
{% else %}
<td>Not connected</td>
{% endif %}
{% if iface.mac_address %}
<td><span class="small text-muted">{{ iface.mac_address }}</span></td>
{% else %}
<td><span class="small text-muted">00:00:00:00:00:00</span></td>
<td colspan="2">
<span class="text-muted">Not connected</span>
</td>
{% endif %}
<td class="text-right">
{% if iface.circuit or iface.connection %}