Current section

43 Versions

Jump to

Compare versions

9 files changed
+51 additions
-39 deletions
  @@ -1,5 +1,9 @@
1 1 # CHANGELOG
2 2
3 + ## v0.7.2 (2022-10-26)
4 +
5 + * Support Phoenix.LiveView 0.18.3
6 +
3 7 ## v0.7.1 (2022-10-13)
4 8
5 9 * Support distribution metrics
unknowndist/css/app.css
File is too large to be displayed (100 KB limit).
  @@ -32,11 +32,10 @@
32 32 <<"lib/phoenix/live_dashboard/components/nav_bar_component.ex">>,
33 33 <<"lib/phoenix/live_dashboard/components/card_component.ex">>,
34 34 <<"lib/phoenix/live_dashboard/components/chart_component.ex">>,
35 + <<"lib/phoenix/live_dashboard/layouts">>,
36 + <<"lib/phoenix/live_dashboard/layouts/dash.html.heex">>,
35 37 <<"lib/phoenix/live_dashboard/page_builder.ex">>,
36 38 <<"lib/phoenix/live_dashboard/helpers.ex">>,
37 - <<"lib/phoenix/live_dashboard/templates">>,
38 - <<"lib/phoenix/live_dashboard/templates/layout">>,
39 - <<"lib/phoenix/live_dashboard/templates/layout/dash.html.heex">>,
40 39 <<"lib/phoenix/live_dashboard/reingold_tilford.ex">>,
41 40 <<"lib/phoenix/live_dashboard/application.ex">>,
42 41 <<"lib/phoenix/live_dashboard/telemetry_listener.ex">>,
  @@ -68,7 +67,7 @@
68 67 {<<"name">>,<<"phoenix_live_view">>},
69 68 {<<"optional">>,false},
70 69 {<<"repository">>,<<"hexpm">>},
71 - {<<"requirement">>,<<"~> 0.18.0">>}],
70 + {<<"requirement">>,<<"~> 0.18.3">>}],
72 71 [{<<"app">>,<<"telemetry_metrics">>},
73 72 {<<"name">>,<<"telemetry_metrics">>},
74 73 {<<"optional">>,false},
  @@ -89,4 +88,4 @@
89 88 {<<"optional">>,true},
90 89 {<<"repository">>,<<"hexpm">>},
91 90 {<<"requirement">>,<<"~> 3.6.2 or ~> 3.7">>}]]}.
92 - {<<"version">>,<<"0.7.1">>}.
91 + {<<"version">>,<<"0.7.2">>}.
  @@ -26,7 +26,7 @@ defmodule Phoenix.LiveDashboard.PortInfoComponent do
26 26 <tr><td>Input</td><td><pre><%= format_bytes(@input) %></pre></td></tr>
27 27 <tr><td>Output</td><td><pre><%= format_bytes(@output) %></pre></td></tr>
28 28 <tr><td>OS pid</td><td><pre><%= @os_pid %></pre></td></tr>
29 - <tr><td>Links</td><td><pre><%= @links %></pre></td></tr>
29 + <tr><td>Links</td><td><pre><.info links={@links} /></pre></td></tr>
30 30 </tbody>
31 31 </table>
32 32 <% else %>
  @@ -69,4 +69,12 @@ defmodule Phoenix.LiveDashboard.PortInfoComponent do
69 69 do: val
70 70
71 71 defp format_info(_key, val, live_dashboard_path), do: format_value(val, live_dashboard_path)
72 +
73 + defp info(%{links: links} = assigns) when is_list(links) do
74 + ~H"""
75 + <%= for info <- @links do %><%= info %><% end %>
76 + """
77 + end
78 +
79 + defp info(%{links: _links} = assigns), do: ~H|<%= @links %>|
72 80 end
  @@ -1,6 +1,8 @@
1 1 defmodule Phoenix.LiveDashboard.LayoutView do
2 2 @moduledoc false
3 - use Phoenix.LiveDashboard.Web, :view
3 + use Phoenix.LiveDashboard.Web, :html
4 +
5 + embed_templates "layouts/*"
4 6
5 7 phoenix_path = Application.app_dir(:phoenix, "priv/static/phoenix.js")
6 8
  @@ -29,6 +31,8 @@ defmodule Phoenix.LiveDashboard.LayoutView do
29 31 @app_css File.read!(css_path)
30 32 def render("app.css", _), do: @app_css
31 33
34 + def render("dash.html", assigns), do: dash(assigns)
35 +
32 36 defp csp_nonce(conn, type) when type in [:script, :style, :img] do
33 37 csp_nonce_assign_key = conn.private.csp_nonce_assign_key[type]
34 38 conn.assigns[csp_nonce_assign_key]
Loading more files…