dashboard: add hidden diagnostics overlay
This commit is contained in:
@@ -2442,10 +2442,12 @@ void buildStatusDocument(JsonDocument& doc) {
|
||||
network["ap_ssid"] = apSsid;
|
||||
network["ap_auth"] = "wpa2";
|
||||
network["ap_ip"] = WiFi.softAPIP().toString();
|
||||
network["ap_clients"] = WiFi.softAPgetStationNum();
|
||||
network["sta_enabled"] = wifiNetworkCount > 0;
|
||||
network["sta_connected"] = WiFi.status() == WL_CONNECTED;
|
||||
network["sta_ssid"] = activeStaSsid;
|
||||
network["sta_ip"] = WiFi.status() == WL_CONNECTED ? WiFi.localIP().toString() : "";
|
||||
network["sta_rssi_dbm"] = WiFi.status() == WL_CONNECTED ? WiFi.RSSI() : 0;
|
||||
network["saved_network_count"] = wifiNetworkCount;
|
||||
JsonArray savedNetworks = network.createNestedArray("saved_networks");
|
||||
for (int i = 0; i < wifiNetworkCount; i++) {
|
||||
@@ -2470,6 +2472,10 @@ void buildStatusDocument(JsonDocument& doc) {
|
||||
system["build_date"] = __DATE__;
|
||||
system["build_time"] = __TIME__;
|
||||
system["uptime_seconds"] = millis() / 1000;
|
||||
system["free_heap"] = ESP.getFreeHeap();
|
||||
system["min_free_heap"] = ESP.getMinFreeHeap();
|
||||
system["chip_model"] = ESP.getChipModel();
|
||||
system["cpu_mhz"] = ESP.getCpuFreqMHz();
|
||||
|
||||
JsonObject configObj = doc.createNestedObject("config");
|
||||
buildConfigDocument(configObj);
|
||||
@@ -3355,6 +3361,7 @@ void handleHealth() {
|
||||
network["ap_ssid"] = apSsid;
|
||||
network["ap_auth"] = "wpa2";
|
||||
network["ap_ip"] = WiFi.softAPIP().toString();
|
||||
network["ap_clients"] = WiFi.softAPgetStationNum();
|
||||
network["sta_enabled"] = wifiNetworkCount > 0;
|
||||
network["sta_connected"] = WiFi.status() == WL_CONNECTED;
|
||||
network["sta_ssid"] = activeStaSsid;
|
||||
|
||||
Reference in New Issue
Block a user