From 93fbb4ef0ad873cdae50c73d2f911c9bf16feba0 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Fri, 31 Jan 2020 06:59:17 +0100 Subject: [PATCH] update proxmox dependency to 0.1.12 --- Cargo.toml | 2 +- src/bin/proxmox-backup-manager.rs | 25 +++++++++---------------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b946f679..2bae952c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,7 @@ pam = "0.7" pam-sys = "0.5" percent-encoding = "2.1" pin-utils = "0.1.0-alpha" -proxmox = { version = "0.1.10", features = [ "sortable-macro", "api-macro" ] } +proxmox = { version = "0.1.12", features = [ "sortable-macro", "api-macro" ] } #proxmox = { git = "ssh://gitolite3@proxdev.maurer-it.com/rust/proxmox", version = "0.1.2", features = [ "sortable-macro", "api-macro" ] } #proxmox = { path = "../proxmox/proxmox", features = [ "sortable-macro", "api-macro" ] } regex = "1.2" diff --git a/src/bin/proxmox-backup-manager.rs b/src/bin/proxmox-backup-manager.rs index 0a4427ac..c567f192 100644 --- a/src/bin/proxmox-backup-manager.rs +++ b/src/bin/proxmox-backup-manager.rs @@ -94,18 +94,14 @@ fn list_remotes(param: Value, rpcenv: &mut dyn RpcEnvironment) -> Result unreachable!(), }; - let mut column_config = Vec::new(); - column_config.push(ColumnConfig::new("name")); - column_config.push(ColumnConfig::new("host")); - column_config.push(ColumnConfig::new("userid")); - column_config.push(ColumnConfig::new("fingerprint")); - column_config.push(ColumnConfig::new("comment")); - let options = TableFormatOptions::new() .noborder(false) .noheader(false) - .column_config(column_config); - + .column(ColumnConfig::new("name")) + .column(ColumnConfig::new("host")) + .column(ColumnConfig::new("userid")) + .column(ColumnConfig::new("fingerprint")) + .column(ColumnConfig::new("comment")); format_and_print_result_full(&mut data, info.returns, &output_format, &options); @@ -288,16 +284,13 @@ async fn task_list(param: Value) -> Result { let mut data = result["data"].take(); let schema = api2::node::tasks::API_RETURN_SCHEMA_LIST_TASKS; - let mut column_config = Vec::new(); - column_config.push(ColumnConfig::new("starttime").right_align(false).renderer(render_epoch)); - column_config.push(ColumnConfig::new("endtime").right_align(false).renderer(render_epoch)); - column_config.push(ColumnConfig::new("upid")); - column_config.push(ColumnConfig::new("status").renderer(render_status)); - let options = TableFormatOptions::new() .noborder(false) .noheader(false) - .column_config(column_config); + .column(ColumnConfig::new("starttime").right_align(false).renderer(render_epoch)) + .column(ColumnConfig::new("endtime").right_align(false).renderer(render_epoch)) + .column(ColumnConfig::new("upid")) + .column(ColumnConfig::new("status").renderer(render_status)); format_and_print_result_full(&mut data, schema, &output_format, &options);