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

Commit9fc3329

Browse files
authored
feat: persist app groups in the database (#17977)
1 parent513a468 commit9fc3329

File tree

27 files changed

+398
-322
lines changed

27 files changed

+398
-322
lines changed

‎coderd/apidoc/docs.go

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/apidoc/swagger.json

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/database/db2sdk/db2sdk.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ func Apps(dbApps []database.WorkspaceApp, statuses []database.WorkspaceAppStatus
525525
Threshold:dbApp.HealthcheckThreshold,
526526
},
527527
Health:codersdk.WorkspaceAppHealth(dbApp.Health),
528+
Group:dbApp.DisplayGroup.String,
528529
Hidden:dbApp.Hidden,
529530
OpenIn:codersdk.WorkspaceAppOpenIn(dbApp.OpenIn),
530531
Statuses:WorkspaceAppStatuses(statuses),

‎coderd/database/dbgen/dbgen.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,7 @@ func WorkspaceApp(t testing.TB, db database.Store, orig database.WorkspaceApp) d
748748
HealthcheckThreshold:takeFirst(orig.HealthcheckThreshold,60),
749749
Health:takeFirst(orig.Health,database.WorkspaceAppHealthHealthy),
750750
DisplayOrder:takeFirst(orig.DisplayOrder,1),
751+
DisplayGroup:orig.DisplayGroup,
751752
Hidden:orig.Hidden,
752753
OpenIn:takeFirst(orig.OpenIn,database.WorkspaceAppOpenInSlimWindow),
753754
})

‎coderd/database/dump.sql

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
altertable workspace_apps drop column display_group;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
altertable workspace_apps add column display_grouptext;

‎coderd/database/models.go

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/database/queries.sql.go

Lines changed: 14 additions & 6 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/database/queries/workspaceapps.sql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ INSERT INTO
3030
health,
3131
display_order,
3232
hidden,
33-
open_in
33+
open_in,
34+
display_group
3435
)
3536
VALUES
36-
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18) RETURNING*;
37+
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19) RETURNING*;
3738

3839
-- name: UpdateWorkspaceAppHealthByID :exec
3940
UPDATE

‎coderd/provisionerdserver/provisionerdserver.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2419,6 +2419,11 @@ func InsertWorkspaceResource(ctx context.Context, db database.Store, jobID uuid.
24192419
sharingLevel=database.AppSharingLevelPublic
24202420
}
24212421

2422+
displayGroup:= sql.NullString{
2423+
Valid:app.Group!="",
2424+
String:app.Group,
2425+
}
2426+
24222427
openIn:=database.WorkspaceAppOpenInSlimWindow
24232428
switchapp.OpenIn {
24242429
casesdkproto.AppOpenIn_TAB:
@@ -2451,6 +2456,7 @@ func InsertWorkspaceResource(ctx context.Context, db database.Store, jobID uuid.
24512456
Health:health,
24522457
// #nosec G115 - Order represents a display order value that's always small and fits in int32
24532458
DisplayOrder:int32(app.Order),
2459+
DisplayGroup:displayGroup,
24542460
Hidden:app.Hidden,
24552461
OpenIn:openIn,
24562462
})

‎codersdk/workspaceapps.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ type WorkspaceApp struct {
8383
// Healthcheck specifies the configuration for checking app health.
8484
HealthcheckHealthcheck`json:"healthcheck,omitempty"`
8585
HealthWorkspaceAppHealth`json:"health"`
86+
Groupstring`json:"group,omitempty"`
8687
Hiddenbool`json:"hidden"`
8788
OpenInWorkspaceAppOpenIn`json:"open_in"`
8889

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp