Skip to content

Commit a71e3c8

Browse files
committed
feat: add display_apps field to agent
1 parent eb68684 commit a71e3c8

File tree

67 files changed

+1963
-564
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1963
-564
lines changed

coderd/apidoc/docs.go

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

coderd/apidoc/swagger.json

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

coderd/database/dbfake/dbfake.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4428,6 +4428,7 @@ func (q *FakeQuerier) InsertWorkspaceAgent(_ context.Context, arg database.Inser
44284428
MOTDFile: arg.MOTDFile,
44294429
LifecycleState: database.WorkspaceAgentLifecycleStateCreated,
44304430
ShutdownScript: arg.ShutdownScript,
4431+
DisplayApps: arg.DisplayApps,
44314432
}
44324433

44334434
q.workspaceAgents = append(q.workspaceAgents, agent)

coderd/database/dump.sql

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
BEGIN;
2+
ALTER TABLE workspace_agents DROP COLUMN display_apps;
3+
DROP TYPE display_app;
4+
COMMIT;
5+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
BEGIN;
2+
CREATE TYPE display_app AS ENUM ('vscode', 'vscode_insiders', 'web_terminal', 'ssh_helper', 'port_forwarding_helper');
3+
ALTER TABLE workspace_agents ADD column display_apps display_app[] DEFAULT '{vscode, vscode_insiders, web_terminal, ssh_helper, port_forwarding_helper}';
4+
COMMIT;

coderd/database/modelmethods.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import (
1010
"github.com/coder/coder/v2/coderd/rbac"
1111
)
1212

13+
var DefaultDisplayApps = []DisplayApp{DisplayAppVscode, DisplayAppWebTerminal, DisplayAppSSHHelper, DisplayAppPortForwardingHelper}
14+
1315
type WorkspaceStatus string
1416

1517
const (

coderd/database/models.go

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

0 commit comments

Comments
 (0)