Current section
43 Versions
Jump to
Current section
43 Versions
Compare versions
21
files changed
+671
additions
-126
deletions
| @@ -1,5 +1,10 @@ | |
| 1 1 | # CHANGELOG |
| 2 2 | |
| 3 | + ## v0.2.1 (2020-04-29) |
| 4 | + |
| 5 | + * Add "Applications" page |
| 6 | + * Add "OS Data" page |
| 7 | + |
| 3 8 | ## v0.2.0 (2020-04-22) |
| 4 9 | |
| 5 10 | * Add "Ports" page |
| @@ -8,17 +8,21 @@ LiveDashboard provides real-time performance monitoring and debugging tools for | |
| 8 8 | |
| 9 9 | * Home - See general information about the system |
| 10 10 | |
| 11 | + * OS Data - See general information about OS, such as CPU, Memory and Disk usage |
| 12 | + |
| 11 13 | * Metrics - See how your application performs under different conditions by visualizing [`:telemetry`](https://hexdocs.pm/telemetry) events with real-time charts |
| 12 14 | |
| 13 15 | * Request logging - See everything that was logged for certain requests |
| 14 16 | |
| 15 | - * Processes - See, filter, and search processes in your application |
| 17 | + * Applications - See, filter, and search applications in the current node |
| 16 18 | |
| 17 | - * Ports - See, filter, and search ports (responsible for I/O) in your application |
| 19 | + * Processes - See, filter, and search processes in the current node |
| 18 20 | |
| 19 | - * Sockets - See, filter, and search sockets (responsible for tcp/udp) in your application |
| 21 | + * Ports - See, filter, and search ports (responsible for I/O) in the current node |
| 20 22 | |
| 21 | - * ETS - See, filter, and search ETS tables (in-memory storage) in your application |
| 23 | + * Sockets - See, filter, and search sockets (responsible for tcp/udp) in the current node |
| 24 | + |
| 25 | + * ETS - See, filter, and search ETS tables (in-memory storage) in the current node |
| 22 26 | |
| 23 27 | The dashboard also works across nodes. If your nodes are connected via Distributed Erlang, then you can access information from node B while accessing the dashboard on node A. |
| 24 28 | |
| @@ -109,17 +113,24 @@ scope "/" do | |
| 109 113 | end |
| 110 114 | ``` |
| 111 115 | |
| 116 | + If you are running your application behind a proxy or a webserver, you also have to make sure they are configured for allowing WebSocket upgrades. For example, [here is an article](https://dennisreimann.de/articles/phoenix-nginx-config.html) on how to configure Nginx with Phoenix and WebSockets. |
| 117 | + |
| 118 | + Finally, you will also want to configure your `config/prod.exs` and use your domain name under the `check_origin` configuration: |
| 119 | + |
| 120 | + check_origin: ["//myapp.com"] |
| 121 | + |
| 122 | + Then you should be good to go! |
| 123 | + |
| 112 124 | <!-- MDOC !--> |
| 113 125 | |
| 114 126 | ## Contributing |
| 115 127 | |
| 116 128 | For those planning to contribute to this project, you can run a dev version of the dashboard with the following commands: |
| 117 129 | |
| 118 | - $ mix deps.get |
| 119 | - $ npm install --prefix assets |
| 120 | - $ mix run --no-halt dev.exs |
| 130 | + $ mix setup |
| 131 | + $ mix dev |
| 121 132 | |
| 122 | - Alternatively, run `iex -S mix run dev.exs` if you also want a shell. |
| 133 | + Alternatively, run `iex -S mix dev` if you also want a shell. |
| 123 134 | |
| 124 135 | ## License |
| @@ -16,16 +16,21 @@ | |
| 16 16 | <<"lib/phoenix/live_dashboard/live/menu_live.ex">>, |
| 17 17 | <<"lib/phoenix/live_dashboard/live/modal_component.ex">>, |
| 18 18 | <<"lib/phoenix/live_dashboard/live/home_live.ex">>, |
| 19 | + <<"lib/phoenix/live_dashboard/live/os_mon_live.ex">>, |
| 19 20 | <<"lib/phoenix/live_dashboard/live/sockets_live.ex">>, |
| 20 21 | <<"lib/phoenix/live_dashboard/live/.DS_Store">>, |
| 21 22 | <<"lib/phoenix/live_dashboard/live/ports_live.ex">>, |
| 23 | + <<"lib/phoenix/live_dashboard/live/bar_component.ex">>, |
| 24 | + <<"lib/phoenix/live_dashboard/live/applications_live.ex">>, |
| 22 25 | <<"lib/phoenix/live_dashboard/live/process_info_component.ex">>, |
| 23 26 | <<"lib/phoenix/live_dashboard/live/socket_info_component.ex">>, |
| 27 | + <<"lib/phoenix/live_dashboard/live/color_bar_component.ex">>, |
| 24 28 | <<"lib/phoenix/live_dashboard/live/ets_live.ex">>, |
| 25 29 | <<"lib/phoenix/live_dashboard/live/port_info_component.ex">>, |
| 26 30 | <<"lib/phoenix/live_dashboard/live/processes_live.ex">>, |
| 27 31 | <<"lib/phoenix/live_dashboard/live/request_logger_live.ex">>, |
| 28 32 | <<"lib/phoenix/live_dashboard/live/system_limit_component.ex">>, |
| 33 | + <<"lib/phoenix/live_dashboard/live/color_bar_legend_component.ex">>, |
| 29 34 | <<"lib/phoenix/live_dashboard/live/ets_info_component.ex">>, |
| 30 35 | <<"lib/phoenix/live_dashboard/live/chart_component.ex">>, |
| 31 36 | <<"lib/phoenix/live_dashboard/live/metrics_live.ex">>, |
| @@ -64,4 +69,4 @@ | |
| 64 69 | {<<"optional">>,false}, |
| 65 70 | {<<"repository">>,<<"hexpm">>}, |
| 66 71 | {<<"requirement">>,<<"~> 2.14.1 or ~> 2.15">>}]]}. |
| 67 | - {<<"version">>,<<"0.2.0">>}. |
| 72 | + {<<"version">>,<<"0.2.1">>}. |
| @@ -26,6 +26,7 @@ defmodule Phoenix.LiveDashboard.LiveHelpers do | |
| 26 26 | action: socket.assigns.live_action, |
| 27 27 | node: found_node || node(), |
| 28 28 | metrics: session["metrics"], |
| 29 | + os_mon: Application.get_application(:os_mon), |
| 29 30 | request_logger: session["request_logger"] |
| 30 31 | }) |
| @@ -2,7 +2,6 @@ defmodule Phoenix.LiveDashboard.TableHelpers do | |
| 2 2 | # Helpers for pages that need to render tables |
| 3 3 | @moduledoc false |
| 4 4 | |
| 5 | - import Phoenix.HTML |
| 6 5 | import Phoenix.LiveView |
| 7 6 | import Phoenix.LiveView.Helpers |
| 8 7 | import Phoenix.LiveDashboard.LiveHelpers |
| @@ -10,9 +9,9 @@ defmodule Phoenix.LiveDashboard.TableHelpers do | |
| 10 9 | @limit ~w(50 100 500 1000 5000) |
| 11 10 | @sort_dir ~w(desc asc) |
| 12 11 | |
| 13 | - def assign_params(socket, params, sort_by) do |
| 12 | + def assign_params(socket, params, sort_by, sort_dir \\ @sort_dir) do |
| 14 13 | sort_by = params |> get_in_or_first("sort_by", sort_by) |> String.to_atom() |
| 15 | - sort_dir = params |> get_in_or_first("sort_dir", @sort_dir) |> String.to_atom() |
| 14 | + sort_dir = params |> get_in_or_first("sort_dir", sort_dir) |> String.to_atom() |
| 16 15 | limit = params |> get_in_or_first("limit", @limit) |> String.to_integer() |
| 17 16 | search = params["search"] |
| 18 17 | search = if search == "", do: nil, else: search |
| @@ -51,19 +50,21 @@ defmodule Phoenix.LiveDashboard.TableHelpers do | |
| 51 50 | end |
| 52 51 | |
| 53 52 | defp sort_link_icon(:asc) do |
| 54 | - ~E""" |
| 55 | - <div class="dash-table-icon"> |
| 56 | - <span class="icon-sort icon-asc"></span> |
| 57 | - </div> |
| 58 | - """ |
| 53 | + {:safe, |
| 54 | + """ |
| 55 | + <div class="dash-table-icon"> |
| 56 | + <span class="icon-sort icon-asc"></span> |
| 57 | + </div> |
| 58 | + """} |
| 59 59 | end |
| 60 60 | |
| 61 61 | defp sort_link_icon(:desc) do |
| 62 | - ~E""" |
| 63 | - <div class="dash-table-icon"> |
| 64 | - <span class="icon-sort icon-desc"></span> |
| 65 | - </div> |
| 66 | - """ |
| 62 | + {:safe, |
| 63 | + """ |
| 64 | + <div class="dash-table-icon"> |
| 65 | + <span class="icon-sort icon-desc"></span> |
| 66 | + </div> |
| 67 | + """} |
| 67 68 | end |
| 68 69 | |
| 69 70 | defp opposite_sort_dir(%{sort_dir: :desc}), do: :asc |
Loading more files…