[pbs-devel] [PATCH proxmox-backup 3/4] bin: show direction in sync job list output

Christian Ebner c.ebner at proxmox.com
Mon Nov 25 18:40:11 CET 2024


As the WebUI also lists the sync direction, display the direction in
the cli output as well.

Examplary output:
```
┌─────────────────┬────────────────┬───────────┬────────┬───────────────────┬──────────┬──────────────┬─────────┬─────────┐
│ id              │ sync-direction │ store     │ remote │ remote-store      │ schedule │ group-filter │ rate-in │ comment │
╞═════════════════╪════════════════╪═══════════╪════════╪═══════════════════╪══════════╪══════════════╪═════════╪═════════╡
│ s-6c16fab2-9e85 │                │ datastore │        │ datastore         │ hourly   │ all          │         │         │
├─────────────────┼────────────────┼───────────┼────────┼───────────────────┼──────────┼──────────────┼─────────┼─────────┤
│ s-8764c440-3a6c │ push           │ datastore │ local  │ push-target-store │ hourly   │ all          │         │         │
└─────────────────┴────────────────┴───────────┴────────┴───────────────────┴──────────┴──────────────┴─────────┴─────────┘
```

Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
 src/bin/proxmox_backup_manager/sync.rs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bin/proxmox_backup_manager/sync.rs b/src/bin/proxmox_backup_manager/sync.rs
index 3ccaae943..42df08d30 100644
--- a/src/bin/proxmox_backup_manager/sync.rs
+++ b/src/bin/proxmox_backup_manager/sync.rs
@@ -44,6 +44,7 @@ fn list_sync_jobs(param: Value, rpcenv: &mut dyn RpcEnvironment) -> Result<Value
 
     let options = default_table_format_options()
         .column(ColumnConfig::new("id"))
+        .column(ColumnConfig::new("sync-direction"))
         .column(ColumnConfig::new("store"))
         .column(ColumnConfig::new("remote"))
         .column(ColumnConfig::new("remote-store"))
-- 
2.39.5





More information about the pbs-devel mailing list