cmd/puppeth: reorganize stats reports to make it readable

This commit is contained in:
Péter Szilágyi
2017-10-19 13:59:02 +03:00
parent 005665867d
commit 8c78449a9e
13 changed files with 207 additions and 138 deletions

View File

@ -88,7 +88,7 @@ func (w *wizard) run() {
}
w.servers[server] = client
}
w.networkStats(false)
w.networkStats()
}
// Basics done, loop ad infinitum about what to do
for {
@ -110,12 +110,11 @@ func (w *wizard) run() {
} else {
fmt.Println(" 4. Manage network components")
}
//fmt.Println(" 5. ProTips for common usecases")
choice := w.read()
switch {
case choice == "" || choice == "1":
w.networkStats(false)
w.networkStats()
case choice == "2":
if w.conf.genesis == nil {
@ -126,7 +125,7 @@ func (w *wizard) run() {
case choice == "3":
if len(w.servers) == 0 {
if w.makeServer() != "" {
w.networkStats(false)
w.networkStats()
}
} else {
w.manageServers()
@ -138,9 +137,6 @@ func (w *wizard) run() {
w.manageComponents()
}
case choice == "5":
w.networkStats(true)
default:
log.Error("That's not something I can do")
}