@@ -26,6 +26,8 @@ import {
26
26
PageHeaderTitle ,
27
27
PageHeaderSubtitle ,
28
28
} from "components/PageHeader/FullWidthPageHeader"
29
+ import { Maybe } from "components/Conditionals/Maybe"
30
+ import { Link } from "@material-ui/core"
29
31
30
32
export enum WorkspaceErrors {
31
33
GET_BUILDS_ERROR = "getBuildsError" ,
@@ -52,6 +54,7 @@ export interface WorkspaceProps {
52
54
workspace : TypesGen . Workspace
53
55
resources ?: TypesGen . WorkspaceResource [ ]
54
56
builds ?: TypesGen . WorkspaceBuild [ ]
57
+ templateWarnings ?: TypesGen . TemplateVersionWarning [ ]
55
58
canUpdateWorkspace : boolean
56
59
canUpdateTemplate : boolean
57
60
canChangeVersions : boolean
@@ -96,6 +99,7 @@ export const Workspace: FC<React.PropsWithChildren<WorkspaceProps>> = ({
96
99
quota_budget,
97
100
failedBuildLogs,
98
101
handleBuildRetry,
102
+ templateWarnings,
99
103
} ) => {
100
104
const styles = useStyles ( )
101
105
const navigate = useNavigate ( )
@@ -186,6 +190,25 @@ export const Workspace: FC<React.PropsWithChildren<WorkspaceProps>> = ({
186
190
handleClick = { ( ) => navigate ( `/templates` ) }
187
191
/>
188
192
193
+ { templateWarnings && (
194
+ < Maybe
195
+ condition = { Boolean (
196
+ templateWarnings . includes ( "DEPRECATED_PARAMETERS" ) ,
197
+ ) }
198
+ >
199
+ < AlertBanner severity = "warning" >
200
+ < div >
201
+ This template uses legacy parameters which will be deprecated
202
+ in the next Coder release. Learn how to migrate in{ " " }
203
+ < Link href = "https://coder.com/docs/v2/latest/templates/parameters#migration" >
204
+ our documentation
205
+ </ Link >
206
+ .
207
+ </ div >
208
+ </ AlertBanner >
209
+ </ Maybe >
210
+ ) }
211
+
189
212
{ failedBuildLogs && (
190
213
< Stack >
191
214
< AlertBanner severity = "error" >
0 commit comments