Jeremy Stretch 7 лет назад
Родитель
Сommit
dc67028bd9

+ 4 - 1
netbox/templates/dcim/inc/consoleport.html

@@ -9,7 +9,10 @@
     <td>
         {% with cable=cp.get_connected_cable %}
             {% if cable %}
-                via <a href="{{ cable.get_absolute_url }}">{{ cable }}</a>
+                Cable <a href="{{ cable.get_absolute_url }}">{{ cable }}</a>
+                {% if cable.far_end != cp.connected_endpoint %}
+                    to <a href="{{ cable.far_end.device.get_absolute_url }}">{{ cable.far_end.device }}</a> {{ cable.far_end }}
+                {% endif %}
             {% endif %}
         {% endwith %}
     </td>

+ 2 - 2
netbox/templates/dcim/inc/interface.html

@@ -33,7 +33,7 @@
         {% with cable=iface.get_connected_cable %}
             {% if cable %}
                 <a href="{{ cable.get_absolute_url }}">{{ cable }}</a>
-                {% if cable.far_end != csp.connected_endpoint %}
+                {% if cable.far_end != iface.connected_endpoint %}
                     to <a href="{{ cable.far_end.device.get_absolute_url }}">{{ cable.far_end.device }}</a> {{ cable.far_end }}
                 {% endif %}
             {% endif %}
@@ -150,7 +150,7 @@
             {% endif %}
 
             {# IP addresses table #}
-            <td colspan="7" style="padding: 0">
+            <td colspan="8" style="padding: 0">
                 <table class="table table-condensed interface-ips">
                     <thead>
                         <tr class="text-muted">

+ 3 - 0
netbox/templates/dcim/inc/poweroutlet.html

@@ -17,6 +17,9 @@
         {% with cable=po.get_connected_cable %}
             {% if cable %}
                 <a href="{{ cable.get_absolute_url }}">{{ cable }}</a>
+                {% if cable.far_end != po.connected_endpoint %}
+                    to <a href="{{ cable.far_end.device.get_absolute_url }}">{{ cable.far_end.device }}</a> {{ cable.far_end }}
+                {% endif %}
             {% endif %}
         {% endwith %}
     </td>

+ 4 - 1
netbox/templates/dcim/inc/powerport.html

@@ -9,7 +9,10 @@
     <td>
         {% with cable=pp.get_connected_cable %}
             {% if cable %}
-                via <a href="{{ cable.get_absolute_url }}">{{ cable }}</a>
+                Cable <a href="{{ cable.get_absolute_url }}">{{ cable }}</a>
+                {% if cable.far_end != pp.connected_endpoint %}
+                    to <a href="{{ cable.far_end.device.get_absolute_url }}">{{ cable.far_end.device }}</a> {{ cable.far_end }}
+                {% endif %}
             {% endif %}
         {% endwith %}
     </td>