From d63db0863d41c30b494cf611c07e431efefafcd1 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Mon, 22 Nov 2021 09:06:07 +0100 Subject: [PATCH] proxmox-backup-manager traffic: render data human readable Signed-off-by: Dietmar Maurer --- src/bin/proxmox_backup_manager/traffic_control.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bin/proxmox_backup_manager/traffic_control.rs b/src/bin/proxmox_backup_manager/traffic_control.rs index 992e7bb2..83d3dfff 100644 --- a/src/bin/proxmox_backup_manager/traffic_control.rs +++ b/src/bin/proxmox_backup_manager/traffic_control.rs @@ -5,6 +5,7 @@ use proxmox_router::{cli::*, ApiHandler, RpcEnvironment}; use proxmox_schema::api; use pbs_api_types::TRAFFIC_CONTROL_ID_SCHEMA; +use pbs_tools::format::render_bytes_human_readable; use proxmox_backup::api2; use proxmox_backup::client_helpers::connect_to_localhost; @@ -101,8 +102,8 @@ async fn show_current_traffic(param: Value) -> Result { let options = default_table_format_options() .column(ColumnConfig::new("name")) - .column(ColumnConfig::new("cur-rate-in")) - .column(ColumnConfig::new("cur-rate-out")); + .column(ColumnConfig::new("cur-rate-in").renderer(render_bytes_human_readable)) + .column(ColumnConfig::new("cur-rate-out").renderer(render_bytes_human_readable)); format_and_print_result_full(&mut data, &info.returns, &output_format, &options);