{# SPDX-License-Identifier: Apache-2.0 #} {# Copyright (C) 2025 Marcin Zieba #} {# Swappable interfaces results: state chips + per-attribute table + pagination. #}
{% if rows %}
{% for row in rows %} {% endfor %}
InterfaceAttributeNetBoxDevice (NSO)State
{{ row.iface_name }} {{ row.attribute }} {{ row.netbox_value }} {% if row.attribute == 'description' %} {% elif row.attribute == 'enabled' %} {% endif %} {{ row.device_value }} {% if row.kind == 'drift' %}{{ row.label }} {% elif row.kind == 'pending' %}{{ row.label }} {% elif row.kind == 'apply_failed' %}{{ row.label }} {% elif row.kind == 'in_sync' %}{{ row.label }} {% elif row.kind == 'deploying' %}{{ row.label }} {% else %}{{ row.label }}{% endif %} {% if row.owned %}{% endif %} {% if row.kind == 'drift' %}
{% csrf_token %}
{% csrf_token %}
{% elif row.kind == 'pending' or row.kind == 'apply_failed' %} {% elif not row.owned %}
{% csrf_token %}
{% endif %}
{{ page.paginator.count }} row{{ page.paginator.count|pluralize }} · page {{ page.number }} of {{ page.paginator.num_pages }}
{% else %} {% if no_attrs_in_scope and not q and state == 'all' %}
Interface management is enabled, but no interface attributes are selected — so there is nothing to sync. Edit this device's NSO management and enable description and/or enabled, then Sync Now.
{% else %}

{% if state == 'drift' %}No drift — the device matches NetBox. {% elif state == 'pending' %}Nothing pending apply. {% elif q %}No interfaces matching “{{ q }}”. {% else %}No interface state yet — click Sync Now or wait for the next sync.{% endif %}

{% endif %} {% endif %}