mirror of
https://github.com/gitpod-io/gitpod.git
synced 2025-12-08 17:36:30 +00:00
[gpctl] Add node to workspace list output
This commit is contained in:
parent
d28b34ae36
commit
00e432883d
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user