{# Vendored from packages/web/src/governor_web/templates/layout.html @ 19455c57c5a9. Adapted for governor-audit (spec 141): single-user / loopback-only / no auth / no notifications. Sidebar items reduced to Dashboard · Opportunities · Configuration. Drift check: re-pull from upstream if the brand styling diverges; this file is a snapshot, not a runtime import. #} {{ title or "Governor Audit" }} {# Mobile backdrop #} {# ── Sidebar ── #} {% set _path = request.url.path %} {# ── Content wrapper ── #}
{# Mobile top bar #}
Governor Audit v{{ app_version }}
{# Main content #}
{% if flash %}
{{ flash.level }} {{ flash.message }}
{% endif %} {# Global scan context — surfaces project / region (and billing project when it differs) once at the top so individual pages don't have to repeat the same orientation strip in every subtitle. Hidden on the onboarding wizard (no config yet). #} {% if config is defined and config %} {# Period is derived from config.scan_defaults.lookback_days + now() rather than reading the latest ScanRun row from the DB. The latest-ScanRun lookup was returning None silently when no scan had finished with status="succeeded" yet (or when the SQLite cache hadn't been initialised on this process), leaving the chip blank. The configured lookback is what the next scan will use — close enough for a header reference, and never fails. #} {% set _today = audit_now_fn() %} {% set _lookback = config.scan_defaults.lookback_days if config.scan_defaults else None %}
GCP Project {{ config.gcp_project_id }} · Region {{ config.bigquery_region }} {% if config.billing_project_id and config.billing_project_id != config.gcp_project_id %} · Billing {{ config.billing_project_id }} {% endif %} {% if _lookback %} · Period {{ (_today - timedelta(days=_lookback)).strftime("%d/%m/%Y") }} — {{ _today.strftime("%d/%m/%Y") }} ({{ _lookback }}d) {% endif %}
{% endif %}
{% block content %}{% endblock %}