Fixes #2579: Add missing cable disconnect buttons for front/rear ports

This commit is contained in:
Jeremy Stretch 2018-11-09 15:17:42 -05:00
parent 0316072863
commit 3bbf4a3352
5 changed files with 13 additions and 4 deletions

View File

@ -48,6 +48,7 @@ NetBox now supports modeling physical cables for console, power, and interface c
* [#2572](https://github.com/digitalocean/netbox/issues/2572) - Add button to disconnect cable from circuit termination
* [#2573](https://github.com/digitalocean/netbox/issues/2573) - Fix bulk console/power/interface disconnections
* [#2574](https://github.com/digitalocean/netbox/issues/2574) - Remove duplicate interface links from topology maps
* [#2579](https://github.com/digitalocean/netbox/issues/2579) - Add missing cable disconnect buttons for front/rear ports
## API Changes

View File

@ -31,7 +31,7 @@
{# Actions #}
<td class="text-right">
{% if perms.dcim.change_consoleport %}
{% if cp.connected_endpoint %}
{% if cp.cable %}
{% if cp.connection_status %}
<a href="#" class="btn btn-warning btn-xs consoleport-toggle connected" title="Mark planned" data="{{ cp.pk }}">
<i class="glyphicon glyphicon-ban-circle" aria-hidden="true"></i>

View File

@ -30,7 +30,11 @@
{# Actions #}
<td class="text-right">
{% if perms.dcim.add_cable %}
{% if frontport.cable and perms.dcim.delete_cable %}
<a href="{% url 'dcim:cable_delete' pk=frontport.cable.pk %}" title="Remove cable" class="btn btn-danger btn-xs">
<i class="glyphicon glyphicon-resize-full" aria-hidden="true"></i>
</a>
{% elif not frontport.cable and perms.dcim.add_cable %}
<a href="{% url 'dcim:frontport_connect' termination_a_id=frontport.pk %}?return_url={{ device.get_absolute_url }}" class="btn btn-success btn-xs" title="Connect">
<i class="glyphicon glyphicon-resize-small" aria-hidden="true"></i>
</a>

View File

@ -31,7 +31,7 @@
{# Actions #}
<td class="text-right">
{% if perms.dcim.change_powerport %}
{% if pp.connected_endpoint %}
{% if pp.cable %}
{% if pp.connection_status %}
<a href="#" class="btn btn-warning btn-xs powerport-toggle connected" title="Mark planned" data="{{ pp.pk }}">
<i class="glyphicon glyphicon-ban-circle" aria-hidden="true"></i>

View File

@ -29,7 +29,11 @@
{# Actions #}
<td class="text-right">
{% if perms.dcim.add_cable %}
{% if rearport.cable and perms.dcim.delete_cable %}
<a href="{% url 'dcim:cable_delete' pk=rearport.cable.pk %}" title="Remove cable" class="btn btn-danger btn-xs">
<i class="glyphicon glyphicon-resize-full" aria-hidden="true"></i>
</a>
{% elif not rearport.cable and perms.dcim.add_cable %}
<a href="{% url 'dcim:rearport_connect' termination_a_id=rearport.pk %}?return_url={{ device.get_absolute_url }}" class="btn btn-success btn-xs" title="Connect">
<i class="glyphicon glyphicon-resize-small" aria-hidden="true"></i>
</a>