add sensor status, show special index/setup page in case of a critical error (#1560)

* add sensor status, show special index/setup page in case of a critical error

* Added Reboot

* .

* added more buttons

Co-authored-by: CaCO3 <caco@ruinelli.ch>
Co-authored-by: jomjol <30766535+jomjol@users.noreply.github.com>
This commit is contained in:
CaCO3
2022-12-12 17:14:37 +01:00
committed by GitHub
parent 24f10b4683
commit 434e268d42
2 changed files with 9 additions and 5 deletions

View File

@@ -246,6 +246,10 @@ esp_err_t hello_main_handler(httpd_req_t *req)
}
message += "<br>Please check <a href=\"https://github.com/jomjol/AI-on-the-edge-device/wiki/Error-Codes\" target=_blank>github.com/jomjol/AI-on-the-edge-device/wiki/Error-Codes</a> for more information!";
message += "<br><br><button onclick=\"window.location.href='/reboot';\">Reboot</button>";
message += "&nbsp;<button onclick=\"window.open('/ota_page.html');\">OTA Update</button>";
message += "&nbsp;<button onclick=\"window.open('/log.html');\">Log Viewer</button>";
message += "&nbsp;<button onclick=\"window.open('/info.html');\">Show System Info</button>";
httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, message.c_str());
return ESP_FAIL;
}