src/bin/proxmox-backup-client.rs - status: improve alignment
This commit is contained in:
parent
be2425ff85
commit
e23f586344
@ -1481,13 +1481,14 @@ async fn status(param: Value) -> Result<Value, Error> {
|
|||||||
let total = record["total"].as_u64().unwrap();
|
let total = record["total"].as_u64().unwrap();
|
||||||
let roundup = total/200;
|
let roundup = total/200;
|
||||||
let per = ((v+roundup)*100)/total;
|
let per = ((v+roundup)*100)/total;
|
||||||
Ok(format!("{} ({} %)", v, per))
|
let info = format!(" ({} %)", per);
|
||||||
|
Ok(format!("{} {:>8}", v, info))
|
||||||
};
|
};
|
||||||
|
|
||||||
let options = TableFormatOptions::new()
|
let options = TableFormatOptions::new()
|
||||||
.noborder(false)
|
.noborder(false)
|
||||||
.noheader(true)
|
.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("used").renderer(render_total_percentage))
|
||||||
.column(ColumnConfig::new("avail").renderer(render_total_percentage));
|
.column(ColumnConfig::new("avail").renderer(render_total_percentage));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user