fixed time

This commit is contained in:
2025-11-04 21:09:40 +01:00
parent 8196ae4601
commit 4f02a8f3d0
14 changed files with 120 additions and 129 deletions

View File

@@ -25,6 +25,7 @@ function fetchTelemetryData() {
.then(data => {
document.getElementById('uptime').textContent = data.uptime_seconds ? (roundToTwo(data.uptime_seconds) + ' s') : 'XXX';
document.getElementById('heap').textContent = data.heap_percent ? (roundToTwo(data.heap_percent) + ' %%') : 'XXX';
document.getElementById('temperature').textContent = data.heap_percent ? (roundToTwo(data.temperature) + ' °C') : 'XXX';
})
.catch(error => {
console.error("There was an error fetching data from the API", error);

View File

@@ -1,4 +1,5 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<head>
<link rel="stylesheet" href="/chota.css">
@@ -19,9 +20,6 @@
<a href="/export">Data export</a>
</div>
</div>
<div class="nav-right">
<a class="button outline">Button</a>
</div>
</nav>
<div class="row">
@@ -121,6 +119,10 @@
<td>Heap usage: </td>
<td id="heap">XXX</td>
</tr>
<tr>
<td>CPU Temperature: </td>
<td id="temperature">XXX</td>
</tr>
</tbody>
</table>
</div>