fix ota upload
All checks were successful
Compilie project and upload binaries / test (push) Successful in 3m59s

This commit is contained in:
2025-11-05 22:08:42 +01:00
parent 53920dbb77
commit 3dc339c449
8 changed files with 84 additions and 31 deletions

View File

@@ -49,7 +49,7 @@ function fetchWaterData(gauge) {
}
function fetchUpdateData(gauge) {
const apiUrl = '/ota_udpate_status';
const apiUrl = '/ota_update_status';
// Fetching data from the API
fetch(apiUrl)
.then(response => response.json())

View File

@@ -5,20 +5,8 @@
</head>
<body>
<div class="container">
<div class="card bd-success">
<header class="is-center">
<h4>Update running</h4>
</header>
<div class="is-center" id="progress">
Running update...
</div>
</div>
</div>
</body>
<script>
const webSocket = new WebSocket('webSocket://' + window.location.host + '/webSocket');
<script>
const webSocket = new WebSocket('ws://' + window.location.host + '/webSocket');
webSocket.onopen = function() {
console.log('WebSocket connection opened.');
@@ -32,7 +20,7 @@
document.getElementById('progress').textContent = "Upgrade Done, wait for reboot...";
const checkStatus = setInterval(() => {
fetch('/ota_udpate_status')
fetch('/ota_update_status')
.then(response => {
if (response.ok) {
clearInterval(checkStatus);
@@ -55,4 +43,16 @@
webSocket.onclose = function() {
console.log('WebSocket connection closed.');
};
</script>
</script>
<div class="container">
<div class="card bd-success">
<header class="is-center">
<h4>Update running</h4>
</header>
<div class="is-center" id="progress">
Running update...
</div>
</div>
</div>
</body>