From e3999a02496a1d036716b0c683948ae9ef839695 Mon Sep 17 00:00:00 2001 From: Andrey Dyatlov Date: Mon, 10 Sep 2018 01:19:38 +0200 Subject: [PATCH] Improve report layout --- README.md | 16 ++++++++-------- bun/cmd/print_report.go | 18 +++++++++--------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index c0138de..41e373a 100644 --- a/README.md +++ b/README.md @@ -18,22 +18,22 @@ $ unzip bundle.zip -d bundle $ cd bundle bundle$ bun [PROBLEM] "dcos-version" - Versions are different. --------- -Problems --------- +--------------- +Problem details +--------------- master 172.20.0.23 has DC/OS version 1.11.0 master 172.20.0.24 has DC/OS version 1.11.0 -agent 172.20.0.21 has DC/OS version 1.10.1 -agent 172.20.0.25 has DC/OS version 1.11.0 agent 172.20.0.27 has DC/OS version 1.11.0 agent 172.20.0.28 has DC/OS version 1.11.0 agent 172.20.0.29 has DC/OS version 1.11.0 +agent 172.20.0.21 has DC/OS version 1.10.1 +agent 172.20.0.25 has DC/OS version 1.11.0 public agent 172.20.0.26 has DC/OS version 1.11.0 [PROBLEM] "health" - Problems were found. --------- -Problems --------- +--------------- +Problem details +--------------- agent 172.20.0.21: The following components are not healthy: dcos-docker-gc.service: health = 1 diff --git a/bun/cmd/print_report.go b/bun/cmd/print_report.go index 4d1dbdc..73c1934 100644 --- a/bun/cmd/print_report.go +++ b/bun/cmd/print_report.go @@ -12,9 +12,9 @@ func printReport(c bun.Check) { fmt.Printf("[%v] \"%v\" - %v\n", c.Status, c.Name, c.Summary) if printLong { if len(c.Problems) > 0 { - fmt.Println("--------") - fmt.Println("Problems") - fmt.Println("--------") + fmt.Println("---------------") + fmt.Println("Problem details") + fmt.Println("---------------") fmt.Println(strings.Join(c.Problems, "\n")) printEmptyLine = true } @@ -26,17 +26,17 @@ func printReport(c bun.Check) { printEmptyLine = true } if len(c.OKs) > 0 { - fmt.Println("---") - fmt.Println("OKs") - fmt.Println("---") + fmt.Println("-------") + fmt.Println("Details") + fmt.Println("-------") fmt.Println(strings.Join(c.OKs, "\n")) printEmptyLine = true } } else { if len(c.Problems) > 0 { - fmt.Println("--------") - fmt.Println("Problems") - fmt.Println("--------") + fmt.Println("---------------") + fmt.Println("Problem details") + fmt.Println("---------------") fmt.Println(strings.Join(c.Problems, "\n")) printEmptyLine = true }