@@ -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 >
@@ -229,6 +236,21 @@ export const Workspace: FC<React.PropsWithChildren<WorkspaceProps>> = ({
229
236
) }
230
237
{ buildError }
231
238
{ cancellationError }
239
+ { workspaceUpdatePolicy ( workspace , canChangeVersions ) === "always" &&
240
+ workspace . autostart_schedule &&
241
+ workspace . outdated &&
242
+ workspace . parameter_mismatch && (
243
+ < Alert severity = "warning" >
244
+ < AlertTitle >
245
+ Autostart has been disabled for your workspace.
246
+ </ AlertTitle >
247
+ < AlertDetail >
248
+ A parameter mismatch has been detected between your workspace
249
+ and the active template version. Manually update your
250
+ workspace to reenable Autostart.
251
+ </ AlertDetail >
252
+ </ Alert >
253
+ ) }
232
254
{ workspace . latest_build . status === "running" &&
233
255
! workspace . health . healthy && (
234
256
< Alert
0 commit comments