borg-backup-ui
borg-backup-ui copied to clipboard
Fix reports for backup type IDs containing underscores
Reports can show empty metrics for jobs whose backup type ID contains underscores, for example borg_backup_taeglich_backuppf1_local. The report job list can show the job, but get_report_data parses status filenames by taking only parts[2] as backup_type and the remaining segments as location. For multi-underscore backup type IDs this no longer matches the selected job key, so run_count becomes 0 and trend/status tables show no data.
Goal:
- Parse status filenames by removing the timestamp prefix and then splitting the remaining job key by known location suffixes.
- Include SMB in the known location suffixes.
- Keep existing report behavior for simple job keys.
- Add regression coverage for multi-underscore job keys.
User impact: The Reports page shows historical run metrics for jobs with custom type IDs containing underscores instead of empty charts/tables.