BeamConsoleWeb.Console.Params (beam_console v0.3.0)

Copy Markdown View Source

Normalizes bounded URL state for every BeamConsole dashboard tab.

Client strings are matched against fixed allowlists and are never converted into atoms.

Summary

Functions

Returns safe URL state for a trusted router live action.

Returns only URL parameters relevant to the normalized active tab.

Returns the normalized chart window in milliseconds.

Types

t()

@type t() :: %BeamConsoleWeb.Console.Params{
  edges: String.t(),
  kind: String.t(),
  query: String.t(),
  selected_id: String.t() | nil,
  tab: tab(),
  window: String.t()
}

tab()

@type tab() :: :process_map | :lifecycle | :activity | :runtime

Functions

normalize(params, live_action)

@spec normalize(map(), atom()) :: t()

Returns safe URL state for a trusted router live action.

query_params(params)

@spec query_params(t()) :: map()

Returns only URL parameters relevant to the normalized active tab.

window_ms(params)

@spec window_ms(t()) :: pos_integer()

Returns the normalized chart window in milliseconds.