Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit785e015

Browse files
committed
feat: display current version on coder list
1 parentf3efa08 commit785e015

File tree

1 file changed

+26
-23
lines changed

1 file changed

+26
-23
lines changed

‎cli/list.go

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,18 @@ type workspaceListRow struct {
2222
codersdk.Workspace`table:"-"`
2323

2424
// For table format:
25-
WorkspaceNamestring`json:"-" table:"workspace,default_sort"`
26-
Templatestring`json:"-" table:"template"`
27-
Statusstring`json:"-" table:"status"`
28-
Healthystring`json:"-" table:"healthy"`
29-
LastBuiltstring`json:"-" table:"last built"`
30-
Outdatedbool`json:"-" table:"outdated"`
31-
StartsAtstring`json:"-" table:"starts at"`
32-
StartsNextstring`json:"-" table:"starts next"`
33-
StopsAfterstring`json:"-" table:"stops after"`
34-
StopsNextstring`json:"-" table:"stops next"`
35-
DailyCoststring`json:"-" table:"daily cost"`
25+
WorkspaceNamestring`json:"-" table:"workspace,default_sort"`
26+
Templatestring`json:"-" table:"template"`
27+
Statusstring`json:"-" table:"status"`
28+
Healthystring`json:"-" table:"healthy"`
29+
LastBuiltstring`json:"-" table:"last built"`
30+
CurrentVersionstring`json:"-" table:"current version"`
31+
Outdatedbool`json:"-" table:"outdated"`
32+
StartsAtstring`json:"-" table:"starts at"`
33+
StartsNextstring`json:"-" table:"starts next"`
34+
StopsAfterstring`json:"-" table:"stops after"`
35+
StopsNextstring`json:"-" table:"stops next"`
36+
DailyCoststring`json:"-" table:"daily cost"`
3637
}
3738

3839
funcworkspaceListRowFromWorkspace(now time.Time,workspace codersdk.Workspace)workspaceListRow {
@@ -46,18 +47,19 @@ func workspaceListRowFromWorkspace(now time.Time, workspace codersdk.Workspace)
4647
healthy=strconv.FormatBool(workspace.Health.Healthy)
4748
}
4849
returnworkspaceListRow{
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)),
6163
}
6264
}
6365

@@ -73,6 +75,7 @@ func (r *RootCmd) list() *clibase.Cmd {
7375
"status",
7476
"healthy",
7577
"last built",
78+
"current version",
7679
"outdated",
7780
"starts at",
7881
"stops after",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp