Skip to content

Commit

Permalink
Minor update to get services
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiddlet2666 committed Nov 2, 2023
1 parent 8f67e04 commit 6d76024
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions pkg/cmd/formatting.go
Original file line number Diff line number Diff line change
Expand Up @@ -1524,13 +1524,14 @@ func FormatServices(services []config.ServiceSummary) string {
return strings.Compare(services[p].ServiceName, services[q].ServiceName) < 0
})

table := newFormattedTable().WithHeader(ServiceNameColumn, "TYPE", MembersColumn, "STATUS HA", "STORAGE", "SENIOR", partitions)
table := newFormattedTable().WithHeader(ServiceNameColumn, "TYPE", MembersColumn, "STATUS HA", "STORAGE",
"SENIOR", partitions, "STATUS")
if OutputFormat == constants.WIDE {
table.WithAlignment(L, L, R, L, R, R, R, R, R, R, L, L)
table.AddHeaderColumns(endangered, "VULNERABLE", "UNBALANCED", "STATUS", "SUSPENDED")
table.WithAlignment(L, L, R, L, R, R, R, L, R, R, R, L)
table.AddHeaderColumns(endangered, "VULNERABLE", "UNBALANCED", "SUSPENDED")
table.AddFormattingFunction(9, statusHAFormatter)
} else {
table.WithAlignment(L, L, R, L, R, R, R)
table.WithAlignment(L, L, R, L, R, R, R, L)
}

table.AddFormattingFunction(3, statusHAFormatter)
Expand Down Expand Up @@ -1562,12 +1563,12 @@ func FormatServices(services []config.ServiceSummary) string {

table.AddRow(value.ServiceName, value.ServiceType, formatSmallInteger(value.MemberCount),
value.StatusHA, formatSmallInteger(value.StorageEnabledCount), formatSmallInteger(value.SeniorMemberID),
formatSmallInteger(value.PartitionsAll))
formatSmallInteger(value.PartitionsAll), status)

if OutputFormat == constants.WIDE {
table.AddColumnsToRow(formatSmallInteger(value.PartitionsEndangered),
formatSmallInteger(value.PartitionsVulnerable),
formatSmallInteger(value.PartitionsUnbalanced), status, suspended)
formatSmallInteger(value.PartitionsUnbalanced), suspended)
}
}

Expand Down

0 comments on commit 6d76024

Please sign in to comment.