Skip to content

Commit

Permalink
Print isGlobal field for namespace record (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
meiliang86 authored May 12, 2022
1 parent b15fb69 commit 5e8a079
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli/namespaceCommands.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ func ListNamespaces(c *cli.Context) error {

func printNamespace(c *cli.Context, resp *workflowservice.DescribeNamespaceResponse) {
opts := &output.PrintOptions{
Fields: []string{"NamespaceInfo.Name", "NamespaceInfo.Id", "NamespaceInfo.Description", "NamespaceInfo.OwnerEmail", "NamespaceInfo.State", "Config.WorkflowExecutionRetentionTtl", "ReplicationConfig.ActiveClusterName", "ReplicationConfig.Clusters", "Config.HistoryArchivalState", "Config.VisibilityArchivalState"},
Fields: []string{"NamespaceInfo.Name", "NamespaceInfo.Id", "NamespaceInfo.Description", "NamespaceInfo.OwnerEmail", "NamespaceInfo.State", "Config.WorkflowExecutionRetentionTtl", "ReplicationConfig.ActiveClusterName", "ReplicationConfig.Clusters", "Config.HistoryArchivalState", "Config.VisibilityArchivalState", "IsGlobalNamespace"},
FieldsLong: []string{"Config.HistoryArchivalUri", "Config.VisibilityArchivalUri"},
Output: output.Card,
NoPager: true,
Expand Down
3 changes: 2 additions & 1 deletion cli_curr/namespaceCommands.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ func (d *namespaceCLIImpl) DescribeNamespace(c *cli.Context) {

func printNamespace(resp *workflowservice.DescribeNamespaceResponse) {
var formatStr = "Name: %v\nId: %v\nDescription: %v\nOwnerEmail: %v\nNamespaceData: %#v\nState: %v\nRetention: %v\n" +
"ActiveClusterName: %v\nClusters: %v\nHistoryArchivalState: %v\n"
"ActiveClusterName: %v\nClusters: %v\nHistoryArchivalState: %v\nIsGlobalNamespace: %v\n"
descValues := []interface{}{
resp.NamespaceInfo.GetName(),
resp.NamespaceInfo.GetId(),
Expand All @@ -350,6 +350,7 @@ func printNamespace(resp *workflowservice.DescribeNamespaceResponse) {
resp.ReplicationConfig.GetActiveClusterName(),
clustersToString(resp.ReplicationConfig.Clusters),
resp.Config.GetHistoryArchivalState().String(),
resp.GetIsGlobalNamespace(),
}
if resp.Config.GetHistoryArchivalUri() != "" {
formatStr = formatStr + "HistoryArchivalURI: %v\n"
Expand Down

0 comments on commit 5e8a079

Please sign in to comment.