|
|
@@ -153,16 +153,17 @@
|
|
|
</li>
|
|
|
{% endif %}
|
|
|
{% endwith %}
|
|
|
- {% if perms.dcim.napalm_read_device %}
|
|
|
- {% if object.status != 'active' %}
|
|
|
- {% include 'dcim/inc/device_napalm_tabs.html' with disabled_message='Device must be in active status' %}
|
|
|
- {% elif not object.platform %}
|
|
|
- {% include 'dcim/inc/device_napalm_tabs.html' with disabled_message='No platform assigned to this device' %}
|
|
|
- {% elif not object.platform.napalm_driver %}
|
|
|
- {% include 'dcim/inc/device_napalm_tabs.html' with disabled_message='No NAPALM driver assigned for this platform' %}
|
|
|
- {% else %}
|
|
|
- {% include 'dcim/inc/device_napalm_tabs.html' %}
|
|
|
- {% endif %}
|
|
|
+ {% if perms.dcim.napalm_read_device and object.status == 'active' and object.primary_ip and object.platform.napalm_driver %}
|
|
|
+ {# NAPALM-enabled tabs #}
|
|
|
+ <li role="presentation"{% if active_tab == 'status' %} class="active"{% endif %}>
|
|
|
+ <a href="{% url 'dcim:device_status' pk=object.pk %}">Status</a>
|
|
|
+ </li>
|
|
|
+ <li role="presentation"{% if active_tab == 'lldp-neighbors' %} class="active"{% endif %}>
|
|
|
+ <a href="{% url 'dcim:device_lldp_neighbors' pk=object.pk %}">LLDP Neighbors</a>
|
|
|
+ </li>
|
|
|
+ <li role="presentation"{% if active_tab == 'config' %} class="active"{% endif %}>
|
|
|
+ <a href="{% url 'dcim:device_config' pk=object.pk %}">Configuration</a>
|
|
|
+ </li>
|
|
|
{% endif %}
|
|
|
{% if perms.extras.view_configcontext %}
|
|
|
<li role="presentation"{% if active_tab == 'config-context' %} class="active"{% endif %}>
|