Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beautify Restart Page and auto reload #947

Closed
caco3 opened this issue Aug 25, 2022 · 4 comments
Closed

Beautify Restart Page and auto reload #947

caco3 opened this issue Aug 25, 2022 · 4 comments

Comments

@caco3
Copy link
Collaborator

caco3 commented Aug 25, 2022

When doing a restart, the iframe shows a rater ugly non-styled message. !!! System will restart within 5 sec!!!.

I know this comes directly from the code (https://github.com/jomjol/AI-on-the-edge-device/blob/master/code/components/jomjol_fileserver_ota/server_ota.cpp#L438).

I would suggest to also show

  • a formated message
  • Using javascript to automatically reload the page once the ESP32 is up again.

let me know what you think and I will try to create a PR.

@caco3 caco3 changed the title Beautify Restart Page Beautify Restart Page and auto reload Aug 25, 2022
@jomjol
Copy link
Owner

jomjol commented Aug 25, 2022

Updates to the html page are always welcome - just go ahead!

@caco3
Copy link
Collaborator Author

caco3 commented Aug 25, 2022

It will also need to embed some html code in the place of https://github.com/jomjol/AI-on-the-edge-device/blob/master/code/components/jomjol_fileserver_ota/server_ota.cpp#L438

Could you explain, what the line ESP_LOGI(TAGPARTOTA, "!!! System will restart within 5 sec!!!"); does?

For following lines I interpret that thats what gets sent to the Webbrowser:

const char* resp_str = "!!! System will restart within 5 sec!!!";
    httpd_resp_send(req, resp_str, strlen(resp_str)); 

@jomjol
Copy link
Owner

jomjol commented Aug 26, 2022

Yes, this is true. With this line of code you send the html to the client.

@caco3
Copy link
Collaborator Author

caco3 commented Aug 26, 2022

Please have a look on #949

@caco3 caco3 closed this as completed Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants