wrolpi/modules
Roland 6a46cfd17d
Add manual import + backup Restore/Merge/Overwrite for inventory configs
Inventories are a config-only MultiFileConfig (config/inventory/<slug>.yaml) and
were not reachable by the admin config Restore UI, so there was no way to re-import
a hand-edited/copied-in file or restore an inventory from its daily backup.

Backend:
- MultiFileConfig gains generic helpers: get_backup_dates(slug)/_get_backup_file
  (surface the daily config/backup/<subdir>/<slug>-DATE.yaml files) and reimport()
  (rebuild the in-memory store from disk; picks up hand-edits and copied-in files,
  drops files deleted on disk).  backup_date is constrained to YYYYMMDD so it cannot
  traverse out of the backup directory.
- InventoriesConfig.preview_restore/apply_restore: overwrite replaces the whole
  inventory; merge unions items by id (keeps current fields and existing items).
  The pre-restore state is backed up automatically, so a restore is undoable.
- API: POST /inventory/reimport, GET /inventory/<slug>/backups,
  POST /inventory/<slug>/restore/preview, POST /inventory/<slug>/restore.

Frontend:
- New InventoryImportModal (opened from a Restore button in the Inventory toolbar):
  Re-import from disk, plus a dated-backup table with per-row Merge/Overwrite that
  previews the change before applying.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 16:28:11 -06:00
..
archive HTML indexer is binary-safe; it indexes the page inside a compressed singlefile. 2026-06-12 17:24:02 -06:00
docs Consolidating deletion endpoints. 2026-05-03 19:14:30 -06:00
inventory Add manual import + backup Restore/Merge/Overwrite for inventory configs 2026-06-19 16:28:11 -06:00
map Migrating map downloaders. 2026-05-07 15:54:53 -06:00
videos Fix swapped arguments in download_info_json Video.get_by_url call 2026-06-19 12:01:42 -06:00
zim Fixing kiwix restart cmd: missing comma silently concatenated two argv entries. 2026-05-25 20:16:02 -06:00
__init__.py Move One-Time Pad encryption to the browser (#479) 2026-06-13 13:52:34 -06:00