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

Commit289338f

Browse files
authored
feat(site): connect open_in parameter (#16036)
Second step to resolve [open_inissue](coder/terraform-provider-coder#297)This PR improves the way the open_in parameter is forwarded across thecode, changing the last `string` to const everywhere.Also make sure it is available and forwarded up to the `CreateLink`component.
1 parentb5c85a8 commit289338f

File tree

13 files changed

+510
-466
lines changed

13 files changed

+510
-466
lines changed

‎agent/proto/agent.pb.go‎

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

‎agent/proto/agent.proto‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ message WorkspaceApp {
4242
}
4343
Healthhealth=12;
4444
boolhidden=13;
45-
stringopen_in=14;
4645
}
4746

4847
messageWorkspaceAgentScript {

‎coderd/apidoc/docs.go‎

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

‎coderd/apidoc/swagger.json‎

Lines changed: 10 additions & 1 deletion
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
@@ -518,6 +518,7 @@ func Apps(dbApps []database.WorkspaceApp, agent database.WorkspaceAgent, ownerNa
518518
},
519519
Health:codersdk.WorkspaceAppHealth(dbApp.Health),
520520
Hidden:dbApp.Hidden,
521+
OpenIn:codersdk.WorkspaceAppOpenIn(dbApp.OpenIn),
521522
})
522523
}
523524
returnapps

‎codersdk/agentsdk/convert.go‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,6 @@ func AppFromProto(protoApp *proto.WorkspaceApp) (codersdk.WorkspaceApp, error) {
255255
},
256256
Health:health,
257257
Hidden:protoApp.Hidden,
258-
OpenIn:protoApp.OpenIn,
259258
},nil
260259
}
261260

@@ -286,7 +285,6 @@ func ProtoFromApp(a codersdk.WorkspaceApp) (*proto.WorkspaceApp, error) {
286285
},
287286
Health:proto.WorkspaceApp_Health(health),
288287
Hidden:a.Hidden,
289-
OpenIn:a.OpenIn,
290288
},nil
291289
}
292290

‎codersdk/workspaceapps.go‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ const (
2828
WorkspaceAppSharingLevelPublicWorkspaceAppSharingLevel="public"
2929
)
3030

31+
varMapWorkspaceAppSharingLevels=map[WorkspaceAppSharingLevel]struct{}{
32+
WorkspaceAppSharingLevelOwner: {},
33+
WorkspaceAppSharingLevelAuthenticated: {},
34+
WorkspaceAppSharingLevelPublic: {},
35+
}
36+
3137
typeWorkspaceAppOpenInstring
3238

3339
const (
@@ -36,10 +42,10 @@ const (
3642
WorkspaceAppOpenInTabWorkspaceAppOpenIn="tab"
3743
)
3844

39-
varMapWorkspaceAppSharingLevels=map[WorkspaceAppSharingLevel]struct{}{
40-
WorkspaceAppSharingLevelOwner: {},
41-
WorkspaceAppSharingLevelAuthenticated: {},
42-
WorkspaceAppSharingLevelPublic: {},
45+
varMapWorkspaceAppOpenIns=map[WorkspaceAppOpenIn]struct{}{
46+
WorkspaceAppOpenInSlimWindow: {},
47+
WorkspaceAppOpenInWindow: {},
48+
WorkspaceAppOpenInTab: {},
4349
}
4450

4551
typeWorkspaceAppstruct {
@@ -70,7 +76,7 @@ type WorkspaceApp struct {
7076
HealthcheckHealthcheck`json:"healthcheck"`
7177
HealthWorkspaceAppHealth`json:"health"`
7278
Hiddenbool`json:"hidden"`
73-
OpenInstring`json:"open_in"`
79+
OpenInWorkspaceAppOpenIn`json:"open_in"`
7480
}
7581

7682
typeHealthcheckstruct {

‎docs/reference/api/agents.md‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎docs/reference/api/builds.md‎

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

‎docs/reference/api/schemas.md‎

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp