mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Introduced CableTermination abstract model to ptovide Cable access from termination points
This commit is contained in:
@@ -706,6 +706,7 @@
|
||||
<th>Type</th>
|
||||
<th>Rear Port</th>
|
||||
<th>Position</th>
|
||||
<th>Connected Cable</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -758,6 +759,7 @@
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Positions</th>
|
||||
<th>Connected Cable</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@@ -10,6 +10,15 @@
|
||||
<td>{{ frontport.get_type_display }}</td>
|
||||
<td>{{ frontport.rear_port }}</td>
|
||||
<td>{{ frontport.rear_port_position }}</td>
|
||||
{% with cable=frontport.get_connected_cable %}
|
||||
<td>
|
||||
{% if cable %}
|
||||
<a href="#">{{ cable }}</a> to <a href="{{ cable.far_end.device.get_absolute_url }}">{{ cable.far_end.device }}</a> <a href="{{ cable.far_end.get_absolute_url }}">{{ cable.far_end }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">Not connected</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endwith %}
|
||||
<td class="text-right">
|
||||
{% if perms.dcim.change_frontport %}
|
||||
<a href="{% url 'dcim:frontport_edit' pk=frontport.pk %}?return_url={{ device.get_absolute_url }}" title="Edit port" class="btn btn-info btn-xs">
|
||||
|
@@ -9,6 +9,15 @@
|
||||
</td>
|
||||
<td>{{ rearport.get_type_display }}</td>
|
||||
<td>{{ rearport.positions }}</td>
|
||||
{% with cable=rearport.get_connected_cable %}
|
||||
<td>
|
||||
{% if cable %}
|
||||
<a href="#">{{ cable }}</a> to <a href="{{ cable.far_end.device.get_absolute_url }}">{{ cable.far_end.device }}</a> <a href="{{ cable.far_end.get_absolute_url }}">{{ cable.far_end }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">Not connected</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endwith %}
|
||||
<td class="text-right">
|
||||
{% if perms.dcim.change_rearport %}
|
||||
<a href="{% url 'dcim:rearport_edit' pk=rearport.pk %}?return_url={{ device.get_absolute_url }}" title="Edit port" class="btn btn-info btn-xs">
|
||||
|
Reference in New Issue
Block a user