snmp v3 ui fixes

This commit is contained in:
Graham McIntire 2026-02-04 17:41:15 -06:00
parent dbb2412e89
commit d16f09666f
No known key found for this signature in database

View file

@ -411,9 +411,10 @@
/>
</div>
<% # 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"},