dev #2

Merged
alientim merged 32 commits from dev into main 2025-10-12 17:19:37 +02:00
Showing only changes of commit 0d784a0530 - Show all commits

View File

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