mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
59 lines
2.6 KiB
HTML
59 lines
2.6 KiB
HTML
<tr class="consoleport{% if cp.cs_port and not cp.connection_status %} info{% endif %}">
|
|
{% if selectable and perms.dcim.change_consoleport or perms.dcim.delete_consoleport %}
|
|
<td class="pk">
|
|
<input name="pk" type="checkbox" value="{{ cp.pk }}" />
|
|
</td>
|
|
{% endif %}
|
|
<td>
|
|
<i class="fa fa-fw fa-keyboard-o"></i> {{ cp.name }}
|
|
</td>
|
|
{% if cp.cs_port %}
|
|
<td>
|
|
<a href="{% url 'dcim:device' pk=cp.cs_port.device.pk %}">{{ cp.cs_port.device }}</a>
|
|
</td>
|
|
<td>
|
|
{{ cp.cs_port.name }}
|
|
</td>
|
|
{% else %}
|
|
<td colspan="2">
|
|
<span class="text-muted">Not connected</span>
|
|
</td>
|
|
{% endif %}
|
|
<td colspan="2" class="text-right">
|
|
{% if perms.dcim.change_consoleport %}
|
|
{% if cp.cs_port %}
|
|
{% if cp.connection_status %}
|
|
<a href="#" class="btn btn-warning btn-xs consoleport-toggle connected" data="{{ cp.pk }}">
|
|
<i class="glyphicon glyphicon-ban-circle" aria-hidden="true" title="Mark planned"></i>
|
|
</a>
|
|
{% else %}
|
|
<a href="#" class="btn btn-success btn-xs consoleport-toggle" data="{{ cp.pk }}">
|
|
<i class="fa fa-plug" aria-hidden="true" title="Mark connected"></i>
|
|
</a>
|
|
{% endif %}
|
|
<a href="{% url 'dcim:consoleport_disconnect' pk=cp.pk %}" class="btn btn-danger btn-xs">
|
|
<i class="glyphicon glyphicon-remove" aria-hidden="true" title="Delete connection"></i>
|
|
</a>
|
|
{% else %}
|
|
<a href="{% url 'dcim:consoleport_connect' pk=cp.pk %}" class="btn btn-success btn-xs">
|
|
<i class="glyphicon glyphicon-plus" aria-hidden="true" title="Connect"></i>
|
|
</a>
|
|
{% endif %}
|
|
<a href="{% url 'dcim:consoleport_edit' pk=cp.pk %}" class="btn btn-info btn-xs">
|
|
<i class="glyphicon glyphicon-pencil" aria-hidden="true" title="Edit port"></i>
|
|
</a>
|
|
{% endif %}
|
|
{% if perms.dcim.delete_consoleport %}
|
|
{% if cp.cs_port %}
|
|
<button class="btn btn-danger btn-xs" disabled="disabled">
|
|
<i class="glyphicon glyphicon-trash" aria-hidden="true"></i>
|
|
</button>
|
|
{% else %}
|
|
<a href="{% url 'dcim:consoleport_delete' pk=cp.pk %}" class="btn btn-danger btn-xs">
|
|
<i class="glyphicon glyphicon-trash" aria-hidden="true" title="Delete port"></i>
|
|
</a>
|
|
{% endif %}
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|