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: <agent_name>'
This commit is contained in:
Graham McIntire 2026-01-25 11:04:29 -06:00
parent 564caed3e5
commit 788004cb97
No known key found for this signature in database

View file

@ -141,6 +141,11 @@
<.icon name="hero-building-office-2" class="h-4 w-4" />
Inherited from organization: <strong>{@effective_agent_name}</strong>
</p>
<% :global -> %>
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400 flex items-center gap-1">
<.icon name="hero-globe-alt" class="h-4 w-4" />
Using global default cloud poller: <strong>{@effective_agent_name}</strong>
</p>
<% :none -> %>
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400 flex items-center gap-1">
<.icon name="hero-cloud" class="h-4 w-4" /> No agent assigned - cloud polling