@@ -452,8 +452,14 @@ fn print_health_result(info: &AgentCommandInfo) {
452452 if let Some ( containers) = result. get ( "containers" ) . and_then ( |v| v. as_array ( ) ) {
453453 println ! ( "{:<28} {:<10} {}" , "CONTAINER" , "STATE" , "STATUS" ) ;
454454 for c in containers {
455- let name = c. get ( "container_name" ) . and_then ( |v| v. as_str ( ) ) . unwrap_or ( "-" ) ;
456- let state = c. get ( "container_state" ) . and_then ( |v| v. as_str ( ) ) . unwrap_or ( "-" ) ;
455+ let name = c
456+ . get ( "container_name" )
457+ . and_then ( |v| v. as_str ( ) )
458+ . unwrap_or ( "-" ) ;
459+ let state = c
460+ . get ( "container_state" )
461+ . and_then ( |v| v. as_str ( ) )
462+ . unwrap_or ( "-" ) ;
457463 let status = c. get ( "status" ) . and_then ( |v| v. as_str ( ) ) . unwrap_or ( "-" ) ;
458464 println ! (
459465 "{:<28} {} {:<8} {}" ,
@@ -469,9 +475,15 @@ fn print_health_result(info: &AgentCommandInfo) {
469475
470476 // Single-container health
471477 if result_type == "health" {
472- let state = result. get ( "container_state" ) . and_then ( |v| v. as_str ( ) ) . unwrap_or ( "-" ) ;
478+ let state = result
479+ . get ( "container_state" )
480+ . and_then ( |v| v. as_str ( ) )
481+ . unwrap_or ( "-" ) ;
473482 let status = result. get ( "status" ) . and_then ( |v| v. as_str ( ) ) . unwrap_or ( "-" ) ;
474- let app = result. get ( "app_code" ) . and_then ( |v| v. as_str ( ) ) . unwrap_or ( "-" ) ;
483+ let app = result
484+ . get ( "app_code" )
485+ . and_then ( |v| v. as_str ( ) )
486+ . unwrap_or ( "-" ) ;
475487 println ! (
476488 "{}: {} {} ({})" ,
477489 app,
@@ -508,7 +520,10 @@ fn print_all_container_health(containers: &[serde_json::Value]) {
508520 println ! ( "Overall: {} {}" , progress:: status_icon( overall) , overall) ;
509521 println ! ( ) ;
510522
511- println ! ( "{:<28} {:<12} {:<8} {:<8} {}" , "CONTAINER" , "STATE" , "CPU%" , "MEM%" , "IMAGE" ) ;
523+ println ! (
524+ "{:<28} {:<12} {:<8} {:<8} {}" ,
525+ "CONTAINER" , "STATE" , "CPU%" , "MEM%" , "IMAGE"
526+ ) ;
512527 for c in containers {
513528 let name = c. get ( "name" ) . and_then ( |v| v. as_str ( ) ) . unwrap_or ( "-" ) ;
514529 let state = c. get ( "status" ) . and_then ( |v| v. as_str ( ) ) . unwrap_or ( "-" ) ;
@@ -656,8 +671,7 @@ impl CallableTrait for AgentHealthCommand {
656671 // No specific app requested → list all containers with health metrics.
657672 // This avoids sending app_code="all" to older agents that don't handle it.
658673 if self . app_code . is_none ( ) && !self . include_system {
659- let containers = fetch_live_containers ( & ctx, & hash) ?
660- . unwrap_or_default ( ) ;
674+ let containers = fetch_live_containers ( & ctx, & hash) ?. unwrap_or_default ( ) ;
661675 if self . json {
662676 println ! ( "{}" , serde_json:: to_string_pretty( & containers) ?) ;
663677 } else {
@@ -1764,7 +1778,10 @@ fn print_containers_summary(containers: &[serde_json::Value]) {
17641778 return ;
17651779 }
17661780
1767- println ! ( "{:<24} {:<12} {:<22} {:<30}" , "CONTAINER" , "STATE" , "PORTS" , "IMAGE" ) ;
1781+ println ! (
1782+ "{:<24} {:<12} {:<22} {:<30}" ,
1783+ "CONTAINER" , "STATE" , "PORTS" , "IMAGE"
1784+ ) ;
17681785 for c in containers {
17691786 let name = c. get ( "name" ) . and_then ( |v| v. as_str ( ) ) . unwrap_or ( "-" ) ;
17701787 let state = c
0 commit comments