{% extends "base.html" %} {% block title %}Diff — Netcanon{% endblock %} {% block content %}

Diff

← Configs
from {{ left_filename }} to {{ right_filename }} ⇆ Reverse direction
{% if error %}
Not found: {{ error }}
{% elif compatibility.severity == 'block' and not force %}
Incompatible configs. These files cannot be diffed as text: Textual diffs across vendors are noise (different syntax, different semantics).
Compare anyway
{% elif compatibility.severity == 'block' and force %}
Cross-vendor diff — semantic equivalence is NOT guaranteed. Changes shown are textual only. {% for reason in compatibility.reasons %}
{{ reason }}
{% endfor %}
{% elif compatibility.severity == 'warn' %}
{% for reason in compatibility.reasons %}
{{ reason }}
{% endfor %}
{% else %}
✓ Same device_type ({{ left.device_type }}) and file extension.
{% endif %} {% if report %}
from → to: +{{ report.stats.added }}  /  −{{ report.stats.removed }}  /  {{ report.stats.equal }} equal
{#- Reusable macro: render one visible diff line. -#} {%- macro render_line(line) -%}
{{ line.left_no or '' }}{{ line.right_no or '' }}{% if line.kind == 'add' %}+{% elif line.kind == 'remove' %}−{% else %} {% endif %}{{ line.text }}
{%- endmacro -%}
{% for group in groups -%} {%- if group.kind == 'collapsed' -%} {%- set first = group.lines[0] -%} {%- set last = group.lines[-1] -%} {%- else -%} {{ render_line(group.lines[0]) }} {%- endif -%} {%- endfor %}
{% endif %} {% endblock %} {% block scripts %} {% endblock %}