BeamConsoleWeb.Console.DashboardPresenter (beam_console v0.2.0)

Copy Markdown View Source

Transforms one transient runtime snapshot into bounded dashboard view models.

Summary

Functions

Returns started applications in deterministic display order.

Returns local and connected nodes in deterministic display order.

Returns sorted process rows plus exact matching and omission counts.

Returns a bounded selected-entity view model without retaining the snapshot.

Checks whether an opaque entity ID belongs to the latest snapshot.

Types

process_result()

@type process_result() :: %{
  items: [BeamConsole.ProcessInfo.t()],
  matching_count: non_neg_integer(),
  omitted_count: non_neg_integer()
}

Functions

applications(snapshot)

Returns started applications in deterministic display order.

nodes(snapshot)

Returns local and connected nodes in deterministic display order.

process_result(snapshot, query, limit)

@spec process_result(BeamConsole.Snapshot.t(), String.t(), pos_integer()) ::
  process_result()

Returns sorted process rows plus exact matching and omission counts.

selection(snapshot, selected_id)

@spec selection(BeamConsole.Snapshot.t(), String.t() | nil) :: map() | nil

Returns a bounded selected-entity view model without retaining the snapshot.

valid_selection?(snapshot, entity_id)

@spec valid_selection?(BeamConsole.Snapshot.t() | nil, String.t()) :: boolean()

Checks whether an opaque entity ID belongs to the latest snapshot.