diff --git a/web/src/padelnomics/admin/templates/admin/partials/pipeline_overview.html b/web/src/padelnomics/admin/templates/admin/partials/pipeline_overview.html new file mode 100644 index 0000000..7015fc5 --- /dev/null +++ b/web/src/padelnomics/admin/templates/admin/partials/pipeline_overview.html @@ -0,0 +1,121 @@ + + + +
+

Extraction Status

+ {% if workflow_rows %} +
+ {% for row in workflow_rows %} + {% set wf = row.workflow %} + {% set run = row.run %} + {% set stale = row.stale %} +
+
+ {% if not run %} + + {% elif stale %} + + {% elif run.status == 'success' %} + + {% elif run.status == 'failed' %} + + {% else %} + + {% endif %} + {{ wf.name }} + {% if stale %} + stale + {% endif %} +
+

{{ wf.schedule_label }}

+ {% if run %} +

{{ run.started_at[:16].replace('T', ' ') if run.started_at else '—' }}

+ {% if run.status == 'failed' and run.error_message %} +

+ {{ run.error_message[:80] }}{% if run.error_message|length > 80 %}…{% endif %} +

+ {% endif %} + {% if run.files_written %} +

{{ run.files_written }} file{{ 's' if run.files_written != 1 }}, + {{ "{:,}".format(run.bytes_written or 0) }} B

+ {% endif %} + {% else %} +

No runs yet

+ {% endif %} +
+ {% endfor %} +
+ {% else %} +

No workflows found. Check that infra/supervisor/workflows.toml exists.

+ {% endif %} +
+ + +
+ + +
+

Serving Tables

+ {% if serving_meta %} +

+ Last export: {{ serving_meta.exported_at_utc[:19].replace('T', ' ') }} +

+ + + + + + + + + {% for tname, tmeta in serving_meta.tables.items() | sort %} + + + + + {% endfor %} + +
TableRows
serving.{{ tname }}{{ "{:,}".format(tmeta.row_count) }}
+ {% else %} +

+ _serving_meta.json not found — run the pipeline to generate it. +

+ {% endif %} +
+ + +
+

Landing Zone + + Total: {{ format_bytes(total_landing_bytes) }} + +

+ {% if landing_stats %} + + + + + + + + + + + {% for s in landing_stats %} + + + + + + + {% endfor %} + +
SourceFilesSizeLatest
{{ s.name }}{{ s.file_count }}{{ format_bytes(s.total_bytes) }}{{ s.latest_mtime or '—' }}
+ {% else %} +

+ Landing zone empty or not found at data/landing. +

+ {% endif %} +
+ +
diff --git a/web/src/padelnomics/admin/templates/admin/pipeline.html b/web/src/padelnomics/admin/templates/admin/pipeline.html new file mode 100644 index 0000000..f6ff572 --- /dev/null +++ b/web/src/padelnomics/admin/templates/admin/pipeline.html @@ -0,0 +1,116 @@ +{% extends "admin/base_admin.html" %} +{% set admin_page = "pipeline" %} +{% block title %}Data Pipeline - Admin - {{ config.APP_NAME }}{% endblock %} + +{% block admin_head %} + +{% endblock %} + +{% block admin_content %} +
+
+

Data Pipeline

+

Extraction status, data catalog, and ad-hoc query editor

+
+
+
+ + +
+ Task Queue +
+
+ + +
+
+

Total Runs

+

{{ summary.total | default(0) }}

+
+
+

Success Rate

+

+ {{ success_rate }}% +

+
+
+

Serving Tables

+

{{ total_serving_tables }}

+
+
+

Last Export

+

{{ last_export }}

+
+
+ + {% if summary.stale > 0 %} +
+ {{ summary.stale }} stale run{{ 's' if summary.stale != 1 }}. + An extraction appears to have crashed without updating its status. + Go to the Extractions tab to mark it failed. +
+ {% endif %} + + +
+ + + + +
+ + +
+
+

Loading overview…

+
+
+ + +{% endblock %}