code readability cleanup, removed some unused comments

main
riley 1 year ago
parent 895d07f3c3
commit 763e8350b3

@ -58,30 +58,9 @@ v:option(DummyValue, "IF", translate("Interface"))
v:option(DummyValue, "Neighbor", translate("Neighbor Nodes")) v:option(DummyValue, "Neighbor", translate("Neighbor Nodes"))
v:option(DummyValue, "lastseen", translate("Last Seen Timestamp")) v:option(DummyValue, "lastseen", translate("Last Seen Timestamp"))
-- Basic
s = m:section(TypedSection, "easymesh", translate("Mesh Settings")) s = m:section(TypedSection, "easymesh", translate("Mesh Settings"))
s.anonymous = true s.anonymous = true
-- 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
s:tab("setup", translate("Basic Setup")) s:tab("setup", translate("Basic Setup"))
s:tab("apmode", translate("AP Mode")) s:tab("apmode", translate("AP Mode"))
s:tab("advanced", translate("Advanced Settings")) s:tab("advanced", translate("Advanced Settings"))
@ -90,7 +69,6 @@ s:tab("advanced", translate("Advanced Settings"))
o = s:taboption("setup", Flag, "enabled", translate("Enable Mesh Networking"), translate('<p style="text-align: justify; padding: 0;">Toggle this switch to activate or deactivate the Mesh Network on this device according to the settings specified in this configuration. Make sure to configure all necessary settings before enabling the Mesh Network. </p><p style="text-align: justify; padding: 0;"><strong>Changes will apply when you click Save and Apply</strong></p>')) o = s:taboption("setup", Flag, "enabled", translate("Enable Mesh Networking"), translate('<p style="text-align: justify; padding: 0;">Toggle this switch to activate or deactivate the Mesh Network on this device according to the settings specified in this configuration. Make sure to configure all necessary settings before enabling the Mesh Network. </p><p style="text-align: justify; padding: 0;"><strong>Changes will apply when you click Save and Apply</strong></p>'))
o.default = 0 o.default = 0
-- Move basic settings under the "Setup" tab -- Move basic settings under the "Setup" tab
o = s:taboption("setup", ListValue, "role", translate("Mesh Mode"), translate('<p style="text-align: justify; padding: 0;"><strong>Choose the role this device will play in your mesh network. There are two options available:</strong></p> <p style="text-align: justify; padding: 0;"><strong>1. Server:</strong> If you select this option, this device will act as the Mesh Gateway Server. The server manages the routing of data in the network and handles connections to the internet. It is the central point of your mesh network.</p> <p style="text-align: justify; padding: 0;"><strong>2. Node:</strong> The device functions as a Mesh Node if this option is selected. Nodes connect to the Mesh Gateway Server and other nodes to extend the range of the network. Nodes can also route traffic between each other to increase network efficiency.</p> <p style="text-align: justify; padding: 0;"><strong>Remember to set up the Mesh Gateway Server first before setting up the nodes.</strong></p>')) o = s:taboption("setup", ListValue, "role", translate("Mesh Mode"), translate('<p style="text-align: justify; padding: 0;"><strong>Choose the role this device will play in your mesh network. There are two options available:</strong></p> <p style="text-align: justify; padding: 0;"><strong>1. Server:</strong> If you select this option, this device will act as the Mesh Gateway Server. The server manages the routing of data in the network and handles connections to the internet. It is the central point of your mesh network.</p> <p style="text-align: justify; padding: 0;"><strong>2. Node:</strong> The device functions as a Mesh Node if this option is selected. Nodes connect to the Mesh Gateway Server and other nodes to extend the range of the network. Nodes can also route traffic between each other to increase network efficiency.</p> <p style="text-align: justify; padding: 0;"><strong>Remember to set up the Mesh Gateway Server first before setting up the nodes.</strong></p>'))
o:value("server", translate("Server")) o:value("server", translate("Server"))
@ -129,37 +107,14 @@ mobility_domain = s:taboption("advanced", Value, "mobility_domain", translate("M
mobility_domain.default = "4f57" mobility_domain.default = "4f57"
mobility_domain.datatype = "and(hexstring,rangelength(4,4))" mobility_domain.datatype = "and(hexstring,rangelength(4,4))"
rssi_val = s:taboption("advanced", Value, "rssi_val", translate("Good RSSI Threshold")) rssi_val = s:taboption("advanced", Value, "rssi_val", translate("Good RSSI Threshold"))
rssi_val.default = "-60" rssi_val.default = "-60"
rssi_val.datatype = "range(-120,-1)" rssi_val.datatype = "range(-120,-1)"
low_rssi_val = s:taboption("advanced", Value, "low_rssi_val", translate("Bad RSSI Threshold")) low_rssi_val = s:taboption("advanced", Value, "low_rssi_val", translate("Bad RSSI Threshold"))
low_rssi_val.default = "-88" low_rssi_val.default = "-88"
low_rssi_val.datatype = "range(-120,-1)" low_rssi_val.datatype = "range(-120,-1)"
---- Apply MESH settings
--ctrl = m:section(TypedSection, "easymesh", "Apply Mesh WiFi Settings to Server or Node")
--ctrl.anonymous = true
--ctrl.addremove = false
----btnStop = ctrl:option(Button, "_btn_start", translate("Apply Mesh WiFi Settings"))
--function btnStop.write()
-- io.popen("/etc/init.d/easymesh start")
--end
---- 802.11F
--enable = s:option(Flag, "iapp", translate("inter-access point protocol"), translate("Wireless Access Points (APs) running on different vendors can communicate with each other"))
--enable.default = 0
--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
---- ap_mode ---- ap_mode
o = s:taboption("apmode", Value, "hostname", translate("Node Hostname")) o = s:taboption("apmode", Value, "hostname", translate("Node Hostname"))
o.default = "node2" o.default = "node2"

Loading…
Cancel
Save