@@ -29,6 +29,7 @@ import {
29
29
import { BuildsTable } from "./BuildsTable" ;
30
30
import { WorkspaceDeletedBanner } from "./WorkspaceDeletedBanner" ;
31
31
import { WorkspaceStats } from "./WorkspaceStats" ;
32
+ import { workspaceUpdatePolicy } from "utils/workspace" ;
32
33
33
34
export enum WorkspaceErrors {
34
35
GET_BUILDS_ERROR = "getBuildsError" ,
@@ -168,6 +169,12 @@ export const Workspace: FC<React.PropsWithChildren<WorkspaceProps>> = ({
168
169
clearTimeout ( showTimer ) ;
169
170
} ;
170
171
} , [ workspace , now , showAlertPendingInQueue ] ) ;
172
+
173
+ console . log ( "policy: " + workspaceUpdatePolicy ( workspace , canChangeVersions ) ) ;
174
+ console . log ( "autostart schedule: " + workspace . autostart_schedule ) ;
175
+ console . log ( "outdated: " + workspace . outdated ) ;
176
+ console . log ( "mismatch: " + workspace . parameter_mismatch ) ;
177
+
171
178
return (
172
179
< >
173
180
< FullWidthPageHeader >
@@ -228,6 +235,21 @@ export const Workspace: FC<React.PropsWithChildren<WorkspaceProps>> = ({
228
235
) }
229
236
{ buildError }
230
237
{ cancellationError }
238
+ { workspaceUpdatePolicy ( workspace , canChangeVersions ) === "always" &&
239
+ workspace . autostart_schedule &&
240
+ workspace . outdated &&
241
+ workspace . parameter_mismatch && (
242
+ < Alert severity = "warning" >
243
+ < AlertTitle >
244
+ Autostart has been disabled for your workspace.
245
+ </ AlertTitle >
246
+ < AlertDetail >
247
+ A parameter mismatch has been detected between your workspace
248
+ and the active template version. Manually update your
249
+ workspace to reenable Autostart.
250
+ </ AlertDetail >
251
+ </ Alert >
252
+ ) }
231
253
{ workspace . latest_build . status === "running" &&
232
254
! workspace . health . healthy && (
233
255
< Alert
0 commit comments