Minify naming, increase refresh 10s-15s

This commit is contained in:
Daniel 2024-04-02 22:41:10 +03:00
parent 21c42c48f8
commit 101be83a88

View file

@ -598,25 +598,25 @@ String processor(const String& var) {
content += "</div>"; content += "</div>";
#endif #endif
content += "<button onclick='goToUpdatePage()'>Perform OTA update</button>"; content += "<button onclick='OTA()'>Perform OTA update</button>";
content += " "; content += " ";
content += "<button onclick='goToSettingsPage()'>Change Settings</button>"; content += "<button onclick='Settings()'>Change Settings</button>";
content += " "; content += " ";
content += "<button onclick='goToCellmonitorPage()'>Cellmonitor</button>"; content += "<button onclick='Cellmon()'>Cellmonitor</button>";
content += " "; content += " ";
content += "<button onclick='goToEventsPage()'>Events</button>"; content += "<button onclick='Events()'>Events</button>";
content += " "; content += " ";
content += "<button onclick='promptToReboot()'>Reboot Emulator</button>"; content += "<button onclick='askReboot()'>Reboot Emulator</button>";
content += "<script>"; content += "<script>";
content += "function goToUpdatePage() { window.location.href = '/update'; }"; content += "function OTA() { window.location.href = '/update'; }";
content += "function goToCellmonitorPage() { window.location.href = '/cellmonitor'; }"; content += "function Cellmon() { window.location.href = '/cellmonitor'; }";
content += "function goToSettingsPage() { window.location.href = '/settings'; }"; content += "function Settings() { window.location.href = '/settings'; }";
content += "function goToEventsPage() { window.location.href = '/events'; }"; content += "function Events() { window.location.href = '/events'; }";
content += content +=
"function promptToReboot() { if (window.confirm('Are you sure you want to reboot the emulator? NOTE: If " "function askReboot() { if (window.confirm('Are you sure you want to reboot the emulator? NOTE: If "
"emulator is handling contactors, they will open during reboot!')) { " "emulator is handling contactors, they will open during reboot!')) { "
"rebootServer(); } }"; "reboot(); } }";
content += "function rebootServer() {"; content += "function reboot() {";
content += " var xhr = new XMLHttpRequest();"; content += " var xhr = new XMLHttpRequest();";
content += " xhr.open('GET', '/reboot', true);"; content += " xhr.open('GET', '/reboot', true);";
content += " xhr.send();"; content += " xhr.send();";
@ -625,7 +625,7 @@ String processor(const String& var) {
//Script for refreshing page //Script for refreshing page
content += "<script>"; content += "<script>";
content += "setTimeout(function(){ location.reload(true); }, 10000);"; content += "setTimeout(function(){ location.reload(true); }, 15000);";
content += "</script>"; content += "</script>";
return content; return content;