diff --git a/lib/towerops/workers/gaiia_insight_worker.ex b/lib/towerops/workers/gaiia_insight_worker.ex index f26fef1e..1392f3a2 100644 --- a/lib/towerops/workers/gaiia_insight_worker.ex +++ b/lib/towerops/workers/gaiia_insight_worker.ex @@ -49,6 +49,7 @@ defmodule Towerops.Workers.GaiiaInsightWorker do "dedup_key" => "untracked", "finding_type" => "untracked", "count" => count, + "device_ids" => untracked_devices |> Enum.map(& &1.device.id), "device_names" => untracked_devices |> Enum.take(10) |> Enum.map(& &1.device.name) } }) @@ -97,7 +98,13 @@ defmodule Towerops.Workers.GaiiaInsightWorker do metadata: %{ "dedup_key" => "mismatch", "finding_type" => "mismatch", - "count" => count + "count" => count, + "device_ids" => data_mismatches |> Enum.map(& &1.device.id) |> Enum.uniq(), + "device_names" => + data_mismatches + |> Enum.map(& &1.device.name) + |> Enum.uniq() + |> Enum.take(10) } }) end diff --git a/lib/towerops_web/live/insights_live/index.html.heex b/lib/towerops_web/live/insights_live/index.html.heex index 6355375f..6466cd99 100644 --- a/lib/towerops_web/live/insights_live/index.html.heex +++ b/lib/towerops_web/live/insights_live/index.html.heex @@ -274,6 +274,36 @@
<% end %> + <%!-- Affected devices list (from metadata) --%> + <%= if insight.metadata["device_names"] && length(insight.metadata["device_names"]) > 0 do %> ++ Affected devices: +
+