edit_explain_7_abort.html 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <!DOCTYPE html>
  2. <html lang="en" xml:lang="en">
  3. <head>
  4. <title>AI on the edge</title>
  5. <meta charset="UTF-8" />
  6. <style>
  7. h1 {font-size: 2em; margin-block-end: 0.3em;}
  8. h2 {font-size: 1.5em;margin-block-start: 0.3em;}
  9. h3 {font-size: 1.2em;}
  10. p {font-size: 1em;}
  11. .button {
  12. padding: 5px 10px;
  13. width: 205px;
  14. font-size: 16px;
  15. }
  16. </style>
  17. <link href="firework.css?v=$COMMIT_HASH" rel="stylesheet">
  18. <script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
  19. <script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
  20. </head>
  21. <body style="font-family: arial">
  22. <h4>Initial setup aborted!</h4>
  23. <p>You have <b>aborted</b> the initial setup!</p>
  24. <p>Once you push the button below, the setup mode will be ended and the device will be automatically restart to regular web interface.
  25. Please be aware: The configuration of the device is not or only parly adapted to your needs!<br>
  26. Configuration can still be adapted / completed using regular web interface.
  27. </p>
  28. <p>
  29. <button class="button" onclick="reboot()">Abort Setup + Reboot</button>
  30. </p>
  31. <script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
  32. <script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
  33. <script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
  34. <script type="text/javascript">
  35. function reboot() {
  36. if (confirm("Do you want to abort the setup mode and switch to regular web interface?")) {
  37. domainname = getDomainname();
  38. if (!loadConfig(domainname)) {
  39. firework.launch('Setup mode could not be deactivated! Please try again!', 'danger', 30000);
  40. return;
  41. }
  42. ParseConfig();
  43. param = getConfigParameters();
  44. param["System"]["SetupMode"]["enabled"] = true;
  45. param["System"]["SetupMode"]["value1"] = "false";
  46. WriteConfigININew();
  47. SaveConfigToServer(domainname);
  48. var stringota = getDomainname() + "/reboot";
  49. parent.location = stringota;
  50. parent.location.href = stringota;
  51. parent.location.assign(stringota);
  52. parent.location.replace(stringota);
  53. }
  54. }
  55. </script>
  56. </body>
  57. </html>