<commit_before><tr{% if iface.connection and not iface.connection.connection_status %} class="info"{% endif %}>
    {% if selectable and perms.dcim.change_interface or perms.dcim.delete_interface %}
        <td class="pk">
            <input name="pk" type="checkbox" value="{{ iface.pk }}" />
        </td>
    {% endif %}
    <td>
        <i class="fa fa-fw fa-{{ icon|default:"exchange" }}"></i> <span title="{{ iface.get_form_factor_display }}">{{ iface.name }}</span>
        {% if iface.lag %}
            <span class="label label-primary">{{ iface.lag.name }}</span>
        {% endif %}
        {% if iface.description %}
            <i class="fa fa-fw fa-comment-o" title="{{ iface.description }}"></i>
        {% endif %}
        {% if iface.is_lag %}
            <br /><small class="text-muted">{{ iface.member_interfaces.all|join:", "|default:"No members" }}</small>
        {% endif %}
    </td>
    <td>
        <small>{{ iface.mac_address|default:'' }}</small>
    </td>
    {% if iface.is_virtual %}
        <td colspan="2" class="text-muted">Virtual interface</td>
    {% elif iface.connection %}
        {% with iface.connected_interface as connected_iface %}
            <td>
                <a href="{% url 'dcim:device' pk=connected_iface.device.pk %}">{{ connected_iface.device }}</a>
            </td>
            <td>
                <span title="{{ connected_iface.get_form_factor_display }}">{{ connected_iface }}</span>
            </td>
        {% endwith %}
    {% elif iface.circuit_termination %}
        {% with iface.circuit_termination.get_peer_termination as peer_termination %}
            <td colspan="2">
                <i class="fa fa-fw fa-globe" title="Circuit"></i>
                {% if peer_termination %}
                    <a href="{% url 'dcim:site' slug=peer_termination.site.slug %}">{{ peer_termination.site }}</a> via
                {% endif %}
                <a href="{% url 'circuits:circuit' pk=iface.circuit_termination.circuit_id %}">{{ iface.circuit_termination.circuit }}</a>
            </td>
        {% endwith %}
    {% else %}
        <td colspan="2">
            <span class="text-muted">Not connected</span>
        </td>
    {% endif %}
    <td class="text-right">
        {% if show_graphs %}
            {% if iface.circuit_termination or iface.connection %}
                <button type="button" class="btn btn-primary btn-xs" data-toggle="modal" data-target="#graphs_modal" data-obj="{{ device.name }} - {{ iface.name }}" data-url="{% url 'dcim-api:interface_graphs' pk=iface.pk %}" title="Show graphs">
                    <i class="glyphicon glyphicon-signal" aria-hidden="true"></i>
                </button>
            {% endif %}
        {% endif %}
        {% if perms.dcim.change_interface %}
            {% if not iface.is_virtual %}
                {% if iface.connection %}
                    {% if iface.connection.connection_status %}<commit_msg>Closes #983: Include peer device names when listing circuits in device view<commit_after><tr{% if iface.connection and not iface.connection.connection_status %} class="info"{% endif %}>
    {% if selectable and perms.dcim.change_interface or perms.dcim.delete_interface %}
        <td class="pk">
            <input name="pk" type="checkbox" value="{{ iface.pk }}" />
        </td>
    {% endif %}
    <td>
        <i class="fa fa-fw fa-{{ icon|default:"exchange" }}"></i> <span title="{{ iface.get_form_factor_display }}">{{ iface.name }}</span>
        {% if iface.lag %}
            <span class="label label-primary">{{ iface.lag.name }}</span>
        {% endif %}
        {% if iface.description %}
            <i class="fa fa-fw fa-comment-o" title="{{ iface.description }}"></i>
        {% endif %}
        {% if iface.is_lag %}
            <br /><small class="text-muted">{{ iface.member_interfaces.all|join:", "|default:"No members" }}</small>
        {% endif %}
    </td>
    <td>
        <small>{{ iface.mac_address|default:'' }}</small>
    </td>
    {% if iface.is_virtual %}
        <td colspan="2" class="text-muted">Virtual interface</td>
    {% elif iface.connection %}
        {% with iface.connected_interface as connected_iface %}
            <td>
                <a href="{% url 'dcim:device' pk=connected_iface.device.pk %}">{{ connected_iface.device }}</a>
            </td>
            <td>
                <span title="{{ connected_iface.get_form_factor_display }}">{{ connected_iface }}</span>
            </td>
        {% endwith %}
    {% elif iface.circuit_termination %}
        {% with iface.circuit_termination.get_peer_termination as peer_termination %}
            <td colspan="2">
                <i class="fa fa-fw fa-globe" title="Circuit"></i>
                {% if peer_termination %}
                    {% if peer_termination.interface %}
                        <a href="{% url 'dcim:device' pk=peer_termination.interface.device.pk %}">{{ peer_termination.interface.device }}</a>
                        (<a href="{% url 'dcim:site' slug=peer_termination.site.slug %}">{{ peer_termination.site }}</a>)
                    {% else %}
                        <a href="{% url 'dcim:site' slug=peer_termination.site.slug %}">{{ peer_termination.site }}</a>
                    {% endif %}
                    via
                {% endif %}
                <a href="{% url 'circuits:circuit' pk=iface.circuit_termination.circuit_id %}">{{ iface.circuit_termination.circuit }}</a>
            </td>
        {% endwith %}
    {% else %}
        <td colspan="2">
            <span class="text-muted">Not connected</span>
        </td>
    {% endif %}
    <td class="text-right">
        {% if show_graphs %}
            {% if iface.circuit_termination or iface.connection %}
                <button type="button" class="btn btn-primary btn-xs" data-toggle="modal" data-target="#graphs_modal" data-obj="{{ device.name }} - {{ iface.name }}" data-url="{% url 'dcim-api:interface_graphs' pk=iface.pk %}" title="Show graphs">
                    <i class="glyphicon glyphicon-signal" aria-hidden="true"></i>
                </button>
            {% endif %}
        {% endif %}
        {% if perms.dcim.change_interface %}
            {% if not iface.is_virtual %}
                {% if iface.connection %}
                    {% if iface.connection.connection_status %}
{'fraction_non_alphanumeric': 0.17258803094899733, 'fraction_numerical': 0.0014211274277593558, 'mean_word_length': 2.1371966319960376, 'pattern_counts': {'":': 0, '<': 103, '<?xml version=': 0, '>': 103, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5923772', 'n_tokens_mistral': 2088, 'n_tokens_neox': 1843, 'n_words': 387}