Skip to content

Commit 00e4328

Browse files
Furistoroboquat
authored andcommitted
[gpctl] Add node to workspace list output
1 parent d28b34a commit 00e4328

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dev/gpctl/cmd/workspaces-list.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ var workspacesListCmd = &cobra.Command{
4141
Type string
4242
Pod string
4343
Active bool
44+
Node string
4445
}
4546

4647
var out []PrintWorkspace
@@ -65,12 +66,13 @@ var workspacesListCmd = &cobra.Command{
6566
Type: w.GetSpec().GetType().String(),
6667
Pod: pod,
6768
Active: w.GetConditions().FirstUserActivity != nil,
69+
Node: w.Runtime.NodeName,
6870
})
6971
}
7072

71-
tpl := `OWNER WORKSPACE INSTANCE PHASE TYPE POD ACTIVE
73+
tpl := `OWNER WORKSPACE INSTANCE PHASE TYPE POD ACTIVE NODE
7274
{{- range . }}
73-
{{ .Owner }} {{ .WorkspaceID }} {{ .Instance }} {{ .Phase }} {{ .Type }} {{ .Pod }} {{ .Active -}}
75+
{{ .Owner }} {{ .WorkspaceID }} {{ .Instance }} {{ .Phase }} {{ .Type }} {{ .Pod }} {{ .Active }} {{ .Node -}}
7476
{{ end }}
7577
`
7678
err = getOutputFormat(tpl, "{.id}").Print(out)

0 commit comments

Comments
 (0)