Phase 1 of the migration-system refresh. Surfaces Phase 0's kernel
(libreportal restore migrate ...) as a WebUI flow so users don't have
to drop to the CLI to pull an app from a peer's backups.
backend / data generator:
scripts/webui/data/generators/backup/webui_backup_migrate.sh
Walks every enabled backup location, lists every (other_host, app)
pair with snapshot count + latest id/date, and emits a single
destination summary block (installed apps, running apps, disk free)
so the frontend can compute collisions and warnings without per-row
API round-trips. Filters out our own hostname — we don't migrate to
ourselves. Output: data/backup/generated/migrate.json.
Hooked into the standard webuiLibrePortalUpdate refresh pipeline,
so 'libreportal regen webui' (and the periodic task-processor poll)
keep it fresh on their own.
frontend:
- New 'Migrate' sidebar tab on /backup, sits between Locations and
Configuration. Path-based URL: /backup/migrate.
- Per-source-host cards listing every available app, with snapshot
count + relative-time hint, collision dot when the app is already
installed here, and per-app + per-host migrate buttons.
- Confirm modal with two checkboxes matching the kernel's defaults:
[✓] Back up the destination's existing copy first (pre-migrate
backup; auto-disabled when there's nothing to back up)
[✓] Rewrite host-bound URLs to this host (URL rewrite
— uncheck only to keep source hostnames)
On confirm, runs 'libreportal restore migrate app/system …' via the
task system; opt-out checkboxes append --no-pre-backup / --keep-urls
only when the user un-ticks, matching the kernel's default-on flags.
- Empty state when no other hosts have visible backups, explaining
the shared-backup-location prerequisite.
The CLI dispatcher hooks (Phase 0) wire restore migrate app/system to
migrateApplyApp/migrateApplySystem, so the WebUI gets pre-backup safety,
URL rewrite, and structured progress (when --json-progress is set; not
needed here yet — the task system's log tail is enough for v1).
Signed-off-by: librelad <librelad@digitalangels.vip>
54 lines
2.5 KiB
Bash
Executable File
54 lines
2.5 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# This file is auto-generated by generate_arrays.sh
|
|
# Do not edit manually - run './scripts/source/files/generate_arrays.sh run' to regenerate
|
|
|
|
webui_scripts=(
|
|
"webui/data/generators/apps/webui_app_config.sh"
|
|
"webui/data/generators/apps/webui_app_status.sh"
|
|
"webui/data/generators/apps/webui_config_patch.sh"
|
|
"webui/data/generators/apps/webui_config.sh"
|
|
"webui/data/generators/apps/webui_services.sh"
|
|
"webui/data/generators/apps/webui_tools.sh"
|
|
"webui/data/generators/backup/webui_backup_app_status.sh"
|
|
"webui/data/generators/backup/webui_backup_dashboard.sh"
|
|
"webui/data/generators/backup/webui_backup_engines.sh"
|
|
"webui/data/generators/backup/webui_backup_locations.sh"
|
|
"webui/data/generators/backup/webui_backup_migrate.sh"
|
|
"webui/data/generators/backup/webui_backup_passwords.sh"
|
|
"webui/data/generators/backup/webui_backup_schema.sh"
|
|
"webui/data/generators/backup/webui_backup_snapshots.sh"
|
|
"webui/data/generators/backup/webui_task_create.sh"
|
|
"webui/data/generators/categories/webui_create_all_categories.sh"
|
|
"webui/data/generators/categories/webui_create_app_categories.sh"
|
|
"webui/data/generators/categories/webui_create_app_config_categories.sh"
|
|
"webui/data/generators/categories/webui_create_app_field_mappings.sh"
|
|
"webui/data/generators/config/webui_cli_config_set.sh"
|
|
"webui/data/generators/config/webui_generate_configs.sh"
|
|
"webui/data/generators/config/webui_update_config.sh"
|
|
"webui/data/generators/system/webui_ssh_access.sh"
|
|
"webui/data/generators/system/webui_system_disk.sh"
|
|
"webui/data/generators/system/webui_system_info.sh"
|
|
"webui/data/generators/system/webui_system_memory.sh"
|
|
"webui/data/generators/system/webui_system_metrics.sh"
|
|
"webui/data/generators/system/webui_system_update.sh"
|
|
"webui/data/lock/webui_check_update_lock.sh"
|
|
"webui/data/lock/webui_create_update_lock.sh"
|
|
"webui/data/lock/webui_remove_setup_lock.sh"
|
|
"webui/data/lock/webui_remove_update_lock.sh"
|
|
"webui/data/logs/webui_app_logs.sh"
|
|
"webui/data/logs/webui_logs_folders.sh"
|
|
"webui/data/tasks/webui_task_files.sh"
|
|
"webui/data/utils/webui_app_icons.sh"
|
|
"webui/data/utils/webui_app_log.sh"
|
|
"webui/data/utils/webui_atomic_write.sh"
|
|
"webui/data/utils/webui_container_setup.sh"
|
|
"webui/webui_display_logins.sh"
|
|
"webui/webui_install_app.sh"
|
|
"webui/webui_install_image.sh"
|
|
"webui/webui_install_systemd.sh"
|
|
"webui/webui_regen.sh"
|
|
"webui/webui_updater.sh"
|
|
|
|
)
|