diff --git a/lib/towerops/trace.ex b/lib/towerops/trace.ex index 97c0a8c9..df140eea 100644 --- a/lib/towerops/trace.ex +++ b/lib/towerops/trace.ex @@ -331,8 +331,8 @@ defmodule Towerops.Trace do ConfigChangeEvent |> where(device_id: ^device_id) - |> where([c], c.detected_at >= ^since) - |> order_by(desc: :detected_at) + |> where([c], c.changed_at >= ^since) + |> order_by(desc: :changed_at) |> limit(10) |> Repo.all() end diff --git a/lib/towerops_web/live/trace_live/index.html.heex b/lib/towerops_web/live/trace_live/index.html.heex index 2edccbb0..0b8a7499 100644 --- a/lib/towerops_web/live/trace_live/index.html.heex +++ b/lib/towerops_web/live/trace_live/index.html.heex @@ -437,7 +437,7 @@ {Map.get(change, :changed_sections, []) |> Enum.join(", ")} - {format_relative_time(change.detected_at)} + {format_relative_time(change.changed_at)}