mirror of
				https://github.com/netbox-community/netbox.git
				synced 2024-05-10 07:54:54 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			60 lines
		
	
	
		
			2.7 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			60 lines
		
	
	
		
			2.7 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
<tr class="powerport{% if pp.power_outlet and not pp.connection_status %} info{% endif %}">
 | 
						|
    {% if selectable and perms.dcim.change_powerport or perms.dcim.delete_powerport %}
 | 
						|
        <td class="pk">
 | 
						|
            <input name="pk" type="checkbox" value="{{ pp.pk }}" />
 | 
						|
        </td>
 | 
						|
    {% endif %}
 | 
						|
    <td>
 | 
						|
        <i class="fa fa-fw fa-bolt"></i> {{ pp.name }}
 | 
						|
    </td>
 | 
						|
    <td></td>
 | 
						|
    {% if pp.power_outlet %}
 | 
						|
        <td>
 | 
						|
            <a href="{% url 'dcim:device' pk=pp.power_outlet.device.pk %}">{{ pp.power_outlet.device }}</a>
 | 
						|
        </td>
 | 
						|
        <td>
 | 
						|
            {{ pp.power_outlet.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_powerport %}
 | 
						|
            {% if pp.power_outlet %}
 | 
						|
                {% if pp.connection_status %}
 | 
						|
                    <a href="#" class="btn btn-warning btn-xs powerport-toggle connected" data="{{ pp.pk }}">
 | 
						|
                        <i class="glyphicon glyphicon-ban-circle" aria-hidden="true" title="Mark planned"></i>
 | 
						|
                    </a>
 | 
						|
                {% else %}
 | 
						|
                    <a href="#" class="btn btn-success btn-xs powerport-toggle" data="{{ pp.pk }}">
 | 
						|
                        <i class="fa fa-plug" aria-hidden="true" title="Mark connected"></i>
 | 
						|
                    </a>
 | 
						|
                {% endif %}
 | 
						|
            <a href="{% url 'dcim:powerport_disconnect' pk=pp.pk %}" class="btn btn-danger btn-xs">
 | 
						|
                <i class="glyphicon glyphicon-resize-full" aria-hidden="true" title="Delete connection"></i>
 | 
						|
            </a>
 | 
						|
            {% else %}
 | 
						|
                <a href="{% url 'dcim:powerport_connect' pk=pp.pk %}" class="btn btn-success btn-xs">
 | 
						|
                    <i class="glyphicon glyphicon-resize-small" aria-hidden="true" title="Connect"></i>
 | 
						|
                </a>
 | 
						|
            {% endif %}
 | 
						|
            <a href="{% url 'dcim:powerport_edit' pk=pp.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_powerport %}
 | 
						|
            {% if pp.power_outlet %}
 | 
						|
                <button class="btn btn-danger btn-xs" disabled="disabled">
 | 
						|
                    <i class="glyphicon glyphicon-trash" aria-hidden="true"></i>
 | 
						|
                </button>
 | 
						|
            {% else %}
 | 
						|
                <a href="{% url 'dcim:powerport_delete' pk=pp.pk %}" class="btn btn-danger btn-xs">
 | 
						|
                    <i class="glyphicon glyphicon-trash" aria-hidden="true" title="Delete port"></i>
 | 
						|
                </a>
 | 
						|
            {% endif %}
 | 
						|
        {% endif %}
 | 
						|
    </td>
 | 
						|
</tr>
 |