mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(site): exclude workspace schedule settings for prebuilt workspaces (#18826)
## Description This PR updates the UI to avoid rendering workspace schedule settings (autostop, autostart, etc.) for prebuilt workspaces. Instead, it displays an informational message with a link to the relevant documentation. ## Changes * Introduce `IsPrebuild` parameter to `convertWorkspace` to indicate whether the workspace is a prebuild. * Prevent the Workspace Schedule settings form from rendering in the UI for prebuilt workspaces. * Display an info alert with a link to documentation when viewing a prebuilt workspace. <img width="2980" height="864" alt="Screenshot 2025-07-10 at 13 16 13" src="https://github.com/user-attachments/assets/5f831c21-50bb-4e05-beea-dbeb930ddff8" /> Relates with: https://github.com/coder/coder/pull/18762 --------- Co-authored-by: BrunoQuaresma <bruno_nonato_quaresma@hotmail.com>
This commit is contained in:
co-authored by
BrunoQuaresma
parent
e4d3453e2b
commit
dad033ee3d
@@ -2231,6 +2231,7 @@ func convertWorkspace(
|
||||
if latestAppStatus.ID == uuid.Nil {
|
||||
appStatus = nil
|
||||
}
|
||||
|
||||
return codersdk.Workspace{
|
||||
ID: workspace.ID,
|
||||
CreatedAt: workspace.CreatedAt,
|
||||
@@ -2265,6 +2266,7 @@ func convertWorkspace(
|
||||
AllowRenames: allowRenames,
|
||||
Favorite: requesterFavorite,
|
||||
NextStartAt: nextStartAt,
|
||||
IsPrebuild: workspace.IsPrebuild(),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user