feat: add meta_name column to meta plugin table
This commit is contained in:
@@ -180,8 +180,12 @@ fn build_meta_plugin_table() -> Table {
|
|||||||
meta_plugin_table.set_titles(row!(
|
meta_plugin_table.set_titles(row!(
|
||||||
b->"Type",
|
b->"Type",
|
||||||
b->"Found",
|
b->"Found",
|
||||||
|
b->"Default",
|
||||||
b->"Binary",
|
b->"Binary",
|
||||||
b->"Args"));
|
b->"Args",
|
||||||
|
b->"Meta Name"));
|
||||||
|
|
||||||
|
let default_type = meta_plugin::default_meta_plugin_type();
|
||||||
|
|
||||||
for meta_plugin_type in MetaPluginType::iter() {
|
for meta_plugin_type in MetaPluginType::iter() {
|
||||||
let meta_plugin_program: MetaPluginProgram = match &META_PLUGIN_PROGRAMS[meta_plugin_type.clone()] {
|
let meta_plugin_program: MetaPluginProgram = match &META_PLUGIN_PROGRAMS[meta_plugin_type.clone()] {
|
||||||
@@ -190,15 +194,22 @@ fn build_meta_plugin_table() -> Table {
|
|||||||
program: "".to_string(),
|
program: "".to_string(),
|
||||||
args: Vec::new(),
|
args: Vec::new(),
|
||||||
supported: true,
|
supported: true,
|
||||||
|
meta_name: "".to_string(),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let is_default = meta_plugin_type == default_type;
|
||||||
|
|
||||||
meta_plugin_table.add_row(Row::new(vec![
|
meta_plugin_table.add_row(Row::new(vec![
|
||||||
Cell::new(&meta_plugin_type.to_string()),
|
Cell::new(&meta_plugin_type.to_string()),
|
||||||
match meta_plugin_program.supported {
|
match meta_plugin_program.supported {
|
||||||
true => Cell::new("Yes").with_style(Attr::ForegroundColor(color::GREEN)),
|
true => Cell::new("Yes").with_style(Attr::ForegroundColor(color::GREEN)),
|
||||||
false => Cell::new("No").with_style(Attr::ForegroundColor(color::RED)),
|
false => Cell::new("No").with_style(Attr::ForegroundColor(color::RED)),
|
||||||
},
|
},
|
||||||
|
match is_default {
|
||||||
|
true => Cell::new("Yes").with_style(Attr::ForegroundColor(color::GREEN)),
|
||||||
|
false => Cell::new("No"),
|
||||||
|
},
|
||||||
match meta_plugin_program.program.is_empty() {
|
match meta_plugin_program.program.is_empty() {
|
||||||
true => {
|
true => {
|
||||||
Cell::new("<INTERNAL>").with_style(Attr::ForegroundColor(color::BRIGHT_BLACK))
|
Cell::new("<INTERNAL>").with_style(Attr::ForegroundColor(color::BRIGHT_BLACK))
|
||||||
@@ -206,6 +217,7 @@ fn build_meta_plugin_table() -> Table {
|
|||||||
false => Cell::new(&meta_plugin_program.program),
|
false => Cell::new(&meta_plugin_program.program),
|
||||||
},
|
},
|
||||||
Cell::new(&meta_plugin_program.args.join(" ")),
|
Cell::new(&meta_plugin_program.args.join(" ")),
|
||||||
|
Cell::new(&meta_plugin_program.meta_name),
|
||||||
]));
|
]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user