2018-11-15 14:23:23 -05:00
|
|
|
<tr class="powerport{% if pp.cable.status %} success{% elif pp.cable %} info{% endif %}">
|
2018-10-26 11:29:03 -04:00
|
|
|
|
|
|
|
{# Name #}
|
2016-03-01 11:23:03 -05:00
|
|
|
<td>
|
2017-11-02 08:51:27 -07:00
|
|
|
<i class="fa fa-fw fa-bolt"></i> {{ pp }}
|
2016-03-01 11:23:03 -05:00
|
|
|
</td>
|
2018-10-26 11:29:03 -04:00
|
|
|
|
2019-02-20 14:34:05 -05:00
|
|
|
{# Description #}
|
|
|
|
<td>
|
|
|
|
{{ pp.description }}
|
|
|
|
</td>
|
|
|
|
|
2018-10-26 13:21:43 -04:00
|
|
|
{# Cable #}
|
|
|
|
<td>
|
2018-10-29 12:24:16 -04:00
|
|
|
{% if pp.cable %}
|
|
|
|
<a href="{{ pp.cable.get_absolute_url }}">{{ pp.cable }}</a>
|
|
|
|
{% else %}
|
|
|
|
—
|
|
|
|
{% endif %}
|
2018-10-26 13:21:43 -04:00
|
|
|
</td>
|
|
|
|
|
2018-10-26 11:29:03 -04:00
|
|
|
{# Connection #}
|
2019-03-21 17:47:43 -04:00
|
|
|
{% if pp.connected_endpoint.device %}
|
2016-03-01 11:23:03 -05:00
|
|
|
<td>
|
2018-10-24 11:00:13 -04:00
|
|
|
<a href="{% url 'dcim:device' pk=pp.connected_endpoint.device.pk %}">{{ pp.connected_endpoint.device }}</a>
|
2016-03-01 11:23:03 -05:00
|
|
|
</td>
|
|
|
|
<td>
|
2018-10-24 11:00:13 -04:00
|
|
|
{{ pp.connected_endpoint }}
|
2016-03-01 11:23:03 -05:00
|
|
|
</td>
|
2019-03-21 17:47:43 -04:00
|
|
|
{% elif pp.connected_endpoint %}
|
|
|
|
<td colspan="2">
|
|
|
|
<a href="{{ pp.connected_endpoint.get_absolute_url }}">{{ pp.connected_endpoint }}</a>
|
|
|
|
</td>
|
2016-03-01 11:23:03 -05:00
|
|
|
{% else %}
|
2016-07-06 16:01:18 -04:00
|
|
|
<td colspan="2">
|
|
|
|
<span class="text-muted">Not connected</span>
|
|
|
|
</td>
|
2016-03-01 11:23:03 -05:00
|
|
|
{% endif %}
|
2018-10-26 11:29:03 -04:00
|
|
|
|
|
|
|
{# Actions #}
|
2019-03-05 15:42:47 -06:00
|
|
|
<td class="text-right noprint">
|
2018-11-15 14:23:23 -05:00
|
|
|
{% if pp.cable %}
|
|
|
|
{% include 'dcim/inc/cable_toggle_buttons.html' with cable=pp.cable %}
|
|
|
|
{% elif perms.dcim.add_cable %}
|
2019-04-09 15:37:31 -04:00
|
|
|
<span class="dropdown">
|
|
|
|
<button type="button" class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
|
|
<span class="glyphicon glyphicon-resize-small" aria-hidden="true"></span>
|
|
|
|
</button>
|
|
|
|
<ul class="dropdown-menu dropdown-menu-right">
|
|
|
|
<li><a href="{% url 'dcim:powerport_connect' termination_a_id=pp.pk %}?return_url={{ device.get_absolute_url }}">Power Outlet</a></li>
|
|
|
|
<li><a href="{% url 'dcim:powerport_connect' termination_a_id=pp.pk %}?type=powerfeed&return_url={{ device.get_absolute_url }}">Power Feed</a></li>
|
|
|
|
</ul>
|
|
|
|
</span>
|
2018-11-15 14:23:23 -05:00
|
|
|
{% endif %}
|
2016-03-01 11:23:03 -05:00
|
|
|
{% if perms.dcim.change_powerport %}
|
2017-06-16 10:01:47 -04:00
|
|
|
<a href="{% url 'dcim:powerport_edit' pk=pp.pk %}" title="Edit port" class="btn btn-info btn-xs">
|
|
|
|
<i class="glyphicon glyphicon-pencil" aria-hidden="true"></i>
|
2016-03-01 11:23:03 -05:00
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if perms.dcim.delete_powerport %}
|
2018-10-24 11:00:13 -04:00
|
|
|
{% if pp.connected_endpoint %}
|
2016-03-01 11:23:03 -05:00
|
|
|
<button class="btn btn-danger btn-xs" disabled="disabled">
|
|
|
|
<i class="glyphicon glyphicon-trash" aria-hidden="true"></i>
|
|
|
|
</button>
|
|
|
|
{% else %}
|
2018-02-27 14:59:45 -05:00
|
|
|
<a href="{% url 'dcim:powerport_delete' pk=pp.pk %}?return_url={{ device.get_absolute_url }}" title="Delete port" class="btn btn-danger btn-xs">
|
2017-06-16 10:01:47 -04:00
|
|
|
<i class="glyphicon glyphicon-trash" aria-hidden="true"></i>
|
2016-03-01 11:23:03 -05:00
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|