From 00e432883d04e93ea7228ea29a814d70ab8de8fc Mon Sep 17 00:00:00 2001 From: Thomas Schubart Date: Wed, 14 Sep 2022 11:41:44 +0000 Subject: [PATCH] [gpctl] Add node to workspace list output --- dev/gpctl/cmd/workspaces-list.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dev/gpctl/cmd/workspaces-list.go b/dev/gpctl/cmd/workspaces-list.go index a81e598c27..b73d44d571 100644 --- a/dev/gpctl/cmd/workspaces-list.go +++ b/dev/gpctl/cmd/workspaces-list.go @@ -41,6 +41,7 @@ var workspacesListCmd = &cobra.Command{ Type string Pod string Active bool + Node string } var out []PrintWorkspace @@ -65,12 +66,13 @@ var workspacesListCmd = &cobra.Command{ Type: w.GetSpec().GetType().String(), Pod: pod, Active: w.GetConditions().FirstUserActivity != nil, + Node: w.Runtime.NodeName, }) } - tpl := `OWNER WORKSPACE INSTANCE PHASE TYPE POD ACTIVE + tpl := `OWNER WORKSPACE INSTANCE PHASE TYPE POD ACTIVE NODE {{- range . }} -{{ .Owner }} {{ .WorkspaceID }} {{ .Instance }} {{ .Phase }} {{ .Type }} {{ .Pod }} {{ .Active -}} +{{ .Owner }} {{ .WorkspaceID }} {{ .Instance }} {{ .Phase }} {{ .Type }} {{ .Pod }} {{ .Active }} {{ .Node -}} {{ end }} ` err = getOutputFormat(tpl, "{.id}").Print(out)