{# SPDX-License-Identifier: Apache-2.0 #} {# Copyright (C) 2025 Marcin Zieba #} {# NSO compliance badge for Interface detail page. #} {% load helpers %} {% with device=object.device %} {% if device.nso_management %}
NSO-managed
{# G-activated banner — unconditional; edits become intent in Phase 2 #}
Local edits to description / enabled become intent and will be pushed to the device on the next apply.
{% if derived_intent_match %}
Description managed by derived intent auto: {{ derived_intent_match.sentinel }}
{% endif %} {% if nso_states %}
{% for attr, state in nso_states.items %} {% endfor %}
{{ attr }} {% if state.status == "in_sync" %} {{ state.status }} {% elif state.status == "imported" %} {{ state.status }} {% elif state.status == "changed" or state.status == "drifted" %} {{ state.status }} {% elif state.status == "apply_failed" %} {{ state.status }} {% if state.last_apply_error %} {{ state.last_apply_error.message|default:state.last_apply_error }} {% endif %} {% elif state.status == "error" %} {{ state.status }} {% elif state.status == "accepted" %} {{ state.status }} {% elif state.status == "deploying" %} {{ state.status }} {% else %} {{ state.status }} {% endif %} {% if state.status == "imported" or state.status == "changed" %}
{% csrf_token %}
{% endif %}
{% endif %}
{% endif %} {% endwith %}