fix napalm tab layout from merge conflict

This commit is contained in:
checktheroads 2021-04-14 16:11:25 -07:00
parent 2d5472cf2a
commit de65ffb99d

View File

@ -19,7 +19,7 @@
{% if perms.dcim.change_device %} {% if perms.dcim.change_device %}
<div class="dropdown m-1"> <div class="dropdown m-1">
<button id="add-device-components" type="button" class="btn btn-sm btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> <button id="add-device-components" type="button" class="btn btn-sm btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-plus" aria-hidden="true"></i> Add Components <i class="mdi mdi-plus-thick" aria-hidden="true"></i> Add Components
</button> </button>
<ul class="dropdown-menu" aria-labeled-by="add-device-components"> <ul class="dropdown-menu" aria-labeled-by="add-device-components">
{% if perms.dcim.add_consoleport %} {% if perms.dcim.add_consoleport %}
@ -191,17 +191,23 @@
</li> </li>
{% endif %} {% endif %}
{% endwith %} {% endwith %}
{% if perms.dcim.napalm_read_device and object.status == 'active' and object.primary_ip and object.platform.napalm_driver %}
{% if perms.dcim.napalm_read_device %} {# NAPALM-enabled tabs #}
{% if object.status != 'active' %} <li role="presentation" class="nav-item">
{% include 'dcim/inc/device_napalm_tabs.html' with disabled_message='Device must be in active status' %} <a class="nav-link{% if active_tab == 'status' %} active{% endif %}" href="{% url 'dcim:device_status' pk=object.pk %}">
{% elif not object.platform %} Status
{% include 'dcim/inc/device_napalm_tabs.html' with disabled_message='No platform assigned to this device' %} </a>
{% elif not object.platform.napalm_driver %} </li>
{% include 'dcim/inc/device_napalm_tabs.html' with disabled_message='No NAPALM driver assigned for this platform' %} <li role="presentation" class="nav-item">
{% else %} <a class="nav-link{% if active_tab == 'lldp-neighbors' %} active{% endif %}" href="{% url 'dcim:device_lldp_neighbors' pk=object.pk %}">
{% include 'dcim/inc/device_napalm_tabs.html' %} LLDP Neighbors
{% endif %} </a>
</li>
<li role="presentation" class="nav-item">
<a class="nav-link{% if active_tab == 'config' %} active{% endif %}" href="{% url 'dcim:device_config' pk=object.pk %}">
Configuration
</a>
</li>
{% endif %} {% endif %}
{% if perms.extras.view_configcontext %} {% if perms.extras.view_configcontext %}
<li <li