Bloccs.Web.Panels.Topology (bloccs_web v0.3.0)

Copy Markdown View Source

Panel 2 — the live network graph paired with an inspector.

The graph (Bloccs.Web.Components.Graph) shows node state, throughput, and packets moving along active edges. The side panel inspects either the whole network (setup + live totals) or a clicked node — its primitive (kind, ports, effects), live metrics, and the code that implements it (the author's pure_core / effect_shell plus any retry/idempotency/window policy). The contract fields are read defensively, so this works against any bloccs that predates them. Selection is the ?node= URL param (shareable).

Summary

Functions

The declared scopes/detail for one effect axis, from the node view's effect_detail (bloccs ≥ 0.8). db → its "table:action" scopes (read / insert / update / delete); http → allowed hosts + methods; time/random → their mode. Empty for older introspect views (graceful: just the axis chip).

Human one-liners for whichever primitive blocks a node declares (batch, join, rate, delay). Values may be Bloccs.Manifest.* structs, which do not implement Access, so they're read with Map.get/2, not bracket syntax.

Functions

effect_scopes(node, axis)

The declared scopes/detail for one effect axis, from the node view's effect_detail (bloccs ≥ 0.8). db → its "table:action" scopes (read / insert / update / delete); http → allowed hosts + methods; time/random → their mode. Empty for older introspect views (graceful: just the axis chip).

prim_config(config)

Human one-liners for whichever primitive blocks a node declares (batch, join, rate, delay). Values may be Bloccs.Manifest.* structs, which do not implement Access, so they're read with Map.get/2, not bracket syntax.

render(assigns)

Attributes

  • network (:any) (required)
  • base_path (:string) (required)
  • states (:map) - Defaults to %{}.
  • frame (:map) - Defaults to %{nodes: %{}, updated_at: nil}.
  • flow (:map) - Defaults to %{events: [], series: [], rate: 0}.
  • selected (:any) - Defaults to nil.