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

Closes #3277: Add cable trace buttons for console and power ports

Jeremy Stretch 6 лет назад
Родитель
Сommit
cf770bf40c
3 измененных файлов с 7 добавлено и 0 удалено
  1. 1 0
      CHANGELOG.md
  2. 3 0
      netbox/templates/dcim/inc/consoleport.html
  3. 3 0
      netbox/templates/dcim/inc/powerport.html

+ 1 - 0
CHANGELOG.md

@@ -2,6 +2,7 @@ v2.6.1 (FUTURE)
 
 
 ## Enhancements
 ## Enhancements
 
 
+* [#3277](https://github.com/digitalocean/netbox/issues/3277) - Add cable trace buttons for console and power ports
 * [#3281](https://github.com/digitalocean/netbox/issues/3281) - Hide custom links which render as empty text
 * [#3281](https://github.com/digitalocean/netbox/issues/3281) - Hide custom links which render as empty text
 
 
 ## Bug Fixes
 ## Bug Fixes

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

@@ -15,6 +15,9 @@
     <td>
     <td>
         {% if cp.cable %}
         {% if cp.cable %}
             <a href="{{ cp.cable.get_absolute_url }}">{{ cp.cable }}</a>
             <a href="{{ cp.cable.get_absolute_url }}">{{ cp.cable }}</a>
+            <a href="{% url 'dcim:consoleport_trace' pk=cp.pk %}" class="btn btn-primary btn-xs" title="Trace">
+                <i class="fa fa-share-alt" aria-hidden="true"></i>
+            </a>
         {% else %}
         {% else %}
             &mdash;
             &mdash;
         {% endif %}
         {% endif %}

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

@@ -23,6 +23,9 @@
     <td>
     <td>
         {% if pp.cable %}
         {% if pp.cable %}
             <a href="{{ pp.cable.get_absolute_url }}">{{ pp.cable }}</a>
             <a href="{{ pp.cable.get_absolute_url }}">{{ pp.cable }}</a>
+            <a href="{% url 'dcim:powerport_trace' pk=pp.pk %}" class="btn btn-primary btn-xs" title="Trace">
+                <i class="fa fa-share-alt" aria-hidden="true"></i>
+            </a>
         {% else %}
         {% else %}
             &mdash;
             &mdash;
         {% endif %}
         {% endif %}