defmodule LivebookWeb.SessionLive.StandaloneRuntimeComponent do use LivebookWeb, :live_component alias Livebook.{Session, Runtime} @impl true def mount(socket) do unless Livebook.Config.runtime_enabled?(Livebook.Runtime.Standalone) do raise "runtime module not allowed" end {:ok, socket} end @impl true def render(assigns) do ~H"""
Start a new local Elixir node to evaluate code. Whenever you reconnect this runtime, a fresh node is started.
<.button phx-click="init" phx-target={@myself} disabled={@runtime_status == :connecting}> <%= label(@runtime, @runtime_status) %>