| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <tr{% if cp.cs_port and not cp.connection_status %} class="info"{% endif %}>
- <td>
- <i class="fa fa-fw fa-keyboard-o"></i> {{ cp.name }}
- </td>
- <td></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">Not connected</td>
- {% endif %}
- <td 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>
|