feat: rename orbits; snapshots and downloads show the orbit's current name
PUT /api/v1/orbits/:id changes only the name (admin, validated, case-insensitively unique, audited). Snapshot metadata is immutable, so the list and the download file name look the orbit up by id and fall back to the written name only when the orbit is gone. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -164,7 +164,9 @@ On the target agent, add a `targets` map under the application UUID, keyed by th
|
||||
}
|
||||
```
|
||||
|
||||
Use `{"reset":"recreate_database"}` to recreate the registered PostgreSQL database. It requires access to the `postgres` maintenance database and permission to drop and create the target database. Schema mode resets the named schema and applies the dump in a transaction. A restore target can be renamed later with `PUT /api/v1/restore-targets/{id}` and `{"name": "..."}` (administrators only, 1 to 128 characters, no control characters, audited as `restore_target.renamed`). Only the display name changes: the id, the identity, the Outpost, relations and earlier jobs stay as they are. Since several applications can each have a target called `dev`, the Relations console shows the application next to every target and in its pickers, and the Refresh screen shows the application on each card. Registering a target suggests `<application> · <database>` until a name is typed.
|
||||
Use `{"reset":"recreate_database"}` to recreate the registered PostgreSQL database. It requires access to the `postgres` maintenance database and permission to drop and create the target database. Schema mode resets the named schema and applies the dump in a transaction. An orbit can be renamed with `PUT /api/v1/orbits/{id}` and `{"name": "..."}` (administrators only, 1 to 128 characters, no control characters, unique without regard to case, audited as `orbit.renamed`). Only the name changes. Snapshots keep the name they were written under inside their (immutable) metadata, so the snapshot list and the download file name look the orbit up by id and show its current name; a snapshot of an orbit that no longer exists keeps its original name.
|
||||
|
||||
A restore target can be renamed later with `PUT /api/v1/restore-targets/{id}` and `{"name": "..."}` (administrators only, 1 to 128 characters, no control characters, audited as `restore_target.renamed`). Only the display name changes: the id, the identity, the Outpost, relations and earlier jobs stay as they are. Since several applications can each have a target called `dev`, the Relations console shows the application next to every target and in its pickers, and the Refresh screen shows the application on each card. Registering a target suggests `<application> · <database>` until a name is typed.
|
||||
|
||||
Use `{"reset":"user_schemas"}` for a database whose tables live in several schemas: it drops every non-system schema (everything except `pg_*` and `information_schema`) and recreates `public`, in the same transaction as the restore, so a dump's `CREATE SCHEMA` for a schema that already exists on the target cannot collide. Schema mode only drops the one named schema, so a dump that also creates another schema that the target already has fails and rolls back; the target is left unchanged. Objects that live outside schemas (roles, publications, subscriptions) are not touched, and the connected role must own, or be allowed to drop, every schema it empties. Supply a local `post_restore_sql` file for target-specific SQL. PostgreSQL can read custom archives and plain or gzip-compressed SQL. The agent requires a psql client with restricted mode for restore. `omit_transaction_timeout` and `omit_pg_stat_statements` enable specific compatibility rules.
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ admin/browser. Semua status/data job hanya di scope owner/admin yang berizin.
|
||||
| /api/v1/access/users/:id | PUT | human | access.manage | admin | tidak ada; menonaktifkan juga memutus semua sesi; tidak untuk diri sendiri/akun darurat |
|
||||
| /api/v1/access/users/:id/revoke-sessions | POST | human | access.manage | admin | tidak ada; semua sesi user berakhir |
|
||||
| /api/v1/me/preferences | GET,PUT | human | session.self | current account | pilihan tampilan sendiri (look: window atau radar); no-store; CSRF pada PUT; token/dev tanpa akun: GET kosong, PUT 404 |
|
||||
| /api/v1/orbits/:id | PUT | human | orbit.manage | admin | hanya name (1-128, tanpa karakter kontrol, unik tanpa memedulikan huruf besar); id, provider, jadwal, retensi tidak berubah; snapshot lama tampil dengan nama terkini; diaudit `orbit.renamed` |
|
||||
| /api/v1/orbits/:id/environment | PUT | human | orbit.manage | admin | tidak ada; menandai sumber (production/staging/development); diaudit |
|
||||
| /api/v1/restore-targets/:id | PUT | human | relation.manage | admin | hanya name (1-128, tanpa karakter kontrol); id, identity, outpost, relasi, dan job lama tidak berubah; diaudit `restore_target.renamed` |
|
||||
| /api/v1/restore-targets/:id/environment | PUT | human | relation.manage | admin | relasi aktif ke target yang diberi label production berakhir seketika; diaudit |
|
||||
|
||||
Reference in New Issue
Block a user