forked from toolshed/abra
@ -208,7 +208,7 @@ Use "--status/-S" flag to query all servers for the live deployment status.`,
|
||||
|
||||
serverStat := allStats[app.Server]
|
||||
|
||||
headers := []string{"RECIPE", "DOMAIN"}
|
||||
headers := []string{"RECIPE", "DOMAIN", "SERVER"}
|
||||
if status {
|
||||
headers = append(headers, []string{
|
||||
"STATUS",
|
||||
@ -228,7 +228,7 @@ Use "--status/-S" flag to query all servers for the live deployment status.`,
|
||||
|
||||
var rows [][]string
|
||||
for _, appStat := range serverStat.Apps {
|
||||
row := []string{appStat.Recipe, appStat.Domain}
|
||||
row := []string{appStat.Recipe, appStat.Domain, appStat.Server}
|
||||
if status {
|
||||
chaosStatus := appStat.Chaos
|
||||
if chaosStatus != "unknown" {
|
||||
@ -256,20 +256,8 @@ Use "--status/-S" flag to query all servers for the live deployment status.`,
|
||||
table.Rows(rows...)
|
||||
|
||||
if len(rows) > 0 {
|
||||
fmt.Println(table)
|
||||
|
||||
if status {
|
||||
fmt.Println(fmt.Sprintf(
|
||||
"SERVER: %s | TOTAL APPS: %v | VERSIONED: %v | UNVERSIONED: %v | LATEST : %v | UPGRADE: %v",
|
||||
app.Server,
|
||||
serverStat.AppCount,
|
||||
serverStat.VersionCount,
|
||||
serverStat.UnversionedCount,
|
||||
serverStat.LatestCount,
|
||||
serverStat.UpgradeCount,
|
||||
))
|
||||
} else {
|
||||
log.Infof("SERVER: %s TOTAL APPS: %v", app.Server, serverStat.AppCount)
|
||||
if err := formatter.PrintTable(table); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
if len(allStats) > 1 && len(rows) > 0 {
|
||||
@ -279,12 +267,6 @@ Use "--status/-S" flag to query all servers for the live deployment status.`,
|
||||
|
||||
alreadySeen[app.Server] = true
|
||||
}
|
||||
|
||||
if len(allStats) > 1 {
|
||||
totalServers := formatter.BoldStyle.Render("TOTAL SERVERS")
|
||||
totalApps := formatter.BoldStyle.Render("TOTAL APPS")
|
||||
log.Infof("%s: %v | %s: %v ", totalServers, totalServersCount, totalApps, totalAppsCount)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user