remove feed url from publisher dashboard
All checks were successful
buildbot/nix-eval Build done.
buildbot/nix-build Build done.
buildbot/nix-effects Build done.

This commit is contained in:
Abel Luck 2026-06-02 10:56:36 +02:00
parent e4a5246ab3
commit 2147d9c999
3 changed files with 27 additions and 11 deletions

View file

@ -93,7 +93,9 @@ def operational_snapshot(*, snapshot: Mapping[str, str] | None = None) -> Render
]
def _source_feed_row(source_feed: Mapping[str, object]) -> tuple[Node, ...]:
def _source_feed_row(
source_feed: Mapping[str, object], *, show_feed_url: bool
) -> tuple[Node, ...]:
last_updated_iso = source_feed.get("last_updated_iso")
last_updated = (
h.time(
@ -117,6 +119,19 @@ def _source_feed_row(source_feed: Mapping[str, object]) -> tuple[Node, ...]:
if next_run_iso is not None
else h.p(class_="font-medium text-slate-900")[str(source_feed["next_run"])]
)
feed_url_cells = (
(
h.div(class_="min-w-64")[
inline_link(
href=str(source_feed["feed_href"]),
label=str(source_feed["feed_href"]),
tone="amber",
)
],
)
if show_feed_url
else ()
)
return (
h.div[
h.div(class_="font-semibold text-slate-950")[str(source_feed["source"])],
@ -124,13 +139,7 @@ def _source_feed_row(source_feed: Mapping[str, object]) -> tuple[Node, ...]:
str(source_feed["slug"])
],
],
h.div(class_="min-w-64")[
inline_link(
href=str(source_feed["feed_href"]),
label=str(source_feed["feed_href"]),
tone="amber",
)
],
*feed_url_cells,
status_badge(
label=str(source_feed["feed_status_label"]),
tone=str(source_feed["feed_status_tone"]),
@ -150,15 +159,20 @@ def published_feeds_table(
source_feeds: tuple[Mapping[str, object], ...] | None = None,
manage_sources_href: str | None = "/admin/sources",
show_heading: bool = True,
show_feed_url: bool = True,
) -> Renderable:
rows = tuple(_source_feed_row(source_feed) for source_feed in (source_feeds or ()))
rows = tuple(
_source_feed_row(source_feed, show_feed_url=show_feed_url)
for source_feed in (source_feeds or ())
)
feed_url_headers = ("Feed URL",) if show_feed_url else ()
return table_section(
eyebrow="Published feeds" if show_heading else None,
title="Published feeds" if show_heading else None,
empty_message="No feeds have been published yet.",
headers=(
"Source",
"Feed URL",
*feed_url_headers,
"Status",
"Last updated",
"Next run",

View file

@ -46,6 +46,7 @@ def publisher_page(
source_feeds=source_feeds,
manage_sources_href=None,
show_heading=False,
show_feed_url=False,
),
live_work_section(
running_executions=running_executions,