@@ -106,6 +106,10 @@ export const WorkspaceTopbar: FC<WorkspaceProps> = ({
106
106
allowAdvancedScheduling ,
107
107
) ;
108
108
109
+ const isImmutable =
110
+ workspace . latest_build . status === "deleted" ||
111
+ workspace . latest_build . status === "deleting" ;
112
+
109
113
return (
110
114
< Topbar css = { { gridArea : "topbar" } } >
111
115
< Tooltip title = "Back to workspaces" >
@@ -196,11 +200,13 @@ export const WorkspaceTopbar: FC<WorkspaceProps> = ({
196
200
</ Popover >
197
201
</ TopbarData >
198
202
199
- < WorkspaceScheduleControls
200
- workspace = { workspace }
201
- template = { template }
202
- canUpdateSchedule = { canUpdateWorkspace }
203
- />
203
+ { ! isImmutable && (
204
+ < WorkspaceScheduleControls
205
+ workspace = { workspace }
206
+ template = { template }
207
+ canUpdateSchedule = { canUpdateWorkspace }
208
+ />
209
+ ) }
204
210
205
211
{ shouldDisplayDormantData && (
206
212
< TopbarData >
@@ -247,36 +253,40 @@ export const WorkspaceTopbar: FC<WorkspaceProps> = ({
247
253
gap : 12 ,
248
254
} }
249
255
>
250
- < WorkspaceNotifications
251
- workspace = { workspace }
252
- template = { template }
253
- latestVersion = { latestVersion }
254
- permissions = { permissions }
255
- onRestartWorkspace = { handleRestart }
256
- onUpdateWorkspace = { handleUpdate }
257
- onActivateWorkspace = { handleDormantActivate }
258
- />
259
- < WorkspaceStatusBadge workspace = { workspace } />
260
- < WorkspaceActions
261
- workspace = { workspace }
262
- handleStart = { handleStart }
263
- handleStop = { handleStop }
264
- handleRestart = { handleRestart }
265
- handleDelete = { handleDelete }
266
- handleUpdate = { handleUpdate }
267
- handleCancel = { handleCancel }
268
- handleSettings = { handleSettings }
269
- handleRetry = { handleRetry }
270
- handleDebug = { handleDebug }
271
- handleChangeVersion = { handleChangeVersion }
272
- handleDormantActivate = { handleDormantActivate }
273
- handleToggleFavorite = { handleToggleFavorite }
274
- canDebug = { canDebugMode }
275
- canChangeVersions = { canChangeVersions }
276
- isUpdating = { isUpdating }
277
- isRestarting = { isRestarting }
278
- isOwner = { isOwner }
279
- />
256
+ { ! isImmutable && (
257
+ < >
258
+ < WorkspaceNotifications
259
+ workspace = { workspace }
260
+ template = { template }
261
+ latestVersion = { latestVersion }
262
+ permissions = { permissions }
263
+ onRestartWorkspace = { handleRestart }
264
+ onUpdateWorkspace = { handleUpdate }
265
+ onActivateWorkspace = { handleDormantActivate }
266
+ />
267
+ < WorkspaceStatusBadge workspace = { workspace } />
268
+ < WorkspaceActions
269
+ workspace = { workspace }
270
+ handleStart = { handleStart }
271
+ handleStop = { handleStop }
272
+ handleRestart = { handleRestart }
273
+ handleDelete = { handleDelete }
274
+ handleUpdate = { handleUpdate }
275
+ handleCancel = { handleCancel }
276
+ handleSettings = { handleSettings }
277
+ handleRetry = { handleRetry }
278
+ handleDebug = { handleDebug }
279
+ handleChangeVersion = { handleChangeVersion }
280
+ handleDormantActivate = { handleDormantActivate }
281
+ handleToggleFavorite = { handleToggleFavorite }
282
+ canDebug = { canDebugMode }
283
+ canChangeVersions = { canChangeVersions }
284
+ isUpdating = { isUpdating }
285
+ isRestarting = { isRestarting }
286
+ isOwner = { isOwner }
287
+ />
288
+ </ >
289
+ ) }
280
290
</ div >
281
291
</ Topbar >
282
292
) ;
0 commit comments