Andrew Boyson / web

Dependents:   oldheating gps motorhome heating

Revision:
30:6a08abbe6301
Parent:
29:4d649264d6b6
Child:
56:f6e814fe0159
diff -r 4d649264d6b6 -r 6a08abbe6301 log/http-log-html.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/log/http-log-html.c	Thu Jan 17 13:07:53 2019 +0000
@@ -0,0 +1,22 @@
+#include "http.h"
+#include "page.h"
+#include "log.h"
+#include "http-server.h"
+
+void HttpLogHtml()
+{
+    HttpOk("text/html; charset=UTF-8", "no-cache", NULL, NULL);
+    PageAddHeader(PageSite, "Log", "settings.css", NULL);
+    PageAddNav(LOG_PAGE);
+    PageAddH1(PageSite, "Log");
+    
+    HttpAddText("<h2>");
+    PageAddCheckInput("/log", "Log", "clearlog", "clear");
+    HttpAddText("</h2>\r\n");
+    
+    HttpAddText("<code>");
+    HttpAddStream(LogEnumerateStart, LogEnumerate);
+    HttpAddText("</code>");
+    
+    PageAddEnd();
+}