@@ -22,17 +22,18 @@ type workspaceListRow struct {
22
22
codersdk.Workspace `table:"-"`
23
23
24
24
// For table format:
25
- WorkspaceName string `json:"-" table:"workspace,default_sort"`
26
- Template string `json:"-" table:"template"`
27
- Status string `json:"-" table:"status"`
28
- Healthy string `json:"-" table:"healthy"`
29
- LastBuilt string `json:"-" table:"last built"`
30
- Outdated bool `json:"-" table:"outdated"`
31
- StartsAt string `json:"-" table:"starts at"`
32
- StartsNext string `json:"-" table:"starts next"`
33
- StopsAfter string `json:"-" table:"stops after"`
34
- StopsNext string `json:"-" table:"stops next"`
35
- DailyCost string `json:"-" table:"daily cost"`
25
+ WorkspaceName string `json:"-" table:"workspace,default_sort"`
26
+ Template string `json:"-" table:"template"`
27
+ Status string `json:"-" table:"status"`
28
+ Healthy string `json:"-" table:"healthy"`
29
+ LastBuilt string `json:"-" table:"last built"`
30
+ CurrentVersion string `json:"-" table:"current version"`
31
+ Outdated bool `json:"-" table:"outdated"`
32
+ StartsAt string `json:"-" table:"starts at"`
33
+ StartsNext string `json:"-" table:"starts next"`
34
+ StopsAfter string `json:"-" table:"stops after"`
35
+ StopsNext string `json:"-" table:"stops next"`
36
+ DailyCost string `json:"-" table:"daily cost"`
36
37
}
37
38
38
39
func workspaceListRowFromWorkspace (now time.Time , workspace codersdk.Workspace ) workspaceListRow {
@@ -46,18 +47,19 @@ func workspaceListRowFromWorkspace(now time.Time, workspace codersdk.Workspace)
46
47
healthy = strconv .FormatBool (workspace .Health .Healthy )
47
48
}
48
49
return workspaceListRow {
49
- Workspace : workspace ,
50
- WorkspaceName : workspace .OwnerName + "/" + workspace .Name ,
51
- Template : workspace .TemplateName ,
52
- Status : status ,
53
- Healthy : healthy ,
54
- LastBuilt : durationDisplay (lastBuilt ),
55
- Outdated : workspace .Outdated ,
56
- StartsAt : schedRow .StartsAt ,
57
- StartsNext : schedRow .StartsNext ,
58
- StopsAfter : schedRow .StopsAfter ,
59
- StopsNext : schedRow .StopsNext ,
60
- DailyCost : strconv .Itoa (int (workspace .LatestBuild .DailyCost )),
50
+ Workspace : workspace ,
51
+ WorkspaceName : workspace .OwnerName + "/" + workspace .Name ,
52
+ Template : workspace .TemplateName ,
53
+ Status : status ,
54
+ Healthy : healthy ,
55
+ LastBuilt : durationDisplay (lastBuilt ),
56
+ CurrentVersion : workspace .LatestBuild .TemplateVersionName ,
57
+ Outdated : workspace .Outdated ,
58
+ StartsAt : schedRow .StartsAt ,
59
+ StartsNext : schedRow .StartsNext ,
60
+ StopsAfter : schedRow .StopsAfter ,
61
+ StopsNext : schedRow .StopsNext ,
62
+ DailyCost : strconv .Itoa (int (workspace .LatestBuild .DailyCost )),
61
63
}
62
64
}
63
65
@@ -73,6 +75,7 @@ func (r *RootCmd) list() *clibase.Cmd {
73
75
"status" ,
74
76
"healthy" ,
75
77
"last built" ,
78
+ "current version" ,
76
79
"outdated" ,
77
80
"starts at" ,
78
81
"stops after" ,
0 commit comments