Webserver can be accessed (sometimes... when no Wifi is found, or clock is newly setup
This commit is contained in:
parent
499cbcbbc5
commit
b1f702df75
@ -25,6 +25,7 @@ function sendWebPage(conn,answertype)
|
||||
buf = buf .."<tr><th>SNTP Server</th><td><input id=\"sntpserver\" name=\"sntpserver\" value=\"" .. sntpserverhostname .. "\"></td><td>Server to sync the time with. Only one ntp server is allowed.</tr>"
|
||||
buf = buf .."<tr><th>Offset to UTC time</th><td><input id=\"timezoneoffset\" name=\"timezoneoffset\" value=\"" .. timezoneoffset .. "\"></td><td>Define the offset to UTC time in hours. For example +1 hour for Germany</tr>"
|
||||
buf = buf .. "<tr><td colspan=\"3\"><div align=\"center\"><input type=\"submit\" value=\"Save Configuration\" onclick=\"this.value='Submitting ..';this.disabled='disabled'; this.form.submit();\"></div></td></tr>"
|
||||
buf = buf .. "<tr><td colspan=\"3\"><div align=\"center\"><input type=\"submit\" name=\"action\" value=\"Reboot\"></div></td></tr>"
|
||||
buf = buf .."</table></form>"
|
||||
if answertype==2 then
|
||||
buf = buf .. "<h2><font color=\"green\">New configuration saved</font></h2\n>"
|
||||
|
@ -39,6 +39,10 @@ function startWebServer()
|
||||
end
|
||||
postRequestData=nil
|
||||
|
||||
--- Do the magic!
|
||||
if (_POST.action ~= nil and _POST.action == "Reboot") then
|
||||
node.restart()
|
||||
end
|
||||
|
||||
print("Inform user via Web")
|
||||
if (sendWebPage == nil) then
|
||||
|
Loading…
Reference in New Issue
Block a user