feat(site): connect open_in parameter (#16036)

Second step to resolve [open_in
issue](https://github.com/coder/terraform-provider-coder/issues/297)

This PR improves the way the open_in parameter is forwarded across the
code, changing the last `string` to const everywhere.

Also make sure it is available and forwarded up to the `CreateLink`
component.
This commit is contained in:
Vincent Vielle
2025-01-07 18:08:03 +01:00
committed by GitHub
parent b5c85a8abd
commit 289338f19e
13 changed files with 510 additions and 466 deletions
+14 -1
View File
@@ -15080,7 +15080,7 @@ const docTemplate = `{
"format": "uuid"
},
"open_in": {
"type": "string"
"$ref": "#/definitions/codersdk.WorkspaceAppOpenIn"
},
"sharing_level": {
"enum": [
@@ -15127,6 +15127,19 @@ const docTemplate = `{
"WorkspaceAppHealthUnhealthy"
]
},
"codersdk.WorkspaceAppOpenIn": {
"type": "string",
"enum": [
"slim-window",
"window",
"tab"
],
"x-enum-varnames": [
"WorkspaceAppOpenInSlimWindow",
"WorkspaceAppOpenInWindow",
"WorkspaceAppOpenInTab"
]
},
"codersdk.WorkspaceAppSharingLevel": {
"type": "string",
"enum": [
+10 -1
View File
@@ -13729,7 +13729,7 @@
"format": "uuid"
},
"open_in": {
"type": "string"
"$ref": "#/definitions/codersdk.WorkspaceAppOpenIn"
},
"sharing_level": {
"enum": ["owner", "authenticated", "public"],
@@ -13767,6 +13767,15 @@
"WorkspaceAppHealthUnhealthy"
]
},
"codersdk.WorkspaceAppOpenIn": {
"type": "string",
"enum": ["slim-window", "window", "tab"],
"x-enum-varnames": [
"WorkspaceAppOpenInSlimWindow",
"WorkspaceAppOpenInWindow",
"WorkspaceAppOpenInTab"
]
},
"codersdk.WorkspaceAppSharingLevel": {
"type": "string",
"enum": ["owner", "authenticated", "public"],
+1
View File
@@ -518,6 +518,7 @@ func Apps(dbApps []database.WorkspaceApp, agent database.WorkspaceAgent, ownerNa
},
Health: codersdk.WorkspaceAppHealth(dbApp.Health),
Hidden: dbApp.Hidden,
OpenIn: codersdk.WorkspaceAppOpenIn(dbApp.OpenIn),
})
}
return apps