1
1
import PropTypes from 'prop-types' ;
2
2
import React , { Suspense } from 'react' ;
3
- import { Bullseye , Spinner } from '@patternfly/react-core' ;
3
+ import { Alert , AlertActionLink , Button , Bullseye , Spinner } from '@patternfly/react-core' ;
4
+ import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon' ;
4
5
import { humanizeProvider } from '../../Common/helpers' ;
5
6
6
7
const SourceMissing = React . lazy ( ( ) => import ( './SourceMissing' ) ) ;
@@ -45,6 +46,40 @@ const missingSource = ({ image, isLoading, sourcesError }) => [
45
46
} ,
46
47
] ;
47
48
49
+ const DecommissioningAlert = ( ) => (
50
+ < Alert
51
+ variant = "info"
52
+ isInline
53
+ title = "Upcoming decommission of the Image Builder Launch service"
54
+ className = "pf-v6-u-mt-sm pf-v6-u-mb-sm"
55
+ actionLinks = {
56
+ < React . Fragment >
57
+ < AlertActionLink >
58
+ < Button component = "a" target = "_blank" variant = "link" icon = { < ExternalLinkAltIcon /> } iconPosition = "right" isInline href = "TBD/" >
59
+ TBD
60
+ </ Button >
61
+ </ AlertActionLink >
62
+ </ React . Fragment >
63
+ }
64
+ >
65
+ < p >
66
+ As of [TBD: date], the Image Builder Launch service will be discontinued. It will no longer be possible to launch instances directly from custom
67
+ images using this service. After this date, custom images must be launched by following the cloud provider's standard procedures.
68
+ </ p >
69
+ < p > [TBD: Insert info source clean up if necessary]</ p >
70
+ </ Alert >
71
+ ) ;
72
+
73
+ const StepContentWrapper = ( { children } ) => (
74
+ < >
75
+ < DecommissioningAlert />
76
+ { children }
77
+ </ >
78
+ ) ;
79
+ StepContentWrapper . propTypes = {
80
+ children : PropTypes . node . isRequired ,
81
+ } ;
82
+
48
83
const wizardSteps = ( { stepIdReached, image, stepValidation, setStepValidation, setLaunchSuccess } ) => [
49
84
{
50
85
name : 'Account and customization' ,
@@ -54,9 +89,11 @@ const wizardSteps = ({ stepIdReached, image, stepValidation, setStepValidation,
54
89
id : 1 ,
55
90
enableNext : stepValidation . awsStep ,
56
91
component : (
57
- < Loader >
58
- < AccountCustomizations image = { image } setStepValidated = { ( validated ) => setStepValidation ( ( prev ) => ( { ...prev , awsStep : validated } ) ) } />
59
- </ Loader >
92
+ < StepContentWrapper >
93
+ < Loader >
94
+ < AccountCustomizations image = { image } setStepValidated = { ( validated ) => setStepValidation ( ( prev ) => ( { ...prev , awsStep : validated } ) ) } />
95
+ </ Loader >
96
+ </ StepContentWrapper >
60
97
) ,
61
98
canJumpTo : stepIdReached >= 1 ,
62
99
} ,
@@ -66,9 +103,11 @@ const wizardSteps = ({ stepIdReached, image, stepValidation, setStepValidation,
66
103
name : 'SSH key authentication' ,
67
104
id : 4 ,
68
105
component : (
69
- < Loader >
70
- < PublicKeys setStepValidated = { ( validated ) => setStepValidation ( ( prev ) => ( { ...prev , sshStep : validated } ) ) } />
71
- </ Loader >
106
+ < StepContentWrapper >
107
+ < Loader >
108
+ < PublicKeys setStepValidated = { ( validated ) => setStepValidation ( ( prev ) => ( { ...prev , sshStep : validated } ) ) } />
109
+ </ Loader >
110
+ </ StepContentWrapper >
72
111
) ,
73
112
canJumpTo : stepIdReached >= 4 ,
74
113
enableNext : stepValidation . sshStep ,
@@ -77,9 +116,11 @@ const wizardSteps = ({ stepIdReached, image, stepValidation, setStepValidation,
77
116
name : 'Review details' ,
78
117
id : 5 ,
79
118
component : (
80
- < Loader >
81
- < ReviewDetails image = { image } />
82
- </ Loader >
119
+ < StepContentWrapper >
120
+ < Loader >
121
+ < ReviewDetails image = { image } />
122
+ </ Loader >
123
+ </ StepContentWrapper >
83
124
) ,
84
125
canJumpTo : stepIdReached >= 5 ,
85
126
nextButtonText : 'Launch' ,
@@ -88,9 +129,11 @@ const wizardSteps = ({ stepIdReached, image, stepValidation, setStepValidation,
88
129
name : 'Finish Progress' ,
89
130
id : 6 ,
90
131
component : (
91
- < Loader >
92
- < FinishStep setLaunchSuccess = { ( ) => setLaunchSuccess ( true ) } imageID = { image . id } />
93
- </ Loader >
132
+ < StepContentWrapper >
133
+ < Loader >
134
+ < FinishStep setLaunchSuccess = { ( ) => setLaunchSuccess ( true ) } imageID = { image . id } />
135
+ </ Loader >
136
+ </ StepContentWrapper >
94
137
) ,
95
138
isFinishedStep : true ,
96
139
} ,
0 commit comments