1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <tr class="consoleport{% if cp.cs_port and not cp.connection_status %} info{% 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 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" title="Mark planned" data="{{ cp.pk }}">
- <i class="glyphicon glyphicon-ban-circle" aria-hidden="true"></i>
- </a>
- {% else %}
- <a href="#" class="btn btn-success btn-xs consoleport-toggle" title="Mark installed" data="{{ cp.pk }}">
- <i class="fa fa-plug" aria-hidden="true"></i>
- </a>
- {% endif %}
- <a href="{% url 'dcim:consoleport_disconnect' pk=cp.pk %}" title="Delete connection" class="btn btn-danger btn-xs">
- <i class="glyphicon glyphicon-resize-full" aria-hidden="true"></i>
- </a>
- {% else %}
- <a href="{% url 'dcim:consoleport_connect' pk=cp.pk %}" title="Connect" class="btn btn-success btn-xs">
- <i class="glyphicon glyphicon-resize-small" aria-hidden="true"></i>
- </a>
- {% endif %}
- <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>
- </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 %}" title="Delete port" class="btn btn-danger btn-xs">
- <i class="glyphicon glyphicon-trash" aria-hidden="true"></i>
- </a>
- {% endif %}
- {% endif %}
- </td>
- </tr>
|