{% extends "admin/index.html" %} {% load admin_dashboard %} {% comment %} Admin home page with an analytics dashboard rendered above the standard app/model list. Extends Django's built-in admin/index.html so the app list and "recent actions" sidebar are preserved via {{ block.super }}. Time window is driven by ?period=day|week|month|year|all and read by the admin_dashboard_stats template tag. {% endcomment %} {% block content %} {% admin_dashboard_stats as stats %}

Control Center

● LIVE
{# pending-work strip #}
{% for p in stats.pending %} {{ p.value }} {{ p.label }} {% endfor %}
{# headline cards #}
{% for card in stats.cards %}
{{ card.icon }}
{{ card.label }}
{{ card.value }}
{{ card.sub }}
{{ card.scope }} {% if card.attention %}!{% endif %}
{% endfor %}
{# graphical charts #}

Account Status

current
{{ stats.charts.status.total }} accounts
    {% for seg in stats.charts.status.legend %}
  • {{ seg.label }} {{ seg.count }} · {{ seg.pct }}%
  • {% endfor %}

Deposits by Agent

{{ stats.period_label }}
{% for b in stats.charts.deposit_bars %}
{{ b.name }}
{{ b.value }}
{% empty %}

No deposit data for this window.

{% endfor %}
{# per-agent analytics #}

Agent Analytics

flows scoped to {{ stats.period_label }} · downline & commission per agent
{% for a in stats.agent_rows %} {% empty %} {% endfor %}
Agent Users New Deposits Withdrawals Commission
{{ a.name }} {% if not a.is_active %}inactive{% endif %}
{% if a.code %}
#{{ a.uid }} · {{ a.code }}
{% endif %}
{{ a.total_users }} {% if a.new_users %}+{{ a.new_users }}{% else %}0{% endif %} {{ a.deposits }} {{ a.withdrawals }} {{ a.commission }}
No agents registered yet.
{{ block.super }} {% endblock %}