add empty table placeholders

This commit is contained in:
Abel Luck 2026-03-30 15:28:56 +02:00
parent 8716579508
commit 0803617e62
5 changed files with 60 additions and 6 deletions

View file

@ -143,6 +143,17 @@ def running_executions_table(
),
]
body_rows: Node
if rows:
body_rows = (render_row(row) for row in rows)
else:
body_rows = h.tr[
h.td(
colspan=str(len(headers)),
class_="px-4 py-8 text-center text-sm text-slate-500",
)["No job executions are running."]
]
return h.section[
h.div(class_="mb-3 flex items-end justify-between gap-4")[
h.div[
@ -173,9 +184,7 @@ def running_executions_table(
)
]
],
h.tbody(class_="divide-y divide-slate-200 bg-white")[
(render_row(row) for row in rows)
],
h.tbody(class_="divide-y divide-slate-200 bg-white")[body_rows],
]
]
],
@ -225,6 +234,7 @@ def published_feeds_table(
return table_section(
eyebrow="Published feeds",
title="Published feeds",
empty_message="No feeds have been published yet.",
headers=("Source", "Feed URL", "Status", "Last updated", "Disk usage"),
rows=rows,
actions=muted_action_link(href="/sources", label="Manage sources"),