Auto stash before merge of "main" and "Jason/main"

main
riley 1 year ago
parent fc45fc736c
commit 6ac4bfe892

@ -111,16 +111,14 @@ s:tab("advanced", translate("Advanced Settings"))
---- Eanble
o = s:taboption("setup", Flag, "enabled", translate("Enable"))
o.default = 0
o.rmempty = false
-- Move basic settings under the "Setup" tab
o = s:taboption("setup", ListValue, "role", translate("Mesh Mode"))
o:value("off", translate("Node"))
o:value("server", translate("Server"))
o:value("off", translate("Node"))
o.default = "server"
--o:value("client", translate("Client (advanced)"))
o:depends("enabled", 1)
o.rmempty = false
apRadio = s:taboption("setup", MultiValue, "apRadio", translate("Mesh Radio(s)"))
@ -132,18 +130,13 @@ uci:foreach("wireless", "wifi-device",
apRadio:value(iface, desc) -- Display radio interface with its hardware modes
end)
apRadio.default = "radio0"
apRadio:depends("enabled", 1)
apRadio.rmempty = false
apRadio.widget = "select"
o = s:taboption("setup", Value, "mesh_id", translate("Mesh SSID"))
o.default = "easymesh_AC"
o:depends("enabled", 1)
encryption = s:taboption("setup", Flag, "encryption", translate("Encryption WIP DROPDOWN"), translate(""))
encryption = s:taboption("setup", Flag, "encryption", translate("Encryption"), translate(""))
encryption.default = 0
encryption.rmempty = false
encryption:depends("enabled", 1)
o = s:taboption("setup", Value, "key", translate("Mesh Password"))
o.default = "easymesh"
@ -153,22 +146,21 @@ o.password = true
-- Move K/V/R settings to the "Advanced" tab
enable_kvr = s:taboption("advanced", Flag, "kvr", translate("K/V/R"), translate("Enable Key Value Roaming"))
enable_kvr.default = 1
enable_kvr.rmempty = false
mobility_domain = s:taboption("advanced", Value, "mobility_domain", translate("Mobility Domain"), translate("4-character hexadecimal ID"))
mobility_domain.default = "4f57"
--mobility_domain.datatype = "and(hexstring,rangelength(4,4))"
mobility_domain:depends("kvr", 1)
rssi_val = s:taboption("advanced", Value, "rssi_val", translate("Threshold for a good RSSI"))
rssi_val.default = "-60"
--rssi_val.datatype = "range(-1,-120)"
rssi_val:depends("kvr", 1)
low_rssi_val = s:taboption("advanced", Value, "low_rssi_val", translate("Threshold for a bad RSSI"))
low_rssi_val.default = "-88"
--low_rssi_val.datatype = "range(-1,-120)"
low_rssi_val:depends("kvr", 1)
---- Apply MESH settings
@ -207,6 +199,7 @@ o:depends("role", "off")
btnAPMode = s:taboption("apmode", Button, "_btn_apmode", translate("Join Mesh Network"), translate("WARNING: THIS WILL CHANGE THIS NODE'S IP ADDRESS, YOU WILL LOOSE ACCESS TO THIS UI"))
function btnAPMode.write()
io.popen("/easymesh/easymesh.sh dumbap &")
luci.sys.call("/easymesh/dumbap.sh")
end
btnAPMode:depends("role", "off")
---- ip address
@ -230,8 +223,7 @@ ctrl = m:section(TypedSection, "easymesh", "Click Save Then Enable or Disable Yo
ctrl.anonymous = true
ctrl.addremove = false
function m.on_after_commit(self)
m.on_before_apply = function(self)
local enabled = m:formvalue("cbid.easymesh.easymesh.enabled")
if enabled and enabled == "1" then
luci.sys.call("/easymesh/easymesh.sh &")
@ -240,11 +232,4 @@ function m.on_after_commit(self)
end
end
function o.write(self, section, value)
Flag.write(self, section, value)
-- Run init start
-- luci.sys.call("uci commit")
-- luci.sys.call("/etc/init.d/easymesh start &")
end
return m
Loading…
Cancel
Save