fix status page not rendering (#559)

* fix status page not rendering

* account for "none" value
This commit is contained in:
Steve 2022-12-06 13:23:47 -07:00 committed by GitHub
parent 93f71d31ad
commit 8fc9b51559
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -284,7 +284,7 @@ html.print("  ")
html.print("<select name=\"css\" size=\"1\" onChange=\"form.submit()\" >")
css_options()
html.print("</select>")
html.print("</nobr")
html.print("</nobr>")
html.print("<input type=hidden name=reload value=reload>")
@ -360,7 +360,11 @@ local wan_iface = aredn.hardware.get_iface_name("wan")
if wan_iface and not hide_local then
local ip, bcast, mask = aredn.hardware.get_interface_ip4(wan_iface)
if not ip then
col1[#col1 + 1] = "<th align=right valign=top><nobr>WAN address:</nobr><br><nobr>default gateway:</nobr><br><nobr>gateway node:</nobr></th><td>none<br>" .. wifi_gw .. "<br>" .. mesh_ip_to_hostnames(wifi_gw) .. "</td>"
if not wifi_gw or wifi_gw == "none" then
col1[#col1 + 1] = "<th align=right valign=top><nobr>WAN address:</nobr><br><nobr>default gateway:</nobr></th><td valign=top>none<br>none</td>"
else
col1[#col1 + 1] = "<th align=right valign=top><nobr>WAN address:</nobr><br><nobr>default gateway:</nobr><br><nobr>gateway node:</nobr></th><td valign=top>none<br>" .. wifi_gw .. "<br>" .. mesh_ip_to_hostnames(wifi_gw) .. "</td>"
end
else
local wprefix = ""
local wan_wifi_snr = "none"