mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Added cable connections to component lists
This commit is contained in:
@@ -1,12 +1,18 @@
|
||||
<tr class="consoleserverport{% if csp.connected_endpoint %} {%if csp.connected_endpoint.connection_status %}success{% else %}info{% endif %}{% endif %}">
|
||||
|
||||
{# Checkbox #}
|
||||
{% if perms.dcim.change_consoleserverport or perms.dcim.delete_consoleserverport %}
|
||||
<td class="pk">
|
||||
<input name="pk" type="checkbox" value="{{ csp.pk }}" />
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{# Name #}
|
||||
<td>
|
||||
<i class="fa fa-fw fa-keyboard-o"></i> {{ csp }}
|
||||
</td>
|
||||
|
||||
{# Connection #}
|
||||
{% if csp.connected_endpoint %}
|
||||
<td>
|
||||
<a href="{% url 'dcim:device' pk=csp.connected_endpoint.device.pk %}">{{ csp.connected_endpoint.device }}</a>
|
||||
@@ -19,6 +25,20 @@
|
||||
<span class="text-muted">Not connected</span>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{# Cable #}
|
||||
<td>
|
||||
{% with cable=csp.get_connected_cable %}
|
||||
{% if cable %}
|
||||
<a href="{{ cable.get_absolute_url }}">{{ cable }}</a>
|
||||
{% if cable.far_end != csp.connected_endpoint %}
|
||||
to <a href="{{ cable.far_end.device.get_absolute_url }}">{{ cable.far_end.device }}</a> {{ cable.far_end }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</td>
|
||||
|
||||
{# Actions #}
|
||||
<td class="text-right">
|
||||
{% if perms.dcim.change_consoleserverport %}
|
||||
{% if csp.connected_endpoint %}
|
||||
|
||||
Reference in New Issue
Block a user