mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
minor changes to web layout
This commit is contained in:
@@ -1982,8 +1982,22 @@ void MyESP::_webRootPage() {
|
|||||||
strlcat(s, "</h1>", sizeof(s));
|
strlcat(s, "</h1>", sizeof(s));
|
||||||
|
|
||||||
strlcat(s, "<p><b>System stats:</b><br>", sizeof(s));
|
strlcat(s, "<p><b>System stats:</b><br>", sizeof(s));
|
||||||
strlcat(s, isMQTTConnected() ? " MQTT is connected\n" : " MQTT is disconnected\n", sizeof(s));
|
|
||||||
strlcat(s, "<br>", sizeof(s));
|
if (isAPmode()) {
|
||||||
|
strlcat(s, " Device is in Wifi Access Point mode with SSID <b>", sizeof(s));
|
||||||
|
strlcat(s, jw.getAPSSID().c_str(), sizeof(s));
|
||||||
|
strlcat(s, "</b>", sizeof(s));
|
||||||
|
} else {
|
||||||
|
char buf[4];
|
||||||
|
strlcat(s, " Connected to wireless network <b>", sizeof(s));
|
||||||
|
strlcat(s, _getESPhostname().c_str(), sizeof(s));
|
||||||
|
strlcat(s, "</b> with signal strength <b>", sizeof(s));
|
||||||
|
strlcat(s, itoa(getWifiQuality(), buf, 10), sizeof(s));
|
||||||
|
strlcat(s, "%</b>", sizeof(s));
|
||||||
|
}
|
||||||
|
|
||||||
|
strlcat(s, isMQTTConnected() ? "<br> MQTT is connected\n" : " MQTT is disconnected\n", sizeof(s));
|
||||||
|
strlcat(s, "</br>", sizeof(s));
|
||||||
|
|
||||||
// uptime
|
// uptime
|
||||||
char buffer[200];
|
char buffer[200];
|
||||||
@@ -1993,14 +2007,14 @@ void MyESP::_webRootPage() {
|
|||||||
uint32_t rem = t % 3600L;
|
uint32_t rem = t % 3600L;
|
||||||
uint8_t m = rem / 60;
|
uint8_t m = rem / 60;
|
||||||
uint8_t sec = rem % 60;
|
uint8_t sec = rem % 60;
|
||||||
sprintf(buffer, " System uptime: %d days %d hours %d minutes %d seconds<br>", d, h, m, sec);
|
sprintf(buffer, " System uptime: %d days %d hours %d minutes %d seconds", d, h, m, sec);
|
||||||
strlcat(s, buffer, sizeof(s));
|
strlcat(s, buffer, sizeof(s));
|
||||||
|
|
||||||
// memory
|
// memory
|
||||||
uint32_t total_memory = _getInitialFreeHeap();
|
//uint32_t total_memory = _getInitialFreeHeap();
|
||||||
uint32_t free_memory = ESP.getFreeHeap();
|
//uint32_t free_memory = ESP.getFreeHeap();
|
||||||
sprintf(buffer, " Memory: %d bytes free (%2u%%)<br>", free_memory, 100 * free_memory / total_memory);
|
//sprintf(buffer, " Memory: %d bytes free (%2u%%)<br>", free_memory, 100 * free_memory / total_memory);
|
||||||
strlcat(s, buffer, sizeof(s));
|
//strlcat(s, buffer, sizeof(s));
|
||||||
|
|
||||||
strlcat(s, "<p>", sizeof(s));
|
strlcat(s, "<p>", sizeof(s));
|
||||||
if (_web_callback) {
|
if (_web_callback) {
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ const char webCommonPage_start[] = "<html>"
|
|||||||
"body {background-color: #FFA500;font: normal 18px Verdana, Arial, sans-serif;} </style>";
|
"body {background-color: #FFA500;font: normal 18px Verdana, Arial, sans-serif;} </style>";
|
||||||
|
|
||||||
|
|
||||||
const char webCommonPage_start_refresh[] = "<meta http-equiv='refresh' content='5'>";
|
const char webCommonPage_start_refresh[] = "<meta http-equiv='refresh' content='30'>";
|
||||||
|
|
||||||
const char webCommonPage_start_body[] = "</head><body>";
|
const char webCommonPage_start_body[] = "</head><body>";
|
||||||
|
|
||||||
|
|||||||
@@ -6,5 +6,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define APP_NAME "EMS-ESP"
|
#define APP_NAME "EMS-ESP"
|
||||||
#define APP_VERSION "1.8.1b13"
|
#define APP_VERSION "1.8.1b14"
|
||||||
#define APP_HOSTNAME "ems-esp"
|
#define APP_HOSTNAME "ems-esp"
|
||||||
|
|||||||
Reference in New Issue
Block a user