Skip to content

Commit

Permalink
Improve report layout
Browse files Browse the repository at this point in the history
  • Loading branch information
adyatlov committed Sep 9, 2018
1 parent 61e710e commit e3999a0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
18 changes: 9 additions & 9 deletions bun/cmd/print_report.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down

0 comments on commit e3999a0

Please sign in to comment.