View Source Luminous.Dashboard (luminous v0.1.0)

A dashboard is a high-level component initialized by the dashboard live view

it contains all the necessary dashboard attributes such as the panels, variables and the time range selector

it is initialized at compile time using define/4 and populated at runtime using populate/1

Link to this section Summary

Functions

return the dashboard's default time range

initialize a dashboard at compile time

return the LV path for the specific dashboard based on its configuration

populate the dashboard's dynamic properties (e.g. variable values, time range etc.) at runtime

update the dashboard's current time range with a new one

update the dashboard's variables with a new list

Link to this section Types

@type t() :: %Luminous.Dashboard{
  action: atom(),
  panels: [Luminous.Panel.t()],
  path: (... -> binary()),
  time_range_selector: Luminous.TimeRangeSelector.t(),
  time_zone: binary(),
  title: binary(),
  variables: [Luminous.Variable.t()]
}

Link to this section Functions

Link to this function

default_time_range(dashboard)

View Source
@spec default_time_range(t()) :: Luminous.TimeRange.t()

return the dashboard's default time range

Link to this function

define(title, path, action, time_range_selector, opts \\ [])

View Source
@spec define(
  binary(),
  (... -> binary()),
  atom(),
  Luminous.TimeRangeSelector.t(),
  Keyword.t()
) :: t()

initialize a dashboard at compile time

Link to this function

path(dashboard, socket, params)

View Source
@spec path(t(), Phoenix.LiveView.Socket.t(), Keyword.t()) :: binary()

return the LV path for the specific dashboard based on its configuration

@spec populate(t()) :: t()

populate the dashboard's dynamic properties (e.g. variable values, time range etc.) at runtime

Link to this function

update_current_time_range(dashboard, time_range)

View Source
@spec update_current_time_range(t(), Luminous.TimeRange.t()) :: t()

update the dashboard's current time range with a new one

Link to this function

update_variables(dashboard, new_variables)

View Source
@spec update_variables(t(), [Luminous.Variable.t()]) :: t()

update the dashboard's variables with a new list