{% extends "base.html" %} {% block title %}Dashboard — NFR{% endblock %} {% block content %} {# ── System status row ────────────────────────────────────────────────────── #}
{# DB #}
Database
PostgreSQL
Connected
{# NAS #}
NAS Mount
{% if nas_mounted %}
Mounted
{{ settings.NAS_ROOT_PATH }}
{% else %}
Not mounted
{{ settings.NAS_ROOT_PATH }}
{% endif %}
{# Dry-run #}
Write Mode
{% if settings.DRY_RUN_MODE %}
Dry-run ON
No files written to NAS
{% else %}
Live writes
DRY_RUN_MODE = false
{% endif %}
{# ClickUp #}
ClickUp API
{% if settings.CLICKUP_API_TOKEN %}
Configured
Space: {{ settings.CLICKUP_SPACE_ID or "—" }}
{% else %}
Not configured
CLICKUP_API_TOKEN not set
{% endif %}
{# ── Today's activity ─────────────────────────────────────────────────────── #}

Today's Activity

{{ today_ingested }}
Ingested
{{ today_done }}
Written to NAS
{{ today_review }}
Sent to Review
{{ today_errors }}
Errors
{# ── Sync summary + Review queue ──────────────────────────────────────────── #}
{# Last sync #}
Last ClickUp Sync
{% if last_sync %}
{% if last_sync.status == "success" %} Success {% elif last_sync.status == "error" %} Error {% elif last_sync.status == "running" %} Running… {% else %} {{ last_sync.status }} {% endif %} {{ last_sync.started_at.strftime("%Y-%m-%d %H:%M UTC") if last_sync.started_at else "—" }}
History
Projects found: {{ last_sync.projects_found or 0 }}   New: {{ last_sync.projects_new or 0 }}   Updated: {{ last_sync.projects_updated or 0 }}
{% if next_sync_seconds is not none %}
Next sync in ~{{ (next_sync_seconds // 60) }}m {{ next_sync_seconds % 60 }}s (interval: {{ settings.CLICKUP_SYNC_INTERVAL_MINUTES }}m)
{% endif %} {% if last_sync.error_message %}
{{ last_sync.error_message }}
{% endif %} {% else %}
No sync runs recorded yet.
Sync will run automatically every {{ settings.CLICKUP_SYNC_INTERVAL_MINUTES }} minutes.
{% endif %}
{# Review queue #}
Review Queue
{{ pending_review_count }} pending item{{ "s" if pending_review_count != 1 }}
{% if pending_review_count %} Review now {% else %} View queue {% endif %}
{% if oldest_review_at %}
Oldest item: {{ oldest_review_at.strftime("%Y-%m-%d %H:%M UTC") }}
{% endif %}
{# ── Recent failures ──────────────────────────────────────────────────────── #}
Recent Failures
View all errors →
{% if recent_failures %}
{% for rec in recent_failures %} {% endfor %}
ID Filename Source Status Error When
{{ rec.id }} {{ rec.original_filename }} {{ rec.ingest_source }} {% if rec.status == "error" %} error {% else %} {{ rec.status }} {% endif %} {% if rec.error_message %} {{ rec.error_message[:120] }}{% if rec.error_message|length > 120 %}…{% endif %} {% else %} {% endif %} {{ rec.created_at.strftime("%Y-%m-%d %H:%M") if rec.created_at else "—" }}
{% else %}
No failures in the last 24 hours. ✓
{% endif %}
{% endblock %} {% block scripts %} {% endblock %}