From 7a9008de78ae54faa5437980972de34369421670 Mon Sep 17 00:00:00 2001 From: Roby Date: Thu, 22 Oct 2026 22:53:42 +0200 Subject: [PATCH] update --- monitor.sh | 11 +++++++++++ templates/index.html | 6 ++++-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100755 monitor.sh diff --git a/monitor.sh b/monitor.sh new file mode 100755 index 0000000..272d174 --- /dev/null +++ b/monitor.sh @@ -0,0 +1,11 @@ +#!/bin/bash +echo "⏳ In ascolto di crash o timeout su Fleet Console... (Premi CTRL+C per fermare)" +echo "--------------------------------------------------------------------------------" + +# Cattura gli errori dal demone systemd (Gunicorn) +journalctl -u fleet-console -f | grep --line-buffered --color=always -iE "error|traceback|exception|timeout|worker|exited|failed|killed|critical" & + +# Cattura gli errori dal file di log di Python +tail -F /opt/fleet-control-server/fleet_console.log | grep --line-buffered --color=always -iE "error|traceback|exception|locked|critical" & + +wait diff --git a/templates/index.html b/templates/index.html index 7fa363f..3830174 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1004,10 +1004,12 @@ let btnOta = document.getElementById(`btn-ota-${c.id}`); if (btnOta) { if (healthObj && healthObj.agent_update_available) { - btnOta.style.background = 'var(--danger)'; + btnOta.style.setProperty('background', 'var(--danger)', 'important'); + btnOta.style.setProperty('color', 'white', 'important'); btnOta.style.animation = 'pulse-red 1.5s infinite'; } else { - btnOta.style.background = '#2563eb'; + btnOta.style.setProperty('background', '#2563eb', 'important'); + btnOta.style.setProperty('color', 'white', 'important'); btnOta.style.animation = 'none'; } }