diff --git a/src/app.h b/src/app.h index 52f5591d..b5f30346 100644 --- a/src/app.h +++ b/src/app.h @@ -92,6 +92,10 @@ class app : public IApp, public ah::Scheduler { return mSettings.getLastSaveSucceed(); } + bool getShouldReboot() { + return mSaveReboot; + } + statistics_t *getStatistics() { return &mStat; } diff --git a/src/appInterface.h b/src/appInterface.h index 44491d91..0c67415e 100644 --- a/src/appInterface.h +++ b/src/appInterface.h @@ -20,6 +20,7 @@ class IApp { virtual bool eraseSettings(bool eraseWifi) = 0; virtual bool getSavePending() = 0; virtual bool getLastSaveSucceed() = 0; + virtual bool getShouldReboot() = 0; virtual void setOnUpdate() = 0; virtual void setRebootFlag() = 0; virtual const char *getVersion() = 0; diff --git a/src/web/RestApi.h b/src/web/RestApi.h index 2d617847..fde8c7a4 100644 --- a/src/web/RestApi.h +++ b/src/web/RestApi.h @@ -276,6 +276,7 @@ class RestApi { getGeneric(request, obj.createNestedObject(F("generic"))); obj["pending"] = (bool)mApp->getSavePending(); obj["success"] = (bool)mApp->getLastSaveSucceed(); + obj["reboot"] = (bool)mApp->getShouldReboot(); } void getReboot(AsyncWebServerRequest *request, JsonObject obj) { diff --git a/src/web/html/api.js b/src/web/html/api.js index 5ccb0e15..cdc9e748 100644 --- a/src/web/html/api.js +++ b/src/web/html/api.js @@ -103,9 +103,11 @@ function parseVersion(obj) { } function parseESP(obj) { - document.getElementById("esp_type").append( - document.createTextNode("Board: " + obj["esp_type"]) - ); + if(document.getElementById("esp_type").childNodes.length < 1) { + document.getElementById("esp_type").append( + document.createTextNode("Board: " + obj["esp_type"]) + ); + } } function parseRssi(obj) { diff --git a/src/web/html/save.html b/src/web/html/save.html index 54d43d7f..f3b1896d 100644 --- a/src/web/html/save.html +++ b/src/web/html/save.html @@ -8,11 +8,14 @@ {#HTML_NAV}