From 97540a34b0256fadac2d6a7d8213a5587e441545 Mon Sep 17 00:00:00 2001 From: Karai Csaba Date: Thu, 28 Apr 2016 23:18:00 +0200 Subject: [PATCH] Skeleton for the web-server page --- esp-link/cgi.c | 3 ++- esp-link/cgiservices.c | 2 ++ html/home.html | 6 ++++++ html/web-server.html | 12 ++++++++++++ 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 html/web-server.html diff --git a/esp-link/cgi.c b/esp-link/cgi.c index 96c03e9..6300317 100644 --- a/esp-link/cgi.c +++ b/esp-link/cgi.c @@ -213,7 +213,8 @@ int ICACHE_FLASH_ATTR cgiMenu(HttpdConnData *connData) { #ifdef MQTT "\"REST/MQTT\", \"/mqtt.html\", " #endif - "\"Debug log\", \"/log.html\"" + "\"Debug log\", \"/log.html\", " + "\"Web Server\", \"/web-server.html\"" " ], " "\"version\": \"%s\", " "\"name\": \"%s\"" diff --git a/esp-link/cgiservices.c b/esp-link/cgiservices.c index 200039d..ef76287 100644 --- a/esp-link/cgiservices.c +++ b/esp-link/cgiservices.c @@ -68,6 +68,7 @@ int ICACHE_FLASH_ATTR cgiSystemInfo(HttpdConnData *connData) { "\"name\": \"%s\", " "\"reset cause\": \"%d=%s\", " "\"size\": \"%s\", " + "\"upload-size\": \"%d\", " "\"id\": \"0x%02X 0x%04X\", " "\"partition\": \"%s\", " "\"slip\": \"%s\", " @@ -79,6 +80,7 @@ int ICACHE_FLASH_ATTR cgiSystemInfo(HttpdConnData *connData) { rst_info->reason, rst_codes[rst_info->reason], flash_maps[system_get_flash_size_map()], + getUserPageSectionEnd()-getUserPageSectionStart(), fid & 0xff, (fid & 0xff00) | ((fid >> 16) & 0xff), part_id ? "user2.bin" : "user1.bin", flashConfig.slip_enable ? "enabled" : "disabled", diff --git a/html/home.html b/html/home.html index 138222e..de9862f 100644 --- a/html/home.html +++ b/html/home.html @@ -123,6 +123,12 @@ + Webpage size +
+ + +
+ Current partition Description:
diff --git a/html/web-server.html b/html/web-server.html new file mode 100644 index 0000000..f509230 --- /dev/null +++ b/html/web-server.html @@ -0,0 +1,12 @@ +
+
+

Web Server

+
+ +
+

User defined web pages can be uploaded to esp-link. This is useful if esp-link acts as a web server while MCU provides + the measurement data.

+
+ +
+ \ No newline at end of file