Andrew Boyson / web

Dependents:   oldheating gps motorhome heating

base/log/web-log-html.c

Committer:
andrewboyson
Date:
2019-04-30
Revision:
110:8ab752842d25

File content as of revision 110:8ab752842d25:

#include "http.h"
#include "web-nav-base.h"
#include "web-add.h"
#include "log.h"

void WebLogHtml()
{
    HttpOk("text/html; charset=UTF-8", "no-cache", NULL, NULL);
    WebAddHeader("Log", "settings.css", NULL);
    WebAddNav(LOG_PAGE);
    WebAddH1("Log");
    
                 WebAddInputButton("Existing content",      "Clear",    "/log", "clearlog"    );
    if (LogUart) WebAddInputButton("Output to uart is on",  "Turn off", "/log", "chg-log-uart");
    else         WebAddInputButton("Output to uart is off", "Turn on",  "/log", "chg-log-uart");
    
    HttpAddText("<code>");
    HttpAddStream(LogEnumerateStart, LogEnumerate);
    HttpAddText("</code>");
    
    WebAddEnd();
}