Current section
43 Versions
Jump to
Current section
43 Versions
Compare versions
8
files changed
+52
additions
-43
deletions
| @@ -1,5 +1,11 @@ | |
| 1 1 | # CHANGELOG |
| 2 2 | |
| 3 | + ## v0.8.1 (2023-08-12) |
| 4 | + |
| 5 | + * Fix warnings on more recent Elixir versions |
| 6 | + * Fix OS Mon bug on Windows |
| 7 | + * Support custom `on_mount` callback |
| 8 | + |
| 3 9 | ## v0.8.0 (2023-05-30) |
| 4 10 | |
| 5 11 | * Support and require Phoenix.LiveView 0.19.0 |
| @@ -1,7 +1,12 @@ | |
| 1 | - {<<"app">>,<<"phoenix_live_dashboard">>}. |
| 2 | - {<<"build_tools">>,[<<"mix">>]}. |
| 1 | + {<<"links">>, |
| 2 | + [{<<"github">>, |
| 3 | + <<"https://github.com/phoenixframework/phoenix_live_dashboard">>}]}. |
| 4 | + {<<"name">>,<<"phoenix_live_dashboard">>}. |
| 5 | + {<<"version">>,<<"0.8.1">>}. |
| 3 6 | {<<"description">>,<<"Real-time performance dashboard for Phoenix">>}. |
| 4 7 | {<<"elixir">>,<<"~> 1.12">>}. |
| 8 | + {<<"app">>,<<"phoenix_live_dashboard">>}. |
| 9 | + {<<"licenses">>,[<<"MIT">>]}. |
| 5 10 | {<<"files">>, |
| 6 11 | [<<"dist">>,<<"dist/css">>,<<"dist/css/app.css">>,<<"dist/js">>, |
| 7 12 | <<"dist/js/app.js.map">>,<<"dist/js/app.js">>,<<"lib">>,<<"lib/phoenix">>, |
| @@ -49,45 +54,40 @@ | |
| 49 54 | <<"lib/phoenix/live_dashboard/pages/ports_page.ex">>, |
| 50 55 | <<"lib/phoenix/live_dashboard.ex">>,<<"CHANGELOG.md">>,<<"LICENSE.md">>, |
| 51 56 | <<"mix.exs">>,<<"README.md">>]}. |
| 52 | - {<<"licenses">>,[<<"MIT">>]}. |
| 53 | - {<<"links">>, |
| 54 | - [{<<"github">>, |
| 55 | - <<"https://github.com/phoenixframework/phoenix_live_dashboard">>}]}. |
| 56 | - {<<"name">>,<<"phoenix_live_dashboard">>}. |
| 57 57 | {<<"requirements">>, |
| 58 | - [[{<<"app">>,<<"mime">>}, |
| 59 | - {<<"name">>,<<"mime">>}, |
| 58 | + [[{<<"name">>,<<"mime">>}, |
| 59 | + {<<"app">>,<<"mime">>}, |
| 60 60 | {<<"optional">>,false}, |
| 61 | - {<<"repository">>,<<"hexpm">>}, |
| 62 | - {<<"requirement">>,<<"~> 1.6 or ~> 2.0">>}], |
| 63 | - [{<<"app">>,<<"phoenix_live_view">>}, |
| 64 | - {<<"name">>,<<"phoenix_live_view">>}, |
| 61 | + {<<"requirement">>,<<"~> 1.6 or ~> 2.0">>}, |
| 62 | + {<<"repository">>,<<"hexpm">>}], |
| 63 | + [{<<"name">>,<<"phoenix_live_view">>}, |
| 64 | + {<<"app">>,<<"phoenix_live_view">>}, |
| 65 65 | {<<"optional">>,false}, |
| 66 | - {<<"repository">>,<<"hexpm">>}, |
| 67 | - {<<"requirement">>,<<"~> 0.19.0">>}], |
| 68 | - [{<<"app">>,<<"telemetry_metrics">>}, |
| 69 | - {<<"name">>,<<"telemetry_metrics">>}, |
| 66 | + {<<"requirement">>,<<"~> 0.19.0">>}, |
| 67 | + {<<"repository">>,<<"hexpm">>}], |
| 68 | + [{<<"name">>,<<"telemetry_metrics">>}, |
| 69 | + {<<"app">>,<<"telemetry_metrics">>}, |
| 70 70 | {<<"optional">>,false}, |
| 71 | - {<<"repository">>,<<"hexpm">>}, |
| 72 | - {<<"requirement">>,<<"~> 0.6 or ~> 1.0">>}], |
| 73 | - [{<<"app">>,<<"ecto_psql_extras">>}, |
| 74 | - {<<"name">>,<<"ecto_psql_extras">>}, |
| 71 | + {<<"requirement">>,<<"~> 0.6 or ~> 1.0">>}, |
| 72 | + {<<"repository">>,<<"hexpm">>}], |
| 73 | + [{<<"name">>,<<"ecto_psql_extras">>}, |
| 74 | + {<<"app">>,<<"ecto_psql_extras">>}, |
| 75 75 | {<<"optional">>,true}, |
| 76 | - {<<"repository">>,<<"hexpm">>}, |
| 77 | - {<<"requirement">>,<<"~> 0.7">>}], |
| 78 | - [{<<"app">>,<<"ecto_mysql_extras">>}, |
| 79 | - {<<"name">>,<<"ecto_mysql_extras">>}, |
| 76 | + {<<"requirement">>,<<"~> 0.7">>}, |
| 77 | + {<<"repository">>,<<"hexpm">>}], |
| 78 | + [{<<"name">>,<<"ecto_mysql_extras">>}, |
| 79 | + {<<"app">>,<<"ecto_mysql_extras">>}, |
| 80 80 | {<<"optional">>,true}, |
| 81 | - {<<"repository">>,<<"hexpm">>}, |
| 82 | - {<<"requirement">>,<<"~> 0.5">>}], |
| 83 | - [{<<"app">>,<<"ecto_sqlite3_extras">>}, |
| 84 | - {<<"name">>,<<"ecto_sqlite3_extras">>}, |
| 81 | + {<<"requirement">>,<<"~> 0.5">>}, |
| 82 | + {<<"repository">>,<<"hexpm">>}], |
| 83 | + [{<<"name">>,<<"ecto_sqlite3_extras">>}, |
| 84 | + {<<"app">>,<<"ecto_sqlite3_extras">>}, |
| 85 85 | {<<"optional">>,true}, |
| 86 | - {<<"repository">>,<<"hexpm">>}, |
| 87 | - {<<"requirement">>,<<"~> 1.1.7">>}], |
| 88 | - [{<<"app">>,<<"ecto">>}, |
| 89 | - {<<"name">>,<<"ecto">>}, |
| 86 | + {<<"requirement">>,<<"~> 1.1.7 or ~> 1.2.0">>}, |
| 87 | + {<<"repository">>,<<"hexpm">>}], |
| 88 | + [{<<"name">>,<<"ecto">>}, |
| 89 | + {<<"app">>,<<"ecto">>}, |
| 90 90 | {<<"optional">>,true}, |
| 91 | - {<<"repository">>,<<"hexpm">>}, |
| 92 | - {<<"requirement">>,<<"~> 3.6.2 or ~> 3.7">>}]]}. |
| 93 | - {<<"version">>,<<"0.8.0">>}. |
| 91 | + {<<"requirement">>,<<"~> 3.6.2 or ~> 3.7">>}, |
| 92 | + {<<"repository">>,<<"hexpm">>}]]}. |
| 93 | + {<<"build_tools">>,[<<"mix">>]}. |
| @@ -267,7 +267,7 @@ defmodule Phoenix.LiveDashboard.TableComponent do | |
| 267 267 | end |
| 268 268 | |
| 269 269 | defp column_header(column) do |
| 270 | - column[:header] || column.field |> to_string() |> String.capitalize() |
| 270 | + column[:header] || column.field |> to_string() |> :string.titlecase() |
| 271 271 | end |
| 272 272 | |
| 273 273 | defp sort_link_icon(assigns) do |
| @@ -175,7 +175,7 @@ defmodule Phoenix.LiveDashboard.PageLive do | |
| 175 175 | |
| 176 176 | defp dashboard_mount_path(socket, url, params) do |
| 177 177 | %{path: path} = URI.parse(url) |
| 178 | - range = if params["node"], do: 0..-3, else: 0..-2 |
| 178 | + range = if params["node"], do: 0..-3//1, else: 0..-2//1 |
| 179 179 | |
| 180 180 | mount_path = path |> String.split("/", trim: true) |> Enum.slice(range) |> Enum.join("/") |
| 181 181 | mount_path = "/" <> mount_path |
| @@ -61,6 +61,8 @@ defmodule Phoenix.LiveDashboard.OSMonPage do | |
| 61 61 | defp calculate_cpu_data(_), do: nil |
| 62 62 | |
| 63 63 | defp rup(value), do: Float.ceil(value / 256, 2) |
| 64 | + |
| 65 | + defp rup_avg(_value, 0), do: 0 |
| 64 66 | defp rup_avg(value, count), do: Float.ceil(value / 256 / count, 2) |
| 65 67 | |
| 66 68 | defp calculate_memory_usage(system_memory) do |
Loading more files…