Provide status about state of wan wifi connection (#472)

* Provide status about state of wan wifi connection

* Updated icons

* One more icon
This commit is contained in:
Tim Wilkinson 2022-08-02 16:56:27 -07:00 committed by GitHub
parent 47fc5f78ef
commit c3a317d424
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 1 deletions

View File

@ -1337,7 +1337,22 @@ if (phycount > 1 and (wifi_enable ~= "1" or wifi2_enable ~= "1")) or (phycount =
end end
end end
html.print("<tr><td colspan=2><hr></td></tr><tr><th colspan=2><small>WAN Wifi Client</small></th></tr><tr><td>Enable</td><td><input type=checkbox name=wifi3_enable value=1" .. (wifi3_enable == "1" and " checked" or "") .. ">&nbsp;&nbsp;<a href='/help.html#wanclient' target='_blank'><img src='/qmark.png'></a></td></tr>") local connected = "/notdone.png"
local cmessage = "Not connected."
local wanintf = aredn.hardware.get_iface_name("wan")
local essid = capture_and_match("iwinfo " .. wanintf .. " info", 'ESSID: "(.+)"')
if essid == wifi3_ssid then
if pingOK then
connected = "/donedone.png"
cmessage = "Connected to Wifi and Internet."
else
connected = "/done.png"
cmessage = "Connected to Wifi. Not connected to Internet."
end
end
html.print("<tr><td colspan=2><hr></td></tr><tr><th colspan=2><small>WAN Wifi Client&nbsp;<img style='vertical-align:text-bottom' src='" .. connected .. "' title='" .. cmessage .. "'></small></th></tr>")
html.print("<tr><td>Enable</td><td><input type=checkbox name=wifi3_enable value=1" .. (wifi3_enable == "1" and " checked" or "") .. ">&nbsp;&nbsp;<a href='/help.html#wanclient' target='_blank'><img src='/qmark.png'></a></td></tr>")
if wifi_enable ~= "1" and wifi2_enable ~= "1" and phycount > 1 then if wifi_enable ~= "1" and wifi2_enable ~= "1" and phycount > 1 then
html.print("<tr><td>WAN Wifi Client band</td><td><select name=wifi3_hwmode>") html.print("<tr><td>WAN Wifi Client band</td><td><select name=wifi3_hwmode>")

BIN
files/www/done.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

BIN
files/www/donedone.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

BIN
files/www/notdone.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 629 B