diff --git a/README.md b/README.md index 9b77ac3..755a176 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ python3 manage.py runserver The admin is available at: +- http://127.0.0.1:8000/ - http://127.0.0.1:8000/admin/ Staff-only JSON endpoints are available at: @@ -116,6 +117,7 @@ docker compose up --build web This starts Django on: +- http://127.0.0.1:8010/ - http://127.0.0.1:8010/admin/ - http://127.0.0.1:8010/api/ - http://127.0.0.1:8010/api/status/ @@ -150,6 +152,7 @@ base record when it is known. The Django retention command plans from `SnapshotRecord` instead of rediscovering snapshots from the filesystem. Post-backup pruning from Django also uses the SQL retention service after the completed snapshot is recorded. Staff-only JSON endpoints expose service status, hosts, snapshots, and backup runs for lightweight inspection. +Staff-only dashboard views expose the same operational state through Django templates. The remaining internal engine code still contains reusable backup primitives: diff --git a/src/pobsync_backend/templates/pobsync_backend/base.html b/src/pobsync_backend/templates/pobsync_backend/base.html new file mode 100644 index 0000000..8aaa3b5 --- /dev/null +++ b/src/pobsync_backend/templates/pobsync_backend/base.html @@ -0,0 +1,103 @@ + + +
+ + +| Host | +Address | +Enabled | +Snapshots | +Runs | +Retention | +
|---|---|---|---|---|---|
| {{ host.host }} | +{{ host.address }} | +{{ host.enabled|yesno:"yes,no" }} | +{{ host.snapshot_count }} | +{{ host.run_count }} | +d{{ host.retention_daily }} w{{ host.retention_weekly }} m{{ host.retention_monthly }} y{{ host.retention_yearly }} | +
| No hosts configured yet. | |||||
| Host | +Status | +Started | +Ended | +Snapshot | +Rsync | +
|---|---|---|---|---|---|
| {{ run.host.host }} | +{{ run.status }} | +{{ run.started_at|default:"" }} | +{{ run.ended_at|default:"" }} | +{% if run.snapshot %}{{ run.snapshot.dirname }}{% else %}{{ run.snapshot_path }}{% endif %} | +{{ run.rsync_exit_code|default:"" }} | +
| No backup runs recorded yet. | |||||
No schedule configured.
+ {% endif %} +| Status | +Started | +Ended | +Snapshot | +Base | +Rsync | +
|---|---|---|---|---|---|
| {{ run.status }} | +{{ run.started_at|default:"" }} | +{{ run.ended_at|default:"" }} | +{% if run.snapshot %}{{ run.snapshot.dirname }}{% else %}{{ run.snapshot_path }}{% endif %} | +{{ run.base_path|default:"" }} | +{{ run.rsync_exit_code|default:"" }} | +
| No backup runs recorded for this host. | |||||
| Kind | +Status | +Started | +Dirname | +Base | +
|---|---|---|---|---|
| {{ snapshot.kind }} | +{{ snapshot.status }} | +{{ snapshot.started_at|default:"" }} | +{{ snapshot.dirname }} | +{% if snapshot.base %}{{ snapshot.base.dirname }}{% else %}{{ snapshot.base_dirname }}{% endif %} | +
| No snapshots discovered for this host. | ||||