mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
52 lines
2.5 KiB
HTML
52 lines
2.5 KiB
HTML
<tr{% if csp.connected_console and not csp.connected_console.connection_status %} class="info"{% endif %}>
|
|
<td>
|
|
<i class="fa fa-fw fa-keyboard-o"></i> {{ csp.name }}
|
|
</td>
|
|
{% if csp.connected_console %}
|
|
<td>
|
|
<a href="{% url 'dcim:device' pk=csp.connected_console.device.pk %}">{{ csp.connected_console.device }}</a>
|
|
</td>
|
|
<td>
|
|
{{ csp.connected_console.name }}
|
|
</td>
|
|
{% else %}
|
|
<td colspan="2">Not connected</td>
|
|
{% endif %}
|
|
<td class="text-right">
|
|
{% if perms.dcim.change_consoleserverport %}
|
|
{% if csp.connected_console %}
|
|
{% if csp.connected_console.connection_status %}
|
|
<a href="#" class="btn btn-warning btn-xs consoleport-toggle connected" data="{{ csp.connected_console.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="{{ csp.connected_console.pk }}">
|
|
<i class="fa fa-plug" aria-hidden="true" title="Mark connected"></i>
|
|
</a>
|
|
{% endif %}
|
|
<a href="{% url 'dcim:consoleserverport_disconnect' pk=csp.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:consoleserverport_connect' pk=csp.pk %}" class="btn btn-success btn-xs">
|
|
<i class="glyphicon glyphicon-plus" aria-hidden="true" title="Connect"></i>
|
|
</a>
|
|
{% endif %}
|
|
<a href="{% url 'dcim:consoleserverport_edit' pk=csp.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_consoleserverport %}
|
|
{% if csp.connected_console %}
|
|
<button class="btn btn-danger btn-xs" disabled="disabled">
|
|
<i class="glyphicon glyphicon-trash" aria-hidden="true"></i>
|
|
</button>
|
|
{% else %}
|
|
<a href="{% url 'dcim:consoleserverport_delete' pk=csp.pk %}" class="btn btn-danger btn-xs">
|
|
<i class="glyphicon glyphicon-trash" aria-hidden="true" title="Delete port"></i>
|
|
</a>
|
|
{% endif %}
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|