Packages

Multi-surface application runtime for Elixir. One TEA module renders to terminal, browser (LiveView), SSH, and MCP (agents). 30+ widgets, flexbox + CSS grid, AI agent runtime, distributed swarm with CRDTs, time-travel debugging, session recording, sandboxed REPL, and agentic commerce.

Current section

Files

Jump to
raxol lib raxol_web live monitoring_live.ex
Raw

lib/raxol_web/live/monitoring_live.ex

defmodule RaxolWeb.MonitoringLive do
use RaxolWeb, :live_view
alias Raxol.Metrics
@impl true
@dialyzer {:nowarn_function, mount: 3}
def mount(_params, _session, socket) do
if connected?(socket) do
_ = :timer.send_interval(5000, :update_metrics)
end
{:ok,
assign(socket,
metrics: Metrics.get_current_metrics(),
error: nil
)}
end
@impl true
def handle_info(:update_metrics, socket) do
{:noreply, assign(socket, metrics: Metrics.get_current_metrics())}
end
@impl true
def handle_event("refresh", _params, socket) do
{:noreply, assign(socket, metrics: Metrics.get_current_metrics())}
end
end