mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #691: Allow the assignment of power ports to PDUs
This commit is contained in:
@ -237,16 +237,14 @@
|
|||||||
{% for pp in power_ports %}
|
{% for pp in power_ports %}
|
||||||
{% include 'dcim/inc/_powerport.html' %}
|
{% include 'dcim/inc/_powerport.html' %}
|
||||||
{% empty %}
|
{% empty %}
|
||||||
{% if not device.device_type.is_pdu %}
|
<tr>
|
||||||
<tr>
|
<td colspan="5" class="alert-warning">
|
||||||
<td colspan="5" class="alert-warning">
|
<i class="fa fa-fw fa-warning"></i> No power ports defined
|
||||||
<i class="fa fa-fw fa-warning"></i> No power ports defined
|
{% if perms.dcim.add_powerport %}
|
||||||
{% if perms.dcim.add_powerport %}
|
<a href="{% url 'dcim:powerport_add' pk=device.pk %}" class="btn btn-primary btn-xs pull-right"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></a>
|
||||||
<a href="{% url 'dcim:powerport_add' pk=device.pk %}" class="btn btn-primary btn-xs pull-right"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></a>
|
{% endif %}
|
||||||
{% endif %}
|
</td>
|
||||||
</td>
|
</tr>
|
||||||
</tr>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
{% if perms.dcim.add_interface or perms.dcim.add_consoleport or perms.dcim.add_powerport %}
|
{% if perms.dcim.add_interface or perms.dcim.add_consoleport or perms.dcim.add_powerport %}
|
||||||
@ -261,7 +259,7 @@
|
|||||||
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add console port
|
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add console port
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.add_powerport and not device.device_type.is_pdu %}
|
{% if perms.dcim.add_powerport %}
|
||||||
<a href="{% url 'dcim:powerport_add' pk=device.pk %}" class="btn btn-xs btn-primary">
|
<a href="{% url 'dcim:powerport_add' pk=device.pk %}" class="btn btn-xs btn-primary">
|
||||||
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add power port
|
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add power port
|
||||||
</a>
|
</a>
|
||||||
|
Reference in New Issue
Block a user