Просмотр исходного кода

Closes #2758: Add cable trace button to pass-through ports

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

+ 1 - 0
CHANGELOG.md

@@ -2,6 +2,7 @@ v2.5.6 (FUTURE)
 
 ## Enhancements
 
+* [#2758](https://github.com/digitalocean/netbox/issues/2758) - Add cable trace button to pass-through ports
 * [#2839](https://github.com/digitalocean/netbox/issues/2839) - Add "110 punch" type for pass-through ports
 * [#2854](https://github.com/digitalocean/netbox/issues/2854) - Enable bulk editing of pass-through ports
 * [#2866](https://github.com/digitalocean/netbox/issues/2866) - Add cellular interface types (GSM/CDMA/LTE)

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

@@ -27,6 +27,9 @@
     {% if frontport.cable %}
         <td>
             <a href="{{ frontport.cable.get_absolute_url }}">{{ frontport.cable }}</a>
+            <a href="{% url 'dcim:frontport_trace' pk=frontport.pk %}" class="btn btn-primary btn-xs" title="Trace">
+                <i class="fa fa-share-alt" aria-hidden="true"></i>
+            </a>
         </td>
         {% with far_end=frontport.get_cable_peer %}
             <td>

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

@@ -26,6 +26,9 @@
     {% if rearport.cable %}
         <td>
             <a href="{{ rearport.cable.get_absolute_url }}">{{ rearport.cable }}</a>
+            <a href="{% url 'dcim:rearport_trace' pk=rearport.pk %}" class="btn btn-primary btn-xs" title="Trace">
+                <i class="fa fa-share-alt" aria-hidden="true"></i>
+            </a>
         </td>
         {% with far_end=rearport.get_cable_peer %}
             <td>