{% extends "base.html" %} {% block content %}

{{ t("admin.title") }}

{{ t("admin.subtitle") }}

{% if stats %}
{{ t("admin.users") }} {{ stats.total_users }} {{ t("admin.users_caption") }}
{{ t("admin.servers") }} {{ stats.total_servers }} {{ t("admin.servers_caption") }}
{{ t("admin.costs") }} {{ "%.2f"|format(stats.monthly_total) }} {% if stats.monthly_currency %} {{ stats.monthly_currency }}{% endif %} {{ t("admin.per_month") }}{% if stats.mixed_currencies %} {{ t("stats.mixed_currencies") }}{% endif %}
{{ t("admin.contract_status") }} {{ t("admin.expiring") }}: {{ stats.expiring_soon }} {{ t("admin.expired") }}: {{ stats.expired }}
{% endif %}

{{ t("admin.by_provider") }}

{% if provider_stats %} {% for provider, ps in provider_stats.items() %} {% endfor %} {% else %} {% endif %}
{{ t("admin.provider") }} {{ t("admin.count") }} {{ t("admin.monthly_costs") }} {{ t("admin.expiring_soon") }} {{ t("admin.expired_count") }}
{{ provider }} {{ ps.count }} {{ "%.2f"|format(ps.monthly_total) }} {% if ps.currency_set|length == 1 %} {{ (ps.currency_set|list)[0] }} {% elif ps.currency_set|length > 1 %} (mixed) {% endif %} {{ ps.expiring_soon }} {{ ps.expired }}
Keine Server erfasst.

{{ t("admin.contracts_expiring") }}

{% if expiring_soon_list %}
    {% for s in expiring_soon_list %}
  • {{ s.name }}
    {{ s.provider }} {% if s.location %} · {{ s.location }}{% endif %}
    endet {{ s.contract_end }}
  • {% endfor %}
{% else %}
{{ t("admin.contracts_none_soon") }}
{% endif %}

{{ t("admin.contracts_expired") }}

{% if expired_list %}
    {% for s in expired_list[:10] %}
  • {{ s.name }}
    {{ s.provider }} {% if s.location %} · {{ s.location }}{% endif %}
    endete {{ s.contract_end }}
  • {% endfor %}
{% else %}
{{ t("admin.contracts_none_expired") }}
{% endif %}
{% endblock %}