mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
UI improvements in web
This commit is contained in:
@@ -16,7 +16,7 @@ void MqttStatus::mqttStatus(AsyncWebServerRequest * request) {
|
||||
root["client_id"] = _mqttSettingsService->getClientId();
|
||||
root["disconnect_reason"] = (uint8_t)_mqttSettingsService->getDisconnectReason();
|
||||
|
||||
root["mqtt_fails"] = emsesp::Mqtt::publish_fails();
|
||||
root["mqtt_fails"] = emsesp::Mqtt::publish_fails(); // proddy added
|
||||
|
||||
response->setLength();
|
||||
request->send(response);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <ESPAsyncTCP.h>
|
||||
#endif
|
||||
|
||||
#include "../../src/mqtt.h"
|
||||
#include "../../src/mqtt.h" // proddy added
|
||||
|
||||
#include <MqttSettingsService.h>
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
@@ -61,6 +61,7 @@ Authentication SecuritySettingsService::authenticate(const String& username, con
|
||||
inline void populateJWTPayload(JsonObject& payload, User* user) {
|
||||
payload["username"] = user->username;
|
||||
payload["admin"] = user->admin;
|
||||
payload["version"] = EMSESP_APP_VERSION; // proddy added
|
||||
}
|
||||
|
||||
boolean SecuritySettingsService::validatePayload(JsonObject& parsedPayload, User* user) {
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#include <HttpEndpoint.h>
|
||||
#include <FSPersistence.h>
|
||||
|
||||
#include "../../src/version.h" // added by proddy
|
||||
|
||||
#ifndef FACTORY_ADMIN_USERNAME
|
||||
#define FACTORY_ADMIN_USERNAME "admin"
|
||||
#endif
|
||||
|
||||
@@ -34,13 +34,13 @@ void SystemStatus::systemStatus(AsyncWebServerRequest * request) {
|
||||
root["fs_used"] = SPIFFS.usedBytes();
|
||||
#elif defined(ESP8266)
|
||||
FSInfo fs_info;
|
||||
LittleFS.info(fs_info); // TODO added littlefs
|
||||
LittleFS.info(fs_info); // // proddy added
|
||||
root["fs_total"] = fs_info.totalBytes;
|
||||
root["fs_used"] = fs_info.usedBytes;
|
||||
#endif
|
||||
|
||||
root["uptime"] = uuid::log::format_timestamp_ms(uuid::get_uptime_ms(), 3);
|
||||
root["free_mem"] = emsesp::System::free_mem();
|
||||
root["uptime"] = uuid::log::format_timestamp_ms(uuid::get_uptime_ms(), 3); // proddy added
|
||||
root["free_mem"] = emsesp::System::free_mem(); // proddy added
|
||||
|
||||
response->setLength();
|
||||
request->send(response);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <ESP8266WiFi.h>
|
||||
#include <ESPAsyncTCP.h>
|
||||
#include <FS.h>
|
||||
#include <LittleFS.h> // TODO added littlefs
|
||||
#include <LittleFS.h> // proddy added
|
||||
#endif
|
||||
|
||||
#include <ArduinoJson.h>
|
||||
@@ -17,8 +17,8 @@
|
||||
#include <ESPAsyncWebServer.h>
|
||||
#include <SecurityManager.h>
|
||||
|
||||
#include <uuid/log.h>
|
||||
#include "../../src/system.h"
|
||||
#include <uuid/log.h> // proddy added
|
||||
#include "../../src/system.h" // proddy added
|
||||
|
||||
#define MAX_ESP_STATUS_SIZE 1024
|
||||
#define SYSTEM_STATUS_SERVICE_PATH "/rest/systemStatus"
|
||||
|
||||
Reference in New Issue
Block a user