Bandera.Dashboard.Components (bandera v0.5.0)

Copy Markdown View Source

Function components for the Bandera dashboard.

Summary

Functions

Renders the gate editor panel for a flag. Event handlers live in FlagsLive.

Renders a stale hint icon with age for a flag known to be stale.

Renders a human-readable summary of a flag's active gates.

Renders the dashboard's self-contained, prefixed stylesheet as a <style> block. In :daisyui theme it renders nothing — the host app supplies the styles via its own daisyUI build.

Renders an amber warning banner when Bandera.Usage is not running.

Functions

flag_editor(assigns)

@spec flag_editor(map()) :: Phoenix.LiveView.Rendered.t()

Renders the gate editor panel for a flag. Event handlers live in FlagsLive.

Attributes

  • flag (:map) (required)
  • theme (:atom) - Defaults to :standalone.
  • actor_drafts (:map) - Defaults to %{}.
  • group_drafts (:map) - Defaults to %{}.
  • all_flags (:list) - Defaults to [].

similarity_warning(assigns)

@spec similarity_warning(map()) :: Phoenix.LiveView.Rendered.t()

Attributes

  • pairs (:list) (required)
  • theme (:atom) - Defaults to :standalone.

stale_indicator(assigns)

@spec stale_indicator(map()) :: Phoenix.LiveView.Rendered.t()

Renders a stale hint icon with age for a flag known to be stale.

Attributes

  • flag_name (:atom) (required)
  • theme (:atom) - Defaults to :standalone.

state_summary(assigns)

@spec state_summary(map()) :: Phoenix.LiveView.Rendered.t()

Renders a human-readable summary of a flag's active gates.

Attributes

  • flag (:map) (required)
  • theme (:atom) - Defaults to :standalone.

styles(assigns)

@spec styles(map()) :: Phoenix.LiveView.Rendered.t()

Renders the dashboard's self-contained, prefixed stylesheet as a <style> block. In :daisyui theme it renders nothing — the host app supplies the styles via its own daisyUI build.

Attributes

  • theme (:atom) - Defaults to :standalone.

usage_warning(assigns)

@spec usage_warning(map()) :: Phoenix.LiveView.Rendered.t()

Renders an amber warning banner when Bandera.Usage is not running.

Attributes

  • theme (:atom) - Defaults to :standalone.