Record the final rsync log path for successful real backup runs, matching the existing dry-run and failure result payloads. Add a staff-only run log endpoint and surface the link on run detail pages, including fallback log discovery for older runs based on snapshot_path. Cover direct log links and inferred scheduled backup logs with view tests.
40 lines
2.3 KiB
Python
40 lines
2.3 KiB
Python
from __future__ import annotations
|
|
|
|
from django.contrib import admin
|
|
from django.urls import path
|
|
|
|
from pobsync_backend import api, views
|
|
|
|
|
|
urlpatterns = [
|
|
path("", views.dashboard, name="dashboard"),
|
|
path("self-check/", views.self_check, name="self_check"),
|
|
path("logs/", views.logs, name="logs"),
|
|
path("config/global/", views.edit_global_config, name="edit_global_config"),
|
|
path("ssh-credentials/", views.ssh_credentials, name="ssh_credentials"),
|
|
path("ssh-credentials/new/", views.create_ssh_credential, name="create_ssh_credential"),
|
|
path("ssh-credentials/generate/", views.generate_ssh_credential, name="generate_ssh_credential"),
|
|
path("ssh-credentials/<int:credential_id>/", views.edit_ssh_credential, name="edit_ssh_credential"),
|
|
path("ssh-credentials/<int:credential_id>/delete/", views.delete_ssh_credential, name="delete_ssh_credential"),
|
|
path("hosts/new/", views.create_host_config, name="create_host_config"),
|
|
path("hosts/<str:host>/", views.host_detail, name="host_detail"),
|
|
path("hosts/<str:host>/config/", views.edit_host_config, name="edit_host_config"),
|
|
path("hosts/<str:host>/prepare-directories/", views.prepare_host_directories, name="prepare_host_directories"),
|
|
path("hosts/<str:host>/scan-known-key/", views.scan_host_known_key, name="scan_host_known_key"),
|
|
path("hosts/<str:host>/queue-backup/", views.queue_manual_backup, name="queue_manual_backup"),
|
|
path("hosts/<str:host>/discover-snapshots/", views.discover_host_snapshots, name="discover_host_snapshots"),
|
|
path("hosts/<str:host>/retention-apply/", views.apply_host_retention, name="apply_host_retention"),
|
|
path("hosts/<str:host>/retention-plan/", views.host_retention_plan, name="host_retention_plan"),
|
|
path("hosts/<str:host>/schedule/", views.edit_host_schedule, name="edit_host_schedule"),
|
|
path("runs/<int:run_id>/", views.run_detail, name="run_detail"),
|
|
path("runs/<int:run_id>/rsync-log/", views.run_rsync_log, name="run_rsync_log"),
|
|
path("runs/<int:run_id>/cancel/", views.cancel_run, name="cancel_run"),
|
|
path("snapshots/<int:snapshot_id>/", views.snapshot_detail, name="snapshot_detail"),
|
|
path("api/", api.api_index),
|
|
path("api/status/", api.status),
|
|
path("api/hosts/", api.hosts),
|
|
path("api/snapshots/", api.snapshots),
|
|
path("api/runs/", api.runs),
|
|
path("admin/", admin.site.urls),
|
|
]
|