mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 00:39:50 +03:00
introduce system status in WebUI for easier monitoring of tasks
This commit is contained in:
@@ -118,7 +118,8 @@ void UploadFileService::uploadComplete(AsyncWebServerRequest * request) {
|
||||
request->_tempFile.close(); // close the file handle as the upload is now done
|
||||
AsyncWebServerResponse * response = request->beginResponse(200);
|
||||
request->send(response);
|
||||
emsesp::EMSESP::system_.restart_pending(true); // will be handled by the main loop. We use pending for the Web's RestartMonitor
|
||||
emsesp::EMSESP::system_.systemStatus(
|
||||
emsesp::SYSTEM_STATUS::SYSTEM_STATUS_PENDING_RESTART); // will be handled by the main loop. We use pending for the Web's SystemMonitor
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -127,7 +128,8 @@ void UploadFileService::uploadComplete(AsyncWebServerRequest * request) {
|
||||
if (_is_firmware && !request->_tempObject) {
|
||||
AsyncWebServerResponse * response = request->beginResponse(200);
|
||||
request->send(response);
|
||||
emsesp::EMSESP::system_.restart_pending(true); // will be handled by the main loop. We use pending for the Web's RestartMonitor
|
||||
emsesp::EMSESP::system_.systemStatus(
|
||||
emsesp::SYSTEM_STATUS::SYSTEM_STATUS_PENDING_RESTART); // will be handled by the main loop. We use pending for the Web's SystemMonitor
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user