diff --git a/lib/phoenix/live_dashboard/info/socket_info_component.ex b/lib/phoenix/live_dashboard/info/socket_info_component.ex index d36de0c0..267cabad 100644 --- a/lib/phoenix/live_dashboard/info/socket_info_component.ex +++ b/lib/phoenix/live_dashboard/info/socket_info_component.ex @@ -49,7 +49,7 @@ defmodule Phoenix.LiveDashboard.SocketInfoComponent do end defp assign_info(%{assigns: assigns} = socket) do - case SystemInfo.fetch_socket_info(assigns.port, @info_keys) do + case SystemInfo.fetch_socket_info(assigns.port) do {:ok, info} -> Enum.reduce(info, socket, fn {key, val}, acc -> assign(acc, key, format_info(key, val, assigns.path)) diff --git a/lib/phoenix/live_dashboard/system_info.ex b/lib/phoenix/live_dashboard/system_info.ex index 0295f1a1..b5bca34a 100644 --- a/lib/phoenix/live_dashboard/system_info.ex +++ b/lib/phoenix/live_dashboard/system_info.ex @@ -47,8 +47,8 @@ defmodule Phoenix.LiveDashboard.SystemInfo do :rpc.call(node, __MODULE__, :sockets_callback, [search, sort_by, sort_dir, limit]) end - def fetch_socket_info(port, keys) do - :rpc.call(node(port), __MODULE__, :socket_info_callback, [port, keys]) + def fetch_socket_info(port) do + :rpc.call(node(port), __MODULE__, :socket_info_callback, [port]) end def fetch_process_info(pid) do diff --git a/test/phoenix/live_dashboard/pages/sockets_page_test.exs b/test/phoenix/live_dashboard/pages/sockets_page_test.exs index 07d1f982..b6e9dd90 100644 --- a/test/phoenix/live_dashboard/pages/sockets_page_test.exs +++ b/test/phoenix/live_dashboard/pages/sockets_page_test.exs @@ -78,11 +78,11 @@ defmodule Phoenix.LiveDashboard.SocketsPageTest do {:ok, live, _} = live(build_conn(), socket_info_path(socket, 50, :send_oct, :asc)) rendered = render(live) assert rendered =~ sockets_href(50, "", :send_oct, :asc) - assert rendered =~ "modal-content" assert rendered =~ ~r/Local Address.*#{address}/s - refute live |> element("#modal .close") |> render_click() =~ "modal" + rendered = live |> element("#modal .close") |> render_click() + refute rendered =~ "modal" return_path = sockets_path(50, "", :send_oct, :asc) assert_patch(live, return_path) end @@ -93,7 +93,7 @@ defmodule Phoenix.LiveDashboard.SocketsPageTest do defp socket_info_path(port, limit, sort_by, sort_dir) do sockets_path(limit, "", sort_by, sort_dir) <> - "&info=#{Phoenix.LiveDashboard.Helpers.encode_port(port)}" + "&info=#{Phoenix.LiveDashboard.Helpers.encode_socket(port)}" end defp sockets_path(limit, search, sort_by, sort_dir) do