fix: all tables respect table_config from settings
Extract shared render_item_info_table() and render_list_table() in modes/common.rs. Update client/info, client/list, client/status, info, status, and status_plugins to use create_table_with_config with settings.table_config instead of hardcoded presets. Previously only local --list used table_config; all other tables (client modes, status, status-plugins) ignored it.
This commit is contained in:
@@ -25,7 +25,8 @@ pub fn mode(
|
||||
}
|
||||
OutputFormat::Table => {
|
||||
// Paths
|
||||
let mut path_table = crate::modes::common::create_table(true);
|
||||
let mut path_table =
|
||||
crate::modes::common::create_table_with_config(&settings.table_config);
|
||||
path_table.set_header(vec![
|
||||
Cell::new("Type").add_attribute(Attribute::Bold),
|
||||
Cell::new("Path").add_attribute(Attribute::Bold),
|
||||
@@ -46,7 +47,8 @@ pub fn mode(
|
||||
let mut sorted = configured.clone();
|
||||
sorted.sort_by(|a, b| a.name.cmp(&b.name));
|
||||
|
||||
let mut table = crate::modes::common::create_table(true);
|
||||
let mut table =
|
||||
crate::modes::common::create_table_with_config(&settings.table_config);
|
||||
table.set_header(vec![
|
||||
Cell::new("Plugin Name").add_attribute(Attribute::Bold),
|
||||
Cell::new("Enabled").add_attribute(Attribute::Bold),
|
||||
@@ -68,7 +70,8 @@ pub fn mode(
|
||||
|
||||
// Compression
|
||||
if !status_info.compression.is_empty() {
|
||||
let mut table = crate::modes::common::create_table(true);
|
||||
let mut table =
|
||||
crate::modes::common::create_table_with_config(&settings.table_config);
|
||||
table.set_header(vec![
|
||||
Cell::new("Type").add_attribute(Attribute::Bold),
|
||||
Cell::new("Found").add_attribute(Attribute::Bold),
|
||||
|
||||
Reference in New Issue
Block a user