Update 'luasrc/model/cbi/easymesh.lua'

pull/1/head
ben 1 year ago
parent 5460a81960
commit 9fbcc297c1

@ -37,7 +37,7 @@ function detect_Node()
end
local Nodes = luci.sys.exec("batctl n 2>/dev/null| tail +3 | wc -l")
local Node = detect_Node()
v = m:section(Table, Node, "" ,"<b>" .. translate("Active node") .. "" .. Nodes .. "</b>")
v = m:section(Table, Node, "" ,"<b>" .. translate("Active node") .. ":" .. Nodes .. "</b>")
v:option(DummyValue, "IF", translate("IF"))
v:option(DummyValue, "Neighbor", translate("Neighbor"))
v:option(DummyValue, "lastseen", translate("lastseen"))
@ -51,6 +51,26 @@ o = s:option(Flag, "enabled", translate("Enable"), translate("Enable or disable
o.default = 0
o.rmempty = false
-- Connection Type Dropdown
o = s:option(ListValue, "backbone", translate("Connection Type"), translate("Choose if Node or Gateway is connected to internet by LAN or WiFi"))
o:value("lan", translate("LAN"))
o:value("wifi", translate("WiFi"))
o.default = "lan"
o.rmempty = false
-- AP Name
apn = s:option(Value, "apname", translate("AP Name"), translate("Enter the client WiFi AP name"))
apn:depends("backbone", "wifi")
apn.placeholder = "easymesh_AC"
apn.rmempty = true
-- AP Password
app = s:option(Value, "appass", translate("AP Password"), translate("Enter the client WiFi AP password"))
app:depends("backbone", "wifi")
--app.password = true
app.placeholder = "easymesh"
app.rmempty = true
o = s:option(ListValue, "role", translate("Mesh Device Type"))
o:value("off", translate("Mesh Node"))
o:value("server", translate("Mesh Server"))
@ -123,11 +143,11 @@ enable = s:option(Flag, "ap_mode", translate("Enable as DHCP Mesh Node"), transl
enable.default = 0
enable.rmempty = false
---- make sure nodes know gateway ip address even though you really dont need it
o = s:option(Value, "ipaddr", translate("Mesh Gateway IP Address"))
o.default = "192.168.8.1"
o.datatype = "ip4addr"
o:depends("ap_mode", 1)
---- 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 Server IPv4 DNS"))
--o.default = "192.168.8.1"

Loading…
Cancel
Save