BeamConsoleWeb.Console.LifecyclePresenter (beam_console v0.5.2)

Copy Markdown View Source

Builds bounded lifecycle timeline rows and recorder status labels.

Summary

Functions

Returns concise operator-facing recorder activity text.

Counts view omissions plus lifecycle changes represented by retained gap events.

Returns bounded recorder query options for normalized lifecycle URL state.

Converts a bounded recorder query into newest-first scalar timeline rows.

Types

row()

@type row() :: %{
  id: String.t(),
  kind: atom(),
  kind_label: String.t(),
  label: String.t(),
  entity_id: String.t() | nil,
  observed_at: String.t(),
  observed_at_iso: String.t(),
  evidence: String.t(),
  certainty: String.t(),
  reason: String.t() | nil
}

Functions

activity_label(status)

@spec activity_label(BeamConsole.Recorder.Status.t()) :: String.t()

Returns concise operator-facing recorder activity text.

omitted_count(query)

@spec omitted_count(BeamConsole.Recorder.Query.t()) :: non_neg_integer()

Counts view omissions plus lifecycle changes represented by retained gap events.

query_options(params)

@spec query_options(BeamConsoleWeb.Console.Params.t()) :: keyword()

Returns bounded recorder query options for normalized lifecycle URL state.

rows(query, search_query \\ "")

@spec rows(BeamConsole.Recorder.Query.t(), String.t()) :: [row()]

Converts a bounded recorder query into newest-first scalar timeline rows.