Skip to content

Commit

Permalink
Duration.to_string (#464)
Browse files Browse the repository at this point in the history
See #458
  • Loading branch information
SteffenDE authored Dec 30, 2024
1 parent 46b14cb commit f8f60d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/phoenix/live_dashboard/pages/ecto_stats_page.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit f8f60d2

Please sign in to comment.