{% extends 'base.html' %} {% comment %} Coverage Drift report — Phase 20. Diffs the latest CoverageSnapshot row set against the most recent snapshot ON OR BEFORE today - N days. Surfaces devices that LOST coverage (red rail, operational regression) and devices that gained coverage (green rail, sanity check that new contracts landed). Why "most recent on or before baseline" rather than exact-date match: Operators schedule the snapshot Job weekly, not daily. An exact-date lookup would frequently miss; "most recent before baseline" always finds the most relevant historical state. Context (from views/coverage_drift.py ContractCoverageDriftView): days, today, baseline, baseline_actual, latest_actual baseline_count, latest_count rows_lost, rows_newly_covered has_history {% endcomment %} {% block title %}Coverage Drift{% endblock %} {% block content %}
Devices that gained or lost contract coverage in the configured window.
Compares the most recent CoverageSnapshot rows against the most recent set on or before
{{ baseline|date:"SHORT_DATE_FORMAT" }} ({{ days }} days ago).
Comparing snapshot {{ baseline_actual|date:"SHORT_DATE_FORMAT" }} ({{ baseline_count }} devices) against {{ latest_actual|date:"SHORT_DATE_FORMAT" }} ({{ latest_count }} devices).
| Device | Location | Tenant |
|---|---|---|
| {{ row.device.name }} | {% if row.device.location %}{{ row.device.location.name }}{% else %}—{% endif %} | {% if row.device.tenant %}{{ row.device.tenant.name }}{% else %}—{% endif %} |
| Device | Location | Tenant |
|---|---|---|
| {{ row.device.name }} | {% if row.device.location %}{{ row.device.location.name }}{% else %}—{% endif %} | {% if row.device.tenant %}{{ row.device.tenant.name }}{% else %}—{% endif %} |