{% comment %} Partial template: full dashboard content (stats + slow tasks + recent tasks). Swapped in by the manual Refresh button and auto-refresh timer via HTMX so client-side state (auto-refresh toggle, countdown) is preserved. Context variables — same as dashboard.html. {% endcomment %} {% load i18n %} {% include "django_taskly/partials/dashboard_stats.html" %} {# -------------------------------------------------------------------- #} {# Slow tasks #} {# -------------------------------------------------------------------- #}

Slow Tasks (top 10)

{% if slow_tasks %} {% for task in slow_tasks %} {% endfor %}
Task Name Status Duration Backend Updated
{{ task.task_name }} {% if task.status == 'SUCCESSFUL' %} {{ task.get_status_display }} {% elif task.status == 'FAILED' %} {{ task.get_status_display }} {% elif task.status == 'RUNNING' %} {{ task.get_status_display }} {% else %} {{ task.get_status_display }} {% endif %} {{ task.duration_seconds|floatformat:2 }}s {{ task.backend }} {{ task.updated_at|date:"Y-m-d H:i:s" }}
{% else %}

No slow tasks recorded.

{% endif %}
{# -------------------------------------------------------------------- #} {# Recent tasks (last 24 h) #} {# -------------------------------------------------------------------- #}

Recent Tasks (last 24 h, up to 20)

{% if recent_tasks %} {% for task in recent_tasks %} {% endfor %}
Task Name Status Duration Attempts Updated
{{ task.task_name }} {% if task.status == 'SUCCESSFUL' %} {{ task.get_status_display }} {% elif task.status == 'FAILED' %} {{ task.get_status_display }} {% elif task.status == 'RUNNING' %} {{ task.get_status_display }} {% else %} {{ task.get_status_display }} {% endif %} {% if task.duration_seconds is not None %} {{ task.duration_seconds|floatformat:2 }}s {% else %} — {% endif %} {{ task.attempts }} {{ task.updated_at|date:"Y-m-d H:i:s" }}
{% else %}

No tasks updated in the last 24 hours.

{% endif %}