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:
Steven Masley
2023-06-30 11:32:35 -04:00
committed by GitHub
parent 1e8cc2ca8d
commit f0bd258ff1
39 changed files with 645 additions and 342 deletions

View File

@ -63,7 +63,7 @@ func (r *RootCmd) regenerateProxyToken() *clibase.Cmd {
ID: proxy.ID,
Name: proxy.Name,
DisplayName: proxy.DisplayName,
Icon: proxy.Icon,
Icon: proxy.IconURL,
RegenerateToken: true,
})
if err != nil {
@ -138,7 +138,7 @@ func (r *RootCmd) patchProxy() *clibase.Cmd {
displayName = proxy.DisplayName
}
if proxyIcon == "" {
proxyIcon = proxy.Icon
proxyIcon = proxy.IconURL
}
updated, err := client.PatchWorkspaceProxy(ctx, codersdk.PatchWorkspaceProxy{
@ -322,7 +322,7 @@ func (r *RootCmd) listProxies() *clibase.Cmd {
sep := ""
for i, proxy := range resp {
_, _ = str.WriteString(sep)
_, _ = str.WriteString(fmt.Sprintf("%d: %s %s %s", i, proxy.Name, proxy.URL, proxy.Status.Status))
_, _ = str.WriteString(fmt.Sprintf("%d: %s %s %s", i, proxy.Name, proxy.PathAppURL, proxy.Status.Status))
for _, errMsg := range proxy.Status.Report.Errors {
_, _ = str.WriteString(color.RedString("\n\tErr: %s", errMsg))
}
@ -351,7 +351,7 @@ func (r *RootCmd) listProxies() *clibase.Cmd {
return xerrors.Errorf("list workspace proxies: %w", err)
}
output, err := formatter.Format(ctx, proxies)
output, err := formatter.Format(ctx, proxies.Regions)
if err != nil {
return err
}