Conduit.Dashboard.Html
Functions
Admin action button (POST form with optional JavaScript confirm dialog).
The `confirm` message is embedded in a JavaScript string literal, so it must
be escaped for JS (not HTML) — single quotes and backslashes are the primary
injection vectors. `Html.escape` is NOT used here because HTML entity encoding
(`'`, `&`, etc.) is not decoded inside JS string literals in browsers,
which would display garbage in the dialog box or leave injection gaps open.A simple flash/notice box.
Render a flash banner from query params, or "" if no recognised flash.
The router sets `?flash=<kind>&code=<slug>` after a state-changing action
redirects. `code` is mapped here to a fixed human-readable message so the
message text never round-trips through user-controlled URLs (avoiding both
injection and the need for URL decoding on input).
Recognised codes:
job_retried, job_cancelled, job_deleted,
workflow_cancelled,
cron_triggered, cron_paused, cron_resumed, cron_deleted,
dl_retried, dl_deleted, dl_all_retried, dl_all_deleted,
action_failedRenders a full HTML page with the shared nav injected.
Pagination links.
Render a DateTime as a relative-time span (e.g. "3m ago"), with the absolute timestamp as the title attribute. Falls back to the absolute timestamp text when the DateTime is in the future.
Like relative_time/1 but accepts an Option(DateTime) and renders "—" when the value is None. Useful for nullable last_run/next_run/completed_at columns.
Badge for job/workflow status.
Renders a <table> with a header row and data rows.
When `rows` is empty, renders a single placeholder row spanning every column
with a generic "No records." empty-state message. Use `table_with_empty/3`
to provide a custom empty-state message tailored to the page.Like table/2, but lets the caller specify the empty-state message shown when rows is empty (e.g. "No jobs in this queue yet.").