From 6d76024cdfc3106d5044ecbd7971f383309d7cf6 Mon Sep 17 00:00:00 2001 From: Tim Middleton Date: Thu, 2 Nov 2023 13:57:52 +0800 Subject: [PATCH] Minor update to get services --- pkg/cmd/formatting.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkg/cmd/formatting.go b/pkg/cmd/formatting.go index ca9cf4eb..cf23f9f0 100644 --- a/pkg/cmd/formatting.go +++ b/pkg/cmd/formatting.go @@ -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) @@ -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) } }