From a5cf3e179f8c10c67282eefab6cd71cfc697e0c1 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sun, 17 Sep 2023 17:10:47 +0200 Subject: [PATCH] Add command to refresh components --- examples/simple.rs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/examples/simple.rs b/examples/simple.rs index 9c4338c23..14fec8641 100644 --- a/examples/simple.rs +++ b/examples/simple.rs @@ -62,15 +62,19 @@ fn print_help() { ); writeln!( &mut io::stdout(), - "refresh_disks : reloads only disks information" + "refresh_components : reloads components information" ); writeln!( &mut io::stdout(), - "refresh_users : reloads only users information" + "refresh_disks : reloads disks information" ); writeln!( &mut io::stdout(), - "refresh_networks : reloads only networks information" + "refresh_users : reloads users information" + ); + writeln!( + &mut io::stdout(), + "refresh_networks : reloads networks information" ); writeln!( &mut io::stdout(), @@ -166,6 +170,11 @@ fn interpret_input( networks.refresh_list(); writeln!(&mut io::stdout(), "Done."); } + "refresh_components" => { + writeln!(&mut io::stdout(), "Refreshing component list..."); + components.refresh_list(); + writeln!(&mut io::stdout(), "Done."); + } "signals" => { let mut nb = 1i32;