|
@ -71,6 +71,7 @@ void web::setup(void) { |
|
|
mWeb->on("/visualization", std::bind(&web::showVisualization, this)); |
|
|
mWeb->on("/visualization", std::bind(&web::showVisualization, this)); |
|
|
mWeb->on("/livedata", std::bind(&web::showLiveData, this)); |
|
|
mWeb->on("/livedata", std::bind(&web::showLiveData, this)); |
|
|
mWeb->on("/json", std::bind(&web::showJson, this)); |
|
|
mWeb->on("/json", std::bind(&web::showJson, this)); |
|
|
|
|
|
mWeb->on("/metrics", std::bind(&web::showMetrics, this)); |
|
|
mWeb->on("/api", HTTP_POST, std::bind(&web::showWebApi, this)); |
|
|
mWeb->on("/api", HTTP_POST, std::bind(&web::showWebApi, this)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -568,6 +569,12 @@ void web::showJson(void) { |
|
|
mWeb->send(200, F("application/json"), mMain->getJson()); |
|
|
mWeb->send(200, F("application/json"), mMain->getJson()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
void web::showMetrics(void) { |
|
|
|
|
|
DPRINTLN(DBG_VERBOSE, F("web::showMetrics")); |
|
|
|
|
|
mWeb->send(200, F("application/metrics"), mMain->getMetrics()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
//-----------------------------------------------------------------------------
|
|
|
void web::showWebApi(void) |
|
|
void web::showWebApi(void) |
|
|
{ |
|
|
{ |
|
|