Version bumps, OTA working
All checks were successful
Test compiling project / test (push) Successful in 2m23s
All checks were successful
Test compiling project / test (push) Successful in 2m23s
This commit is contained in:
@@ -28,7 +28,24 @@
|
||||
console.log('Progress:', event.data);
|
||||
// Update the progress bar
|
||||
let progress = parseInt(event.data);
|
||||
document.getElementById('progress').textContent = progress + '%';
|
||||
if (progress == -1) {
|
||||
document.getElementById('progress').textContent = "Upgrade Done, wait for reboot...";
|
||||
|
||||
const checkStatus = setInterval(() => {
|
||||
fetch('/ota_udpate_status')
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
clearInterval(checkStatus);
|
||||
window.location.href = '/';
|
||||
}
|
||||
})
|
||||
.catch(error => console.error('Error checking OTA update status:', error));
|
||||
}, 1000);
|
||||
} else {
|
||||
document.getElementById('progress').textContent = progress + '%';
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
ws.onerror = function(error) {
|
||||
|
||||
Reference in New Issue
Block a user