2020-01-27 22:44:38 +00:00
|
|
|
<tr class="consoleport{% if cp.cable %} {{ cp.cable.get_status_class }}{% 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-keyboard-o"></i> {{ cp }}
|
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 cp.type %}{{ cp.get_type_display }}{% else %}—{% endif %}
|
|
|
|
</td>
|
|
|
|
|
2019-11-06 15:30:54 -05:00
|
|
|
<td></td>
|
|
|
|
|
2019-02-20 14:34:05 -05:00
|
|
|
{# Description #}
|
|
|
|
<td>
|
|
|
|
{{ cp.description }}
|
|
|
|
</td>
|
|
|
|
|
2018-10-26 13:21:43 -04:00
|
|
|
{# Cable #}
|
|
|
|
<td>
|
2018-10-29 12:24:16 -04:00
|
|
|
{% if cp.cable %}
|
|
|
|
<a href="{{ cp.cable.get_absolute_url }}">{{ cp.cable }}</a>
|
2019-06-24 14:27:34 -04:00
|
|
|
<a href="{% url 'dcim:consoleport_trace' pk=cp.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 %}
|
|
|
|
—
|
|
|
|
{% 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 cp.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=cp.connected_endpoint.device.pk %}">{{ cp.connected_endpoint.device }}</a>
|
2016-03-01 11:23:03 -05:00
|
|
|
</td>
|
|
|
|
<td>
|
2018-10-24 10:37:54 -04:00
|
|
|
{{ cp.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 cp.cable %}
|
|
|
|
{% include 'dcim/inc/cable_toggle_buttons.html' with cable=cp.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:consoleport_connect' termination_a_id=cp.pk termination_b_type='console-server-port' %}?return_url={{ device.get_absolute_url }}">Console Server Port</a></li>
|
|
|
|
<li><a href="{% url 'dcim:consoleport_connect' termination_a_id=cp.pk termination_b_type='front-port' %}?return_url={{ device.get_absolute_url }}">Front Port</a></li>
|
|
|
|
<li><a href="{% url 'dcim:consoleport_connect' termination_a_id=cp.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_consoleport %}
|
2017-06-16 10:01:47 -04:00
|
|
|
<a href="{% url 'dcim:consoleport_edit' pk=cp.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_consoleport %}
|
2018-10-24 10:37:54 -04:00
|
|
|
{% if cp.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:consoleport_delete' pk=cp.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>
|