mirror of
https://github.com/coder/coder.git
synced 2025-07-06 15:41:45 +00:00
feat: move proxy settings page to deployment options (#8246)
* feat: Move workspace proxy page to deployment options Workspace proxy settings page is now an admin feature * WorkspaceProxy response extends region
This commit is contained in:
32
coderd/apidoc/docs.go
generated
32
coderd/apidoc/docs.go
generated
@ -1711,7 +1711,7 @@ const docTemplate = `{
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/codersdk.RegionsResponse"
|
||||
"$ref": "#/definitions/codersdk.RegionsResponse-codersdk_Region"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5109,7 +5109,7 @@ const docTemplate = `{
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/codersdk.WorkspaceProxy"
|
||||
"$ref": "#/definitions/codersdk.RegionsResponse-codersdk_WorkspaceProxy"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -8648,7 +8648,7 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.RegionsResponse": {
|
||||
"codersdk.RegionsResponse-codersdk_Region": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"regions": {
|
||||
@ -8659,6 +8659,17 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.RegionsResponse-codersdk_WorkspaceProxy": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"regions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/codersdk.WorkspaceProxy"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.Replica": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -10144,7 +10155,10 @@ const docTemplate = `{
|
||||
"display_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"icon": {
|
||||
"healthy": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"icon_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
@ -10154,6 +10168,10 @@ const docTemplate = `{
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"path_app_url": {
|
||||
"description": "PathAppURL is the URL to the base path for path apps. Optional\nunless wildcard_hostname is set.\nE.g. https://us.example.com",
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"description": "Status is the latest status check of the proxy. This will be empty for deleted\nproxies. This value can be used to determine if a workspace proxy is healthy\nand ready to use.",
|
||||
"allOf": [
|
||||
@ -10166,12 +10184,8 @@ const docTemplate = `{
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"url": {
|
||||
"description": "Full url including scheme of the proxy api url: https://us.example.com",
|
||||
"type": "string"
|
||||
},
|
||||
"wildcard_hostname": {
|
||||
"description": "WildcardHostname with the wildcard for subdomain based app hosting: *.us.example.com",
|
||||
"description": "WildcardHostname is the wildcard hostname for subdomain apps.\nE.g. *.us.example.com\nE.g. *--suffix.au.example.com\nOptional. Does not need to be on the same domain as PathAppURL.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
|
32
coderd/apidoc/swagger.json
generated
32
coderd/apidoc/swagger.json
generated
@ -1493,7 +1493,7 @@
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/codersdk.RegionsResponse"
|
||||
"$ref": "#/definitions/codersdk.RegionsResponse-codersdk_Region"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4505,7 +4505,7 @@
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/codersdk.WorkspaceProxy"
|
||||
"$ref": "#/definitions/codersdk.RegionsResponse-codersdk_WorkspaceProxy"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -7776,7 +7776,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.RegionsResponse": {
|
||||
"codersdk.RegionsResponse-codersdk_Region": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"regions": {
|
||||
@ -7787,6 +7787,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.RegionsResponse-codersdk_WorkspaceProxy": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"regions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/codersdk.WorkspaceProxy"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.Replica": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -9182,7 +9193,10 @@
|
||||
"display_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"icon": {
|
||||
"healthy": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"icon_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
@ -9192,6 +9206,10 @@
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"path_app_url": {
|
||||
"description": "PathAppURL is the URL to the base path for path apps. Optional\nunless wildcard_hostname is set.\nE.g. https://us.example.com",
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"description": "Status is the latest status check of the proxy. This will be empty for deleted\nproxies. This value can be used to determine if a workspace proxy is healthy\nand ready to use.",
|
||||
"allOf": [
|
||||
@ -9204,12 +9222,8 @@
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"url": {
|
||||
"description": "Full url including scheme of the proxy api url: https://us.example.com",
|
||||
"type": "string"
|
||||
},
|
||||
"wildcard_hostname": {
|
||||
"description": "WildcardHostname with the wildcard for subdomain based app hosting: *.us.example.com",
|
||||
"description": "WildcardHostname is the wildcard hostname for subdomain apps.\nE.g. *.us.example.com\nE.g. *--suffix.au.example.com\nOptional. Does not need to be on the same domain as PathAppURL.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ func (api *API) PrimaryWorkspaceProxy(ctx context.Context) (database.WorkspacePr
|
||||
// @Security CoderSessionToken
|
||||
// @Produce json
|
||||
// @Tags WorkspaceProxies
|
||||
// @Success 200 {object} codersdk.RegionsResponse
|
||||
// @Success 200 {object} codersdk.RegionsResponse[codersdk.Region]
|
||||
// @Router /regions [get]
|
||||
func (api *API) regions(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
@ -87,7 +87,7 @@ func (api *API) regions(rw http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
httpapi.Write(ctx, rw, http.StatusOK, codersdk.RegionsResponse{
|
||||
httpapi.Write(ctx, rw, http.StatusOK, codersdk.RegionsResponse[codersdk.Region]{
|
||||
Regions: []codersdk.Region{region},
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user