From 788004cb973fd3797cbaf6a6e1dc4767dcd71e03 Mon Sep 17 00:00:00 2001
From: Graham McIntire
Date: Sun, 25 Jan 2026 11:04:29 -0600
Subject: [PATCH] fix: handle :global agent source in device form template
Production was crashing with CaseClauseError when viewing device edit
form for devices using the global default cloud poller.
Added missing :global case branch to the agent source case statement
in form.html.heex line 127.
Displays: 'Using global default cloud poller: '
---
lib/towerops_web/live/device_live/form.html.heex | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/towerops_web/live/device_live/form.html.heex b/lib/towerops_web/live/device_live/form.html.heex
index ac7b6aff..99ae66ad 100644
--- a/lib/towerops_web/live/device_live/form.html.heex
+++ b/lib/towerops_web/live/device_live/form.html.heex
@@ -141,6 +141,11 @@
<.icon name="hero-building-office-2" class="h-4 w-4" />
Inherited from organization: {@effective_agent_name}
+ <% :global -> %>
+
+ <.icon name="hero-globe-alt" class="h-4 w-4" />
+ Using global default cloud poller: {@effective_agent_name}
+
<% :none -> %>
<.icon name="hero-cloud" class="h-4 w-4" /> No agent assigned - cloud polling