Parcourir la source

Fixes #1281: Show LLDP neighbors tab on device view only if necessary conditions are met

Jeremy Stretch il y a 7 ans
Parent
commit
9d89eed873
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      netbox/templates/dcim/inc/device_header.html

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

@@ -45,7 +45,7 @@
 <ul class="nav nav-tabs" style="margin-bottom: 20px">
     <li role="presentation"{% if active_tab == 'info' %} class="active"{% endif %}><a href="{% url 'dcim:device' pk=device.pk %}">Info</a></li>
     <li role="presentation"{% if active_tab == 'inventory' %} class="active"{% endif %}><a href="{% url 'dcim:device_inventory' pk=device.pk %}">Inventory</a></li>
-    {% if device.status %}
+    {% if device.status == 1 and device.platform.rpc_client and device.primary_ip %}
         <li role="presentation"{% if active_tab == 'lldp-neighbors' %} class="active"{% endif %}><a href="{% url 'dcim:device_lldp_neighbors' pk=device.pk %}">LLDP Neighbors</a></li>
     {% endif %}
 </ul>