srv/poe_manager/app.py aktualisiert

This commit is contained in:
2025-10-12 15:22:08 +02:00
parent 34ef2c4e2a
commit 0d784a0530

View File

@@ -106,10 +106,10 @@ def index():
for line in f:
line = line.strip()
for dev in devices:
# exakte Prüfung, Name gefolgt von 'ist erreichbar!' oder 'ist nicht erreichbar!'
if line.startswith(f"{dev[1]} ist erreichbar!"):
# prüfen, ob Name enthalten ist und Statusphrase
if f"{dev[1]} ist erreichbar!" in line:
status_dict[dev[0]] = "online"
elif line.startswith(f"{dev[1]} ist nicht erreichbar!"):
elif f"{dev[1]} ist nicht erreichbar!" in line:
status_dict[dev[0]] = "offline"
# Template rendern mit Devices, Status und Intervall