diff --git a/app.py b/app.py index 7c94258..6a016d6 100644 --- a/app.py +++ b/app.py @@ -426,7 +426,8 @@ def on_message(client, userdata, msg): "files": data.get("files", data.get("config_files", [])), "file_names": data.get("file_names", []), "profiles": data.get("profiles", {"A": "PROFILE A", "B": "PROFILE B"}), - "interval": data.get("update_interval") + "interval": data.get("update_interval"), + "uptime": data.get("uptime_seconds", 0) } bin_versions = data.get("versions", {}) if bin_versions: diff --git a/templates/index.html b/templates/index.html index fcb6c6b..a84758b 100644 --- a/templates/index.html +++ b/templates/index.html @@ -758,6 +758,7 @@ 🌡️ --°C 🧠 --% 💾 --% + ⏱️ --
@@ -947,6 +948,11 @@ let tempVal = healthObj.temp; tempSpan.innerText = tempVal; tempSpan.style.color = tempVal < 55 ? 'var(--success)' : (tempVal < 70 ? '#f59e0b' : 'var(--danger)'); ramSpan.innerText = healthObj.ram; let d = healthObj.disk; diskSpan.innerText = d; diskSpan.style.color = d < 85 ? 'inherit' : (d < 95 ? '#f59e0b' : 'var(--danger)'); + let upSpan = document.getElementById(`up-${c.id}`); + if (upSpan && healthObj.uptime) { + upSpan.innerText = fmtAge(healthObj.uptime); + } + const profBtnsDiv = document.getElementById(`prof-btns-${c.id}`); const profKeys = JSON.stringify(healthObj.profiles || {});