From 605f8c09ec740f1199f4295353546bfa359a63ca Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Wed, 21 Jan 2026 17:18:44 -0600 Subject: [PATCH] feat: add discovered sensors table to debug tab Display discovered sensors in a parsed table format showing type, description, OID, value with unit, and state description for state sensors. --- .../live/device_live/show.html.heex | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/lib/towerops_web/live/device_live/show.html.heex b/lib/towerops_web/live/device_live/show.html.heex index ccf78850..e05dcc0e 100644 --- a/lib/towerops_web/live/device_live/show.html.heex +++ b/lib/towerops_web/live/device_live/show.html.heex @@ -937,6 +937,67 @@ <% end %> + <%= if Map.get(@snmp_device.raw_discovery_data, "discovered_sensors") do %> +

+ Discovered Sensors +

+
+ + + + + + + + + + + + <%= for sensor <- Map.get(@snmp_device.raw_discovery_data, "discovered_sensors", []) do %> + + + + + + + + <% end %> + +
+ Type + + Description + + OID + + Value + + State +
+ {sensor["type"]} + + {sensor["descr"]} + + {sensor["oid"]} + + {sensor["value"]} + <%= if sensor["unit"] && sensor["unit"] != "" do %> + + {sensor["unit"]} + + <% end %> + + <%= if sensor["state_descr"] do %> + + {sensor["state_descr"]} + + <% else %> + - + <% end %> +
+
+ <% end %> +

Copyable Debug Data