mirror of https://github.com/aredn/aredn.git
Move the unconfigued setup earlier
Fixes bad band label display on first boot
This commit is contained in:
parent
6a27a8fb28
commit
e284ff98e2
|
@ -1053,6 +1053,13 @@ html.print([[
|
||||||
<table cellpadding=5 border=1 style='border-collapse:collapse;' width=100%><tr><td valign=top width=33%>
|
<table cellpadding=5 border=1 style='border-collapse:collapse;' width=100%><tr><td valign=top width=33%>
|
||||||
]])
|
]])
|
||||||
|
|
||||||
|
-- reset wifi channel/bandwidth to default
|
||||||
|
if nixio.fs.stat("/etc/config/unconfigured") or parms.button_reset then
|
||||||
|
local defaultwifi = aredn.hardware.get_default_channel()
|
||||||
|
wifi_channel = defaultwifi.channel
|
||||||
|
wifi_chanbw = tostring(defaultwifi.bandwidth)
|
||||||
|
end
|
||||||
|
|
||||||
-- mesh rf settings
|
-- mesh rf settings
|
||||||
html.print("<table width=100% style='border-collapse: collapse;'>")
|
html.print("<table width=100% style='border-collapse: collapse;'>")
|
||||||
html.print("<tr><th colspan=2>Mesh RF (" .. (M3model and "3GHz" or M9model and "900MHz" or wifi_channel < 36 and "2GHz" or "5GHz") .. ")</th></tr>")
|
html.print("<tr><th colspan=2>Mesh RF (" .. (M3model and "3GHz" or M9model and "900MHz" or wifi_channel < 36 and "2GHz" or "5GHz") .. ")</th></tr>")
|
||||||
|
@ -1067,13 +1074,6 @@ end
|
||||||
html.print("></td></tr>")
|
html.print("></td></tr>")
|
||||||
html.print("<tr><td><nobr>IP Address</nobr></td><td><input type=text size=15 name=wifi_ip value='" .. wifi_ip .. "'></td></tr><tr><td>Netmask</td><td><input type=text size=15 name=wifi_mask value='" .. wifi_mask .. "'></td></tr>")
|
html.print("<tr><td><nobr>IP Address</nobr></td><td><input type=text size=15 name=wifi_ip value='" .. wifi_ip .. "'></td></tr><tr><td>Netmask</td><td><input type=text size=15 name=wifi_mask value='" .. wifi_mask .. "'></td></tr>")
|
||||||
|
|
||||||
-- reset wifi channel/bandwidth to default
|
|
||||||
if nixio.fs.stat("/etc/config/unconfigured") or parms.button_reset then
|
|
||||||
local defaultwifi = aredn.hardware.get_default_channel()
|
|
||||||
wifi_channel = defaultwifi.channel
|
|
||||||
wifi_chanbw = tostring(defaultwifi.bandwidth)
|
|
||||||
end
|
|
||||||
|
|
||||||
if wifi_enable == "1" then
|
if wifi_enable == "1" then
|
||||||
html.print("<tr><td>SSID</td><td><input type=text size=15 name=wifi_ssid value='" .. wifi_ssid .. "'>-" .. wifi_chanbw .. "-v3</td></tr>")
|
html.print("<tr><td>SSID</td><td><input type=text size=15 name=wifi_ssid value='" .. wifi_ssid .. "'>-" .. wifi_chanbw .. "-v3</td></tr>")
|
||||||
hidden[#hidden + 1] = "<input type=hidden name=wifi_mode value='" .. wifi_mode .. "'>"
|
hidden[#hidden + 1] = "<input type=hidden name=wifi_mode value='" .. wifi_mode .. "'>"
|
||||||
|
|
Loading…
Reference in New Issue