Merge remote-tracking branch 'Riley-Gitty/main' into main

main
Jason Hawks 1 year ago
commit 9e5df69308

@ -105,13 +105,15 @@ s.anonymous = true
--app.rmempty = true
s:tab("setup", translate("Basic Setup"))
s:tab("apmode", translate("AP Mode"))
s:tab("advanced", translate("Advanced Settings"))
---- Eanble
o = s:taboption("setup", Flag, "enabled", translate("Enable"), translate("Enable or disable Easy Mesh"))
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"))
@ -120,7 +122,7 @@ o:value("client", translate("Client (advanced)"))
o:depends("enabled", 1)
o.rmempty = false
apRadio = s:taboption("setup", ListValue, "apRadio", translate("Mesh Radio"))
apRadio = s:taboption("setup", MultiValue, "apRadio", translate("Mesh Radio(s)"))
uci:foreach("wireless", "wifi-device",
function(s)
@ -129,10 +131,10 @@ uci:foreach("wireless", "wifi-device",
local desc = string.format("%s (%s)", iface, hw_modes)
apRadio:value(iface, desc) -- Display radio interface with its hardware modes
end)
apRadio:value("all", translate("ALL"))
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"
@ -185,31 +187,11 @@ low_rssi_val:depends("kvr", 1)
--enable.rmempty = false
-- NodeMode
s = m:section(TypedSection, "easymesh", translate("Enable Router as DHCP Mesh Node"), translate("Set up Easy Mesh WiFi on your server and nodes first. All mesh nodes will utilize your mesh server for DHCP. "))
s.anonymous = true
-- s = m:section(TypedSection, "easymesh", translate("Enable Router as DHCP Mesh Node"), translate("Set up Easy Mesh WiFi on your server and nodes first. All mesh nodes will utilize your mesh server for DHCP. "))
-- s.anonymous = true
---- ap_mode
enable = s:option(Flag, "ap_mode", translate("Enable as DHCP Mesh Node"), translate("Important: Setup your mesh WiFi network before enabling."))
enable.default = 0
enable.rmempty = false
---- ip address
--o = s:option(Value, "ipaddr", translate("Static IP Address"))
--o.default = "192.168.8.2"
--o.datatype = "ip4addr"
--o:depends("ap_mode", 1)
o = s:option(Value, "dns", translate("Mesh Gateway IP Address"))
o.default = "192.168.8.1"
o.datatype = "ip4addr"
o:depends("ap_mode", 1)
o = s:option(Value, "netmask", translate("IPv4 netmask"))
o.default = "255.255.255.0"
o.datatype = "ip4addr"
o:depends("ap_mode", 1)
o = s:option(Value, "gateway", translate("Set Hostname for this Mesh Node"))
o = s:taboption("apmode", Value, "gateway", translate("Node Hostname"))
o.default = "node2"
o:value("node2", "node2")
o:value("node3", "node3")
@ -220,7 +202,28 @@ o:value("node7", "node7")
o:value("node8", "node8")
o:value("node9", "node9")
o.datatype = "string"
o:depends("ap_mode", 1)
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()
luci.sys.call("/easymesh/easymesh.sh apmode")
end
btnAPMode:depends("role", "off")
---- ip address
--o = s:option(Value, "ipaddr", translate("Static IP Address"))
--o.default = "192.168.8.2"
--o.datatype = "ip4addr"
--o:depends("ap_mode", 1)
-- o = s:option(Value, "dns", translate("Mesh Gateway IP Address"))
-- o.default = "192.168.8.1"
-- o.datatype = "ip4addr"
-- o:depends("ap_mode", 1)
-- o = s:option(Value, "netmask", translate("IPv4 netmask"))
-- o.default = "255.255.255.0"
-- o.datatype = "ip4addr"
-- o:depends("ap_mode", 1)
-- MESH Node Control: apply mesh settings
ctrl = m:section(TypedSection, "easymesh", "Click Save Then Enable or Disable Your Mesh WiFi settings")

Loading…
Cancel
Save