ExAtlas.LiveDashboard.ComputePage (ExAtlas v0.5.0)

Copy Markdown View Source

Phoenix.LiveDashboard.PageBuilder page that lists the compute resources currently tracked by ExAtlas.Orchestrator and lets operators terminate them.

The page only compiles when the host app has :phoenix_live_dashboard in its dependency tree (guarded by Code.ensure_loaded?/1), so library users who don't run LiveDashboard pay nothing.

Wiring

Add :phoenix_live_dashboard and :ex_atlas to your Phoenix app's deps, then extend your existing live_dashboard route:

# lib/my_app_web/router.ex
import Phoenix.LiveDashboard.Router

scope "/" do
  pipe_through [:browser, :require_admin]

  live_dashboard "/dashboard",
    metrics: MyAppWeb.Telemetry,
    allow_destructive_actions: true,
    additional_pages: [
      atlas: ExAtlas.LiveDashboard.ComputePage
    ]
end

allow_destructive_actions: true is required for the Terminate/Stop buttons to render — mirrors the built-in "Kill process" convention.

Open /dashboard/atlas to see the table. The page needs the orchestrator supervision tree; enable it via config :ex_atlas, start_orchestrator: true.

What it shows

  • Every tracked compute resource (ExAtlas.Orchestrator.list_ids/0).
  • Provider, status, GPU type, cost/hour, last-activity age.
  • Per-row Touch, Stop, Terminate buttons.

Live updates

Auto-refresh is on (refresher?: true), so the table polls at the dashboard's configured interval. For sub-poll latency the page also subscribes to ExAtlas.PubSub when the socket connects.