diff --git a/lib/phoenix/live_dashboard/pages/ecto_stats_page.ex b/lib/phoenix/live_dashboard/pages/ecto_stats_page.ex index 9135ac18..f87bd8c6 100644 --- a/lib/phoenix/live_dashboard/pages/ecto_stats_page.ex +++ b/lib/phoenix/live_dashboard/pages/ecto_stats_page.ex @@ -3,7 +3,7 @@ defmodule Phoenix.LiveDashboard.EctoStatsPage do use Phoenix.LiveDashboard.PageBuilder import Phoenix.LiveDashboard.Helpers - @compile {:no_warn_undefined, [Decimal, EctoPSQLExtras, {Ecto.Repo, :all_running, 0}]} + @compile {:no_warn_undefined, [Decimal, Duration, EctoPSQLExtras, {Ecto.Repo, :all_running, 0}]} @disabled_link "https://hexdocs.pm/phoenix_live_dashboard/ecto_stats.html" @page_title "Ecto Stats" @@ -277,7 +277,7 @@ defmodule Phoenix.LiveDashboard.EctoStatsPage do {sorted, length(rows)} end - defp format(_, %struct{} = value) when struct in [Decimal, Postgrex.Interval], + defp format(_, %struct{} = value) when struct in [Decimal, Duration, Postgrex.Interval], do: struct.to_string(value) defp format(:bytes, value) when is_integer(value),