diff --git a/lib/livebook/session.ex b/lib/livebook/session.ex index 058914aad..56a09c252 100644 --- a/lib/livebook/session.ex +++ b/lib/livebook/session.ex @@ -26,6 +26,7 @@ defmodule Livebook.Session do @type summary :: %{ session_id: id(), + pid: pid(), notebook_name: String.t(), path: String.t() | nil, images_dir: String.t() @@ -504,6 +505,7 @@ defmodule Livebook.Session do defp summary_from_state(state) do %{ session_id: state.session_id, + pid: self(), notebook_name: state.data.notebook.name, path: state.data.path, images_dir: images_dir_from_state(state) diff --git a/lib/livebook_web/live/home_live/sessions_component.ex b/lib/livebook_web/live/home_live/sessions_component.ex index cae6f82e3..3d9a84f12 100644 --- a/lib/livebook_web/live/home_live/sessions_component.ex +++ b/lib/livebook_web/live/home_live/sessions_component.ex @@ -26,6 +26,12 @@ defmodule LivebookWeb.SessionLive.SessionsComponent do <%= remix_icon("git-branch-line") %> Fork + <%= link to: Routes.live_dashboard_path(@socket, :page, node(), "processes", info: Phoenix.LiveDashboard.Helpers.encode_pid(summary.pid)), + class: "flex space-x-3 px-5 py-2 items-center text-gray-600 hover:bg-gray-50", + target: "_blank" do %> + <%= remix_icon("dashboard-2-line") %> + See on Dashboard + <% end %> <%= live_patch to: Routes.home_path(@socket, :close_session, summary.session_id), class: "flex space-x-3 px-5 py-2 items-center text-red-600 hover:bg-gray-50" do %> <%= remix_icon("close-circle-line") %>