From 85596c3882510c45b7e0d3beecfa631270628f31 Mon Sep 17 00:00:00 2001 From: PaulVua Date: Tue, 17 Mar 2026 20:01:16 +0100 Subject: [PATCH] Admin Clock: alerte rouge avec icone si module RTC deconnecte Detecte rtc_module_time='not connected', affiche un warning avec icone attention + message 'Verifiez la pile et les cables I2C'. Le champ RTC passe en bordure rouge. Distingue clairement deconnexion hardware vs simple desynchronisation. Co-Authored-By: Claude Opus 4.6 (1M context) --- html/admin.html | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/html/admin.html b/html/admin.html index 35b78ed..5e775e8 100755 --- a/html/admin.html +++ b/html/admin.html @@ -612,8 +612,23 @@ window.onload = function() { // Compare RTC time with browser time const alertContainer = document.getElementById("alert_container"); alertContainer.innerHTML = ""; + const rtcInput = document.getElementById("RTC_utc_time"); - if (response.rtc_module_time) { + if (response.rtc_module_time === 'not connected' || !response.rtc_module_time) { + // RTC module disconnected + rtcInput.classList.add('border-danger', 'text-danger'); + rtcInput.classList.remove('border-primary'); + alertContainer.innerHTML = ` + `; + } else { const rtcDate = new Date(response.rtc_module_time + ' UTC'); const timeDiff = Math.abs(Math.round((browserDate - rtcDate) / 1000));