AgentDbWeb.Admin (agent_db v0.1.0)

Copy Markdown View Source

The shared behavior of a console page.

The console is several pages, but it is one console: every page reaches the store through AgentDbWeb.Context, and every page that shows live state follows the same lifecycle -- subscribe to the tree root on connect, coalesce bursts of change events, keep a periodic refresh as a fallback, and reload the page's own sections. That lifecycle lives here once, so it cannot drift between pages.

A page does use AgentDbWeb.Admin, sets @admin_page to the nav entry it belongs to, and implements load/1 (its live sections), render/1, and any handle_event/3 clauses its forms need. mount/3, handle_params/3, and handle_info/2 are provided and overridable.

Summary

Functions

handle_event(binary, params, socket)