diff options
author | Daniel F. Dickinson <cshored@thecshore.com> | 2018-12-20 01:37:10 -0500 |
---|---|---|
committer | Daniel F. Dickinson <cshored@thecshore.com> | 2018-12-22 22:54:11 -0500 |
commit | e164e2d1ebeb4fa128ee92e58a4cc6b2f3be1979 (patch) | |
tree | b71ee24a879282e92bf42d1690cab967f71fb545 /applications/luci-app-nut/luasrc/model/cbi/nut_server.lua | |
parent | 31d259a36156039a33366b99c80260de0c9edd3f (diff) |
luci-app-nut: nut_server: Alphabetize driver options
There are a *lot* of options, so list them in alphabetical order
for easier updates to the app (alphabetizing by translation doesn't
make sense since the order would need to change depending on language).
Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
Diffstat (limited to 'applications/luci-app-nut/luasrc/model/cbi/nut_server.lua')
-rw-r--r-- | applications/luci-app-nut/luasrc/model/cbi/nut_server.lua | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/applications/luci-app-nut/luasrc/model/cbi/nut_server.lua b/applications/luci-app-nut/luasrc/model/cbi/nut_server.lua index dea793239..3b5f33766 100644 --- a/applications/luci-app-nut/luasrc/model/cbi/nut_server.lua +++ b/applications/luci-app-nut/luasrc/model/cbi/nut_server.lua @@ -87,21 +87,36 @@ for driver in driverlist do end o.optional = false -o = s:option(Value, "port", translate("Port")) -o.optional = false -o.default = "auto" +o = s:option(Value, "bus", translate("USB Bus(es) (regex)")) +o.optional = true +o.datatype = "uinteger" -o = s:option(Value, "mfr", translate("Manufacturer (Display)")) +o = s:option(Value, "community", translate("SNMP Community")) o.optional = true +o.placeholder = "private" -o = s:option(Value, "model", translate("Model (Display)")) +o = s:option(Flag, "interruptonly", translate("Interrupt Only")) o.optional = true +o.default = false -o = s:option(Value, "serial", translate("Serial Number")) +o = s:option(Value, "interruptsize", translate("Interrupt Size"), translate("Bytes to read from interrupt pipe")) o.optional = true +o.datatype = "integer" -o = s:option(Value, "sdtime", translate("Additional Shutdown Time(s)")) +o = s:option(Value, "maxreport", translate("Max USB HID Length Reported"), translate("Workaround for buggy firmware")) +o.optional = true +o.datatype = "integer" +o.default = nil + +o = s:option(Value, "mfr", translate("Manufacturer (Display)")) +o.optional = true + +o = s:option(Value, "model", translate("Model (Display)")) +o.optional = true + +o = s:option(Flag, "notransferoids", translate("No low/high voltage transfer OIDs")) o.optional = true +o.default = false o = s:option(Value, "offdelay", translate("Off Delay(s)"), translate("Delay for kill power command")) o.optional = true @@ -128,42 +143,33 @@ o.optional = true o.datatype = "integer" o.placeholder = 30 -o = s:option(Value, "vendor", translate("Vendor (regex)")) -o.optional = true +o = s:option(Value, "port", translate("Port")) +o.optional = false +o.default = "auto" o = s:option(Value, "product", translate("Product (regex)")) o.optional = true -o = s:option(Value, "bus", translate("USB Bus(es) (regex)")) -o.optional = true -o.datatype = "uinteger" - -o = s:option(Flag, "interruptonly", translate("Interrupt Only")) -o.optional = true -o.default = false - -o = s:option(Value, "interruptsize", translate("Interrupt Size"), translate("Bytes to read from interrupt pipe")) +o = s:option(Value, "productid", translate("USB Product Id")) o.optional = true -o.datatype = "integer" -o = s:option(Value, "maxreport", translate("Max USB HID Length Reported"), translate("Workaround for buggy firmware")) +o = s:option(Value, "runas", translate("RunAs User"), translate("User as which to execute driver; requires device file accessed by driver be read-write for that user.")) o.optional = true -o.datatype = "integer" -o.default = nil +o.placeholder = "nut" -o = s:option(Value, "vendorid", translate("USB Vendor Id")) +o = s:option(Value, "sdtime", translate("Additional Shutdown Time(s)")) o.optional = true -o = s:option(Value, "productid", translate("USB Product Id")) +o = s:option(Value, "serial", translate("Serial Number")) o.optional = true -o = s:option(Value, "runas", translate("RunAs User"), translate("User as which to execute driver; requires device file accessed by driver be read-write for that user.")) +o = s:option(Value, "snmp_retries", translate("SNMP retries")) o.optional = true -o.placeholder = "nut" +o.datatype = "uinteger" -o = s:option(Value, "community", translate("SNMP Community")) +o = s:option(Value, "snmp_timeout", translate("SNMP timeout(s)")) o.optional = true -o.placeholder = "private" +o.datatype = "uinteger" o = s:option(ListValue, "snmp_version", translate("SNMP version")) o.optional = true @@ -173,17 +179,11 @@ o:value("v3", translate("SNMPv3")) o:value("", "") o.default = "" -o = s:option(Value, "snmp_retries", translate("SNMP retries")) -o.optional = true -o.datatype = "uinteger" - -o = s:option(Value, "snmp_timeout", translate("SNMP timeout(s)")) +o = s:option(Value, "vendor", translate("Vendor (regex)")) o.optional = true -o.datatype = "uinteger" -o = s:option(Flag, "notransferoids", translate("No low/high voltage transfer OIDs")) +o = s:option(Value, "vendorid", translate("USB Vendor Id")) o.optional = true -o.default = false o = s:option(Value, "other", translate("Additional Parameters")) o.optional = true |