From 5b48a11e01ffda711c84fbf43a04a1f594401124 Mon Sep 17 00:00:00 2001 From: Deeman Date: Wed, 25 Feb 2026 12:54:21 +0100 Subject: [PATCH] feat(pipeline): catalog tab templates - partials/pipeline_catalog.html: accordion list of serving tables with row count badges, column count, click-to-expand lazy-loaded detail - partials/pipeline_table_detail.html: column schema grid + sticky-header sample data table (10 rows, truncated values with title attribute) - JS: toggleCatalogTable() + htmx.trigger(content, 'revealed') for lazy-loading detail only on first open Subtask 4 of 6 Co-Authored-By: Claude Sonnet 4.6 --- .../admin/partials/pipeline_catalog.html | 74 +++++++++++++++++++ .../admin/partials/pipeline_table_detail.html | 59 +++++++++++++++ 2 files changed, 133 insertions(+) create mode 100644 web/src/padelnomics/admin/templates/admin/partials/pipeline_catalog.html create mode 100644 web/src/padelnomics/admin/templates/admin/partials/pipeline_table_detail.html diff --git a/web/src/padelnomics/admin/templates/admin/partials/pipeline_catalog.html b/web/src/padelnomics/admin/templates/admin/partials/pipeline_catalog.html new file mode 100644 index 0000000..beb556f --- /dev/null +++ b/web/src/padelnomics/admin/templates/admin/partials/pipeline_catalog.html @@ -0,0 +1,74 @@ + + +{% if serving_meta %} +

+ Serving DB last exported: {{ serving_meta.exported_at_utc[:19].replace('T', ' ') }} +

+{% endif %} + +{% if tables %} +
+ {% for table in tables %} +
+ +
+
+ + + + serving.{{ table.name }} + {{ table.column_count }} col{{ 's' if table.column_count != 1 }} + {% if table.row_count is not none %} + + {{ "{:,}".format(table.row_count) }} rows + + {% endif %} +
+ + + +
+ + + +
+ {% endfor %} +
+{% else %} +
+

No serving tables found. Run the pipeline to generate them.

+
+{% endif %} + + diff --git a/web/src/padelnomics/admin/templates/admin/partials/pipeline_table_detail.html b/web/src/padelnomics/admin/templates/admin/partials/pipeline_table_detail.html new file mode 100644 index 0000000..7aade3c --- /dev/null +++ b/web/src/padelnomics/admin/templates/admin/partials/pipeline_table_detail.html @@ -0,0 +1,59 @@ + + +
+ + +
+

Schema

+
+ {% for col in columns %} +
+ {{ col.column_name }} + {{ col.data_type | upper }} +
+ {% endfor %} +
+
+ + + {% if sample %} +
+

+ Sample (first {{ sample | length }} rows) +

+
+ + + + {% for col in columns %} + + {% endfor %} + + + + {% for row in sample %} + + {% for col in columns %} + + {% endfor %} + + {% endfor %} + +
{{ col.column_name }}
+ {% set val = row[col.column_name] %} + {% if val is none %} + null + {% elif val | string | length > 40 %} + {{ val | string | truncate(40, true) }} + {% else %} + {{ val }} + {% endif %} +
+
+
+ {% else %} +

Table is empty.

+ {% endif %} + +