-
-
Event Type
Severity
Last Event
Count
Data
Message
-
+
Event Type
Severity
Last Event
Count
Data
Message
)=====";
const char EVENTS_HTML_END[] = R"=====(
+
)=====";
-/* The above
-*/
-
String events_processor(const String& var) {
if (var == "PLACEHOLDER") {
String content = "";
@@ -80,12 +30,11 @@ String events_processor(const String& var) {
content.concat("
");
content.concat("
" + String(get_event_enum_string(event_handle)) + "
");
content.concat("
" + String(get_event_level_string(event_handle)) + "
");
- content.concat("
" + String((millis() / 1000) - event_pointer->timestamp) +
- "
");
+ content.concat("
" + String(event_pointer->timestamp) + "
");
content.concat("
" + String(event_pointer->occurences) + "
");
content.concat("
" + String(event_pointer->data) + "
");
content.concat("
" + String(get_event_message_string(event_handle)) + "
");
- content.concat("
" + String(event_pointer->timestamp) + "
");
+ content.concat("
" + String(millis() / 1000) + "
");
content.concat("
"); // End of event row
}
}
@@ -94,3 +43,38 @@ String events_processor(const String& var) {
}
return String();
}
+
+/* Script for displaying event log before it gets minified
+
+*/
diff --git a/Software/src/devboard/webserver/index_html.cpp b/Software/src/devboard/webserver/index_html.cpp
index c7a11e90..8ab7cf00 100644
--- a/Software/src/devboard/webserver/index_html.cpp
+++ b/Software/src/devboard/webserver/index_html.cpp
@@ -1,5 +1,5 @@
const char index_html[] = R"rawliteral(
-
Battery EmulatorBattery Emulator
%PLACEHOLDER%
+
Battery EmulatorBattery Emulator
%PLACEHOLDER%
)rawliteral";
/* The above code is minified to increase performance. Here is the full HTML function:
@@ -11,7 +11,7 @@ const char index_html[] = R"rawliteral(
html {font-family: Arial; display: inline-block; text-align: center;}
h2 {font-size: 3.0rem;}
p {font-size: 3.0rem;}
- body {max-width: 600px; margin:0px auto; padding-bottom: 25px;}
+ body {max-width: 800px; margin:0px auto; padding-bottom: 25px;}
.switch {position: relative; display: inline-block; width: 120px; height: 68px}
.switch input {display: none}
.slider {position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; border-radius: 6px}