From e23f5863444a5ce5043ee017d9b6bee287fc53ca Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 27 Feb 2020 11:38:09 +0100 Subject: [PATCH] src/bin/proxmox-backup-client.rs - status: improve alignment --- src/bin/proxmox-backup-client.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bin/proxmox-backup-client.rs b/src/bin/proxmox-backup-client.rs index 2093f988..73722d0a 100644 --- a/src/bin/proxmox-backup-client.rs +++ b/src/bin/proxmox-backup-client.rs @@ -1481,13 +1481,14 @@ async fn status(param: Value) -> Result { let total = record["total"].as_u64().unwrap(); let roundup = total/200; let per = ((v+roundup)*100)/total; - Ok(format!("{} ({} %)", v, per)) + let info = format!(" ({} %)", per); + Ok(format!("{} {:>8}", v, info)) }; let options = TableFormatOptions::new() .noborder(false) .noheader(true) - .column(ColumnConfig::new("total")) + .column(ColumnConfig::new("total").renderer(render_total_percentage)) .column(ColumnConfig::new("used").renderer(render_total_percentage)) .column(ColumnConfig::new("avail").renderer(render_total_percentage));