Compare commits

..

No commits in common. "3bd53bbaca83f7d50566657d505f69e6b1a86379" and "47058d2b2710ad1b82c1f70357b263e96ca90107" have entirely different histories.

3 changed files with 5 additions and 37 deletions

View File

@ -1 +1 @@
v20260112-17-synology-abb-warning-recognize-objects
v20260112-16-runchecks-popup-objects-no-overlap

View File

@ -193,13 +193,11 @@ _ABB_FAILED_RE = re.compile(
# Device list lines in body, e.g.
# "Apparaatlijst (back-up gelukt): DC01, SQL01"
# "Lijst met apparaten (back-up gelukt): DC01, SQL01"
# "Apparaatlijst (back-up mislukt): FS01"
# "Device list (backup succeeded): DC01, SQL01"
# "List of devices (backup succeeded): DC01, SQL01"
# "Device list (backup failed): FS01"
_ABB_DEVICE_LIST_RE = re.compile(
r"^\s*(?:Apparaatlijst|Lijst\s+met\s+apparaten|Device\s+list|List\s+of\s+devices)\s*(?:\((?P<kind>[^)]+)\))?\s*:\s*(?P<list>.*?)\s*$",
r"^\s*(?:Apparaatlijst|Device\s+list)\s*(?:\((?P<kind>[^)]+)\))?\s*:\s*(?P<list>.+?)\s*$",
re.I,
)
@ -238,11 +236,7 @@ def _parse_active_backup_for_business(subject: str, text: str) -> Tuple[bool, Di
overall_status = "Error"
overall_message = "Failed"
# Collect device/object statuses while avoiding duplicates.
# Prefer the most severe status when a device appears multiple times.
severity = {"Error": 3, "Failed": 3, "Warning": 2, "Success": 1}
device_status: Dict[str, str] = {}
objects: List[Dict] = []
for line in (text or "").splitlines():
mm = _ABB_DEVICE_LIST_RE.match(line.strip())
if not mm:
@ -251,31 +245,15 @@ def _parse_active_backup_for_business(subject: str, text: str) -> Tuple[bool, Di
kind = (mm.group("kind") or "").lower()
line_status = overall_status
kind_is_specific = False
if "gelukt" in kind or "succeeded" in kind or "success" in kind:
line_status = "Success"
kind_is_specific = True
elif "mislukt" in kind or "failed" in kind or "error" in kind:
line_status = "Error"
kind_is_specific = True
# "DC01, SQL01"
for name in [p.strip() for p in raw_list.split(",")]:
if not name:
continue
prev = device_status.get(name)
if prev is None:
device_status[name] = line_status
continue
# Do not override specific succeeded/failed lists with a generic "device list".
if not kind_is_specific:
continue
if severity.get(line_status, 0) > severity.get(prev, 0):
device_status[name] = line_status
objects: List[Dict] = [{"name": n, "status": s} for n, s in device_status.items()]
if name:
objects.append({"name": name, "status": line_status})
result = {
"backup_software": "Synology",

View File

@ -236,16 +236,6 @@
- Fixed layout issue in the Run Checks popup where the Objects table could overlap the mail content.
- Adjusted container sizing and overflow handling to ensure the Objects table stays within its designated area.
- Ensured the mail content and Objects table are visually separated and cannot overlap regardless of content length.
---
## v20260112-17-synology-abb-warning-recognize-objects
- Extended the Synology Active Backup for Business parser to correctly detect objects listed in warning / partially completed emails.
- Improved object extraction logic to recognize devices mentioned in generic device lists (e.g. “List of devices …”), ensuring DC01 and SQL01 are included as objects.
- Ensured that when a device appears in both generic and specific status sections, the more specific status (failed / warning / success) takes precedence.
================================================================================================================================================
## v0.1.19
This release delivers a broad set of improvements focused on reliability, transparency, and operational control across mail processing, administrative auditing, and Run Checks workflows. The changes aim to make message handling more robust, provide better insight for administrators, and give operators clearer and more flexible control when reviewing backup runs.