2019-02-20 14:34:05 -05:00
|
|
|
{% load helpers %}
|
|
|
|
|
2020-01-27 22:44:38 +00:00
|
|
|
<tr class="consoleserverport{% if csp.cable %} {{ csp.cable.get_status_class }}{% endif %}">
|
2018-10-26 11:29:03 -04:00
|
|
|
|
|
|
|
{# Checkbox #}
|
2017-11-03 16:58:56 -04:00
|
|
|
{% if perms.dcim.change_consoleserverport or perms.dcim.delete_consoleserverport %}
|
2016-07-26 10:14:51 -04:00
|
|
|
<td class="pk">
|
|
|
|
<input name="pk" type="checkbox" value="{{ csp.pk }}" />
|
|
|
|
</td>
|
|
|
|
{% endif %}
|
2018-10-26 11:29:03 -04:00
|
|
|
|
|
|
|
{# Name #}
|
2016-03-01 11:23:03 -05:00
|
|
|
<td>
|
2020-06-25 12:21:25 -04:00
|
|
|
<i class="fa fa-fw fa-keyboard-o"></i>
|
|
|
|
<a href="{{ csp.get_absolute_url }}">{{ csp }}</a>
|
2016-03-01 11:23:03 -05:00
|
|
|
</td>
|
2018-10-26 11:29:03 -04:00
|
|
|
|
2019-10-30 14:25:55 -04:00
|
|
|
{# Type #}
|
|
|
|
<td>
|
|
|
|
{% if csp.type %}{{ csp.get_type_display }}{% else %}—{% endif %}
|
|
|
|
</td>
|
|
|
|
|
2019-02-20 14:34:05 -05:00
|
|
|
{# Description #}
|
|
|
|
<td>
|
|
|
|
{{ csp.description|placeholder }}
|
|
|
|
</td>
|
|
|
|
|
2018-10-26 13:21:43 -04:00
|
|
|
{# Cable #}
|
2019-06-20 13:58:32 -04:00
|
|
|
<td class="text-nowrap">
|
2018-10-29 12:24:16 -04:00
|
|
|
{% if csp.cable %}
|
|
|
|
<a href="{{ csp.cable.get_absolute_url }}">{{ csp.cable }}</a>
|
2019-06-20 13:58:32 -04:00
|
|
|
<a href="{% url 'dcim:consoleserverport_trace' pk=csp.pk %}" class="btn btn-primary btn-xs" title="Trace">
|
|
|
|
<i class="fa fa-share-alt" aria-hidden="true"></i>
|
|
|
|
</a>
|
2018-10-29 12:24:16 -04:00
|
|
|
{% else %}
|
2019-02-20 14:34:05 -05:00
|
|
|
<span class="text-muted">—</span>
|
2018-10-29 12:24:16 -04:00
|
|
|
{% endif %}
|
2018-10-26 13:21:43 -04:00
|
|
|
</td>
|
|
|
|
|
2018-10-26 11:29:03 -04:00
|
|
|
{# Connection #}
|
2018-10-24 10:37:54 -04:00
|
|
|
{% if csp.connected_endpoint %}
|
2016-03-01 11:23:03 -05:00
|
|
|
<td>
|
2018-10-24 10:37:54 -04:00
|
|
|
<a href="{% url 'dcim:device' pk=csp.connected_endpoint.device.pk %}">{{ csp.connected_endpoint.device }}</a>
|
2016-03-01 11:23:03 -05:00
|
|
|
</td>
|
|
|
|
<td>
|
2018-10-24 10:37:54 -04:00
|
|
|
{{ csp.connected_endpoint }}
|
2016-03-01 11:23:03 -05:00
|
|
|
</td>
|
|
|
|
{% 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 csp.cable %}
|
|
|
|
{% include 'dcim/inc/cable_toggle_buttons.html' with cable=csp.cable %}
|
|
|
|
{% elif perms.dcim.add_cable %}
|
2019-04-09 16:49:04 -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:consoleserverport_connect' termination_a_id=csp.pk termination_b_type='console-port' %}?return_url={{ device.get_absolute_url }}">Console Port</a></li>
|
|
|
|
<li><a href="{% url 'dcim:consoleserverport_connect' termination_a_id=csp.pk termination_b_type='front-port' %}?return_url={{ device.get_absolute_url }}">Front Port</a></li>
|
|
|
|
<li><a href="{% url 'dcim:consoleserverport_connect' termination_a_id=csp.pk termination_b_type='rear-port' %}?return_url={{ device.get_absolute_url }}">Rear Port</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_consoleserverport %}
|
2017-06-16 10:01:47 -04:00
|
|
|
<a href="{% url 'dcim:consoleserverport_edit' pk=csp.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_consoleserverport %}
|
2018-10-24 10:37:54 -04:00
|
|
|
{% if csp.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:consoleserverport_delete' pk=csp.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>
|