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
|
Type string
|
||||||
Pod string
|
Pod string
|
||||||
Active bool
|
Active bool
|
||||||
|
Node string
|
||||||
}
|
}
|
||||||
|
|
||||||
var out []PrintWorkspace
|
var out []PrintWorkspace
|
||||||
@ -65,12 +66,13 @@ var workspacesListCmd = &cobra.Command{
|
|||||||
Type: w.GetSpec().GetType().String(),
|
Type: w.GetSpec().GetType().String(),
|
||||||
Pod: pod,
|
Pod: pod,
|
||||||
Active: w.GetConditions().FirstUserActivity != nil,
|
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 . }}
|
{{- range . }}
|
||||||
{{ .Owner }} {{ .WorkspaceID }} {{ .Instance }} {{ .Phase }} {{ .Type }} {{ .Pod }} {{ .Active -}}
|
{{ .Owner }} {{ .WorkspaceID }} {{ .Instance }} {{ .Phase }} {{ .Type }} {{ .Pod }} {{ .Active }} {{ .Node -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
`
|
`
|
||||||
err = getOutputFormat(tpl, "{.id}").Print(out)
|
err = getOutputFormat(tpl, "{.id}").Print(out)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user