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

Fixes #3176: Add cable trace button for console server ports and power outlets

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

+ 1 - 0
CHANGELOG.md

@@ -181,6 +181,7 @@ scheme. This change was introuced in django-cors-headers 3.0.
 ## Bug Fixes
 
 * [#2968](https://github.com/digitalocean/netbox/issues/2968) - Correct API documentation for SerializerMethodFields
+* [#3176](https://github.com/digitalocean/netbox/issues/3176) - Add cable trace button for console server ports and power outlets
 * [#3231](https://github.com/digitalocean/netbox/issues/3231) - Fixed cosmetic error indicating a missing schema migration
 * [#3239](https://github.com/digitalocean/netbox/issues/3239) - Corrected count of tags reported via API
 

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

@@ -20,9 +20,12 @@
     </td>
 
     {# Cable #}
-    <td>
+    <td class="text-nowrap">
         {% if csp.cable %}
             <a href="{{ csp.cable.get_absolute_url }}">{{ csp.cable }}</a>
+            <a href="{% url 'dcim:consoleserverport_trace' pk=csp.pk %}" class="btn btn-primary btn-xs" title="Trace">
+                <i class="fa fa-share-alt" aria-hidden="true"></i>
+            </a>
         {% else %}
             <span class="text-muted">&mdash;</span>
         {% endif %}

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

@@ -52,7 +52,7 @@
                 <i class="fa fa-share-alt" aria-hidden="true"></i>
             </a>
         {% else %}
-            &mdash;
+            <span class="text-muted">&mdash;</span>
         {% endif %}
     </td>
 

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

@@ -31,9 +31,12 @@
     </td>
 
     {# Cable #}
-    <td>
+    <td class="text-nowrap">
         {% if po.cable %}
             <a href="{{ po.cable.get_absolute_url }}">{{ po.cable }}</a>
+            <a href="{% url 'dcim:poweroutlet_trace' pk=po.pk %}" class="btn btn-primary btn-xs" title="Trace">
+                <i class="fa fa-share-alt" aria-hidden="true"></i>
+            </a>
         {% else %}
             <span class="text-muted">&mdash;</span>
         {% endif %}