From d16f09666fd8f040f6ab1e62ea855f3e6017d5b8 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Wed, 4 Feb 2026 17:41:15 -0600 Subject: [PATCH] snmp v3 ui fixes --- lib/towerops_web/live/device_live/form.html.heex | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/towerops_web/live/device_live/form.html.heex b/lib/towerops_web/live/device_live/form.html.heex index 33e08239..d39dd45a 100644 --- a/lib/towerops_web/live/device_live/form.html.heex +++ b/lib/towerops_web/live/device_live/form.html.heex @@ -411,9 +411,10 @@ /> - <% # Determine current security level from device data - current_auth = @form.data.snmpv3_auth_protocol - current_priv = @form.data.snmpv3_priv_protocol + <% # Determine current security level from changeset (includes both data and changes) + changeset = @form.source + current_auth = Ecto.Changeset.get_field(changeset, :snmpv3_auth_protocol) + current_priv = Ecto.Changeset.get_field(changeset, :snmpv3_priv_protocol) current_security_level = cond do @@ -434,7 +435,6 @@ field={@form[:snmpv3_security_level]} type="select" label="Auth Level" - value={current_security_level} options={[ {"No Authentication, No Privacy", "noAuthNoPriv"}, {"Authentication, No Privacy", "authNoPriv"}, @@ -450,7 +450,6 @@ field={@form[:snmpv3_auth_protocol]} type="select" label="Auth Protocol" - prompt="Select authentication algorithm" options={[ {"SHA-256 (recommended)", "SHA-256"}, {"SHA-512", "SHA-512"}, @@ -480,7 +479,6 @@ field={@form[:snmpv3_priv_protocol]} type="select" label="Privacy Protocol" - prompt="Select encryption algorithm" options={[ {"AES-128 (recommended)", "AES"}, {"AES-256", "AES-256"},