From fb2d4b9b1a823b9474122c3c2523beee3bb8dc94 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Mon, 11 May 2026 16:20:35 -0500 Subject: [PATCH] fix(gaiia): correct Interface MAC field name, relabel auto-match button - Interface MAC field is `if_phys_address`, not `mac_address` - Button now says "Auto-Match All" since it matches by MAC, IP, and site --- lib/towerops/gaiia.ex | 4 ++-- lib/towerops_web/live/org/gaiia_reconciliation_live.html.heex | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/towerops/gaiia.ex b/lib/towerops/gaiia.ex index d1ccdeab..c71b9c36 100644 --- a/lib/towerops/gaiia.ex +++ b/lib/towerops/gaiia.ex @@ -264,8 +264,8 @@ defmodule Towerops.Gaiia do |> join(:inner, [si], sd in SnmpDevice, on: si.snmp_device_id == sd.id) |> join(:inner, [_si, sd], d in Device, on: sd.device_id == d.id) |> where([_si, _sd, d], d.organization_id == ^organization_id) - |> where([si], not is_nil(si.mac_address) and si.mac_address != "") - |> select([si, sd], {sd.device_id, si.mac_address}) + |> where([si], not is_nil(si.if_phys_address) and si.if_phys_address != "") + |> select([si, sd], {sd.device_id, si.if_phys_address}) |> Repo.all() |> Enum.group_by(fn {device_id, _mac} -> device_id end, fn {_device_id, mac} -> normalize_mac(mac) end) end diff --git a/lib/towerops_web/live/org/gaiia_reconciliation_live.html.heex b/lib/towerops_web/live/org/gaiia_reconciliation_live.html.heex index 953c6114..c89856e5 100644 --- a/lib/towerops_web/live/org/gaiia_reconciliation_live.html.heex +++ b/lib/towerops_web/live/org/gaiia_reconciliation_live.html.heex @@ -139,10 +139,10 @@ class="inline-flex items-center gap-1.5 rounded-lg bg-indigo-600 px-4 py-2 text-sm font-medium text-white hover:bg-indigo-700" > <.icon name="hero-bolt" class="h-4 w-4" /> - {t("Auto-Match by IP")} + {t("Auto-Match All")} - {t("Links devices to Gaiia items with matching IP addresses.")} + {t("Links by MAC, IP, or site assignment.")}