{% extends "base.html" %} {% from "components/card.html" import card %} {% block content %}

Dashboard

{# ── Row 1: Hero stat bar ──────────────────────────────────────────────────── #}
{{ total_projects }}
Projects
{# ── Row 2: By purpose (1 col) + Stale queue (2 col) ─────────────────── #}
{% call card(title="By purpose") %}
{% for p in purposes %} {{ p.label }} {{ by_disposition.get(p.key, 0) }} {% endfor %}
{% endcall %}
{% call card(title="Stale review queue", subtitle="Incomplete · stale experimental · stale remove") %} {% if not stale %}

All clear.

{% else %} {% endif %} {% endcall %}
{# ── Row 3: By manager + By project + Installs per month ─────────────────── #}
{# By manager — clickable rows #}
{% call card(title="By manager") %}
{% for m, n in by_manager.items() %} {{ pres.get(m, {}).get("label", m) }} {{ n }} {% endfor %}
{% endcall %}
{# By project — clickable rows #}
{% call card(title="By project (top 10)") %}
{% for name, n in by_project %} {{ name }} {{ n }} {% endfor %}
{% endcall %}
{# Installs per month — sparkline + table #}
{% call card(title="Installs per month") %} {% if sparkline_points | length >= 2 %} {# SVG sparkline #}
{# Last point dot in accent color #} {% set lx, ly = sparkline_points[-1] %}
{% if latest_month %}
{{ latest_month[1] }}
{{ latest_month[0] }}
{% endif %} {% elif sparkline_points | length == 1 %} {% set lx, ly = sparkline_points[0] %}
{% if latest_month %}
{{ latest_month[1] }}
{{ latest_month[0] }}
{% endif %}
{% endif %} {% endcall %}
{% endblock %}