{% extends 'generic/object.html' %}
{% load helpers %}
{% load i18n %}
{% block title %}{{ object }} - {% trans "Drift Report" %}{% endblock %}
{% block extra_controls %}
{% if perms.forward_netbox.run_forwardsync %}
{% endif %}
{% trans "Sync" %}
{% endblock extra_controls %}
{% block content %}
{% if drift_stale %}
{% if drift_stale_newer_sync %}
{% trans "This drift is computed from a dependency preview, but a newer sync has run since โ the numbers below are stale." %}
{% else %}
{% trans "This drift is computed from a dependency preview that is over a day old โ the numbers below may be stale." %}
{% endif %}
{% trans "Preview:" %} {{ preview_at|placeholder }} ยท {% trans "Last sync:" %} {{ last_sync_at|placeholder }}.
{% trans "Re-run Preview Dependencies for current drift." %}
{% endif %}
{% if not report.comparison_available %}
{% trans "This dependency preview measures estimated apply workload, not object-level drift. In-sync status is not measured because fetched rows are change candidates, not confirmed mismatches." %}
{% endif %}
{% if report.looks_like_full_create %}
{% blocktrans with n=report.full_create_model_count total=report.model_count drift=report.total_drift %}Every model with data ({{ n }} of {{ total }}) shows all Forward rows as pending with no removals. That is the signature of a preview taken against an empty or unmerged NetBox โ it is "everything Forward has," not {{ drift }} real mismatches.{% endblocktrans %}
{% trans "If this is a first sync it is expected; otherwise re-run Preview Dependencies after a completed, merged sync." %}
{% endif %}
| {% trans "In sync" %} |
{% if not report.comparison_available %}
{% trans "Not measured" %}
{% elif report.in_sync %}
{% trans "Yes" %}
{% else %}
{% trans "No" %}
{% endif %}
|
| {% trans "Drifted models" %} |
{% if report.comparison_available %}{{ report.drifted_model_count }} / {{ report.model_count }}{% else %}{% trans "Not measured" %}{% endif %} |
| {% trans "Total drift" %} |
{% if report.comparison_available %}{{ report.total_drift }}{% else %}{% trans "Not measured" %}{% endif %} |
| {% trans "Estimated apply work" %} |
{{ report.total_apply_work }} |
| {% trans "From preview" %} |
{{ report.generated_at|placeholder }} |
| {% trans "Model" %} |
{% trans "Forward rows" %} |
{% trans "Upsert/change candidates" %} |
{% trans "Pending removals" %} |
{% trans "Estimated apply work" %} |
{% trans "Drift" %} |
{% trans "In sync" %} |
{% for row in report.models %}
{{ row.model }} |
{{ row.forward_rows|placeholder }} |
{{ row.pending_changes }} |
{{ row.pending_removes }} |
{{ row.estimated_apply_work }} |
{% if row.comparison_available %}{% if row.drift %}{{ row.drift }}{% else %}0{% endif %}{% else %}{% trans "Not measured" %}{% endif %} |
{% if not row.comparison_available %}{% trans "Not measured" %}{% elif row.in_sync %}{% trans "Yes" %}{% else %}{% trans "No" %}{% endif %} |
{% empty %}
| {% trans "No model results in the preview." %} |
{% endfor %}
{% endblock content %}