mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-04 02:09:30 +02:00
* Fix issue with % in log output conflicting with templating character
* Fix issue with % in log output conflicting with templating character - Split index_html string in header and footer part - Use header and footer for index html template page - Fix missing html and head tags in minified index html. - Do not use templating engine for debug and can log pages, by using index html header and footer directly in generated content. * Change pct to %. * Revert "Fix crash caused by percentage char" This reverts commit04a68fc89e
. The original commit only fixed the symptoms, the cause has been fixed, now we ran revert these. * Revert "Remove percentage sign from logging" This reverts commitaf05f28755
. The original commit only fixed the symptoms, the cause has been fixed, now we ran revert these.
This commit is contained in:
parent
850031ccf9
commit
3d1f535b09
16 changed files with 111 additions and 93 deletions
|
@ -21,7 +21,7 @@ unsigned long ota_progress_millis = 0;
|
|||
#include "cellmonitor_html.h"
|
||||
#include "debug_logging_html.h"
|
||||
#include "events_html.h"
|
||||
#include "index_html.cpp"
|
||||
#include "index_html.h"
|
||||
#include "settings_html.h"
|
||||
|
||||
MyTimer ota_timeout_timer = MyTimer(15000);
|
||||
|
@ -31,8 +31,6 @@ const char get_firmware_info_html[] = R"rawliteral(%X%)rawliteral";
|
|||
|
||||
void init_webserver() {
|
||||
|
||||
String content = index_html;
|
||||
|
||||
server.on("/logout", HTTP_GET, [](AsyncWebServerRequest* request) { request->send(401); });
|
||||
|
||||
// Route for firmware info from ota update page
|
||||
|
@ -63,13 +61,15 @@ void init_webserver() {
|
|||
|
||||
// Route for going to CAN logging web page
|
||||
server.on("/canlog", HTTP_GET, [](AsyncWebServerRequest* request) {
|
||||
request->send_P(200, "text/html", index_html, can_logger_processor);
|
||||
AsyncWebServerResponse* response = request->beginResponse(200, "text/html", can_logger_processor());
|
||||
request->send(response);
|
||||
});
|
||||
|
||||
#ifdef DEBUG_VIA_WEB
|
||||
// Route for going to debug logging web page
|
||||
server.on("/log", HTTP_GET, [](AsyncWebServerRequest* request) {
|
||||
request->send_P(200, "text/html", index_html, debug_logger_processor);
|
||||
AsyncWebServerResponse* response = request->beginResponse(200, "text/html", debug_logger_processor());
|
||||
request->send(response);
|
||||
});
|
||||
#endif // DEBUG_VIA_WEB
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue