Bloccs.Web.Components.Graph (bloccs_web v0.3.0)

Copy Markdown View Source

The shared topology SVG: places one <.hex_glyph> per node and one bezier <path> per edge from a server-computed Bloccs.Web.Topology.Layout. Used by the topology panel (live node state + activity) and the coverage panel (reached/unreached overlay). Pure rendering — no data loading, no layout math.

Live extras (all optional, off by default so the coverage panel is unchanged):

  • states%{node_id => :idle|:running|:ok|:failed} drives the glyph colour
  • rates%{node_id => events/sec} shown under the label when > 0
  • active_edges — a MapSet of {from, to} that have recent flow; those edges animate (marching dashes)
  • link_base — when set, each node links to that node's filtered messages

Summary

Functions

graph(assigns)

Attributes

  • network (:any) (required)
  • states (:map) - Defaults to %{}.
  • rates (:map) - Defaults to %{}.
  • active_edges (:any) - Defaults to nil.
  • link_base (:string) - Defaults to nil.
  • selected (:any) - Defaults to nil.
  • titles (:map) - Defaults to %{}.
  • labels (:boolean) - Defaults to true.
  • reached_edges (:any) - Defaults to nil.