PhoenixKitWeb.Live.Modules.Jobs.RunsComponents (phoenix_kit v2.52.2)

Copy Markdown View Source

The pieces of the Runs tab of the Jobs page: the state badge, the progress bar, the table of runs with the controls each may be offered, and the drawer of one run with its history (dev_docs/plans/2026-10-03-job-runs.md, §5).

Stateless: the LiveView passes the runs, the controls the viewer may use (PhoenixKit.Jobs.controls_for/2) and the people behind them.

Summary

Functions

The control buttons of a run: only those the viewer may use now.

How far a run is: a bar when the total is known, an indeterminate one while it runs, the counts either way.

One run in full: its facts, its error, and its history.

The runs, newest first, each with the controls the viewer may use.

The state of a run as a badge; a draining run says so.

Functions

controls(assigns)

The control buttons of a run: only those the viewer may use now.

Attributes

  • run (:map) (required)
  • available (:list) (required)

progress(assigns)

How far a run is: a bar when the total is known, an indeterminate one while it runs, the counts either way.

Attributes

  • run (:map) (required)

run_modal(assigns)

One run in full: its facts, its error, and its history.

Attributes

  • run (:map) (required)
  • history (:list) (required)
  • controls (:list) (required)
  • actors (:map) (required)

runs_table(assigns)

The runs, newest first, each with the controls the viewer may use.

Attributes

  • runs (:list) (required)
  • controls (:map) (required) - run uuid => the controls to offer.
  • actors (:map) (required) - user uuid => email.

state_badge(assigns)

The state of a run as a badge; a draining run says so.

Attributes

  • run (:map) (required)

state_label(other)