Skip to content

Commit e38e9a1

Browse files
committed
feat(HMS-8794): add decommissioning notification
1 parent 9e387ec commit e38e9a1

File tree

1 file changed

+56
-13
lines changed
  • src/Components/ProvisioningWizard/steps

1 file changed

+56
-13
lines changed

src/Components/ProvisioningWizard/steps/index.js

Lines changed: 56 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import PropTypes from 'prop-types';
22
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';
45
import { humanizeProvider } from '../../Common/helpers';
56

67
const SourceMissing = React.lazy(() => import('./SourceMissing'));
@@ -45,6 +46,40 @@ const missingSource = ({ image, isLoading, sourcesError }) => [
4546
},
4647
];
4748

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&apos;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+
4883
const wizardSteps = ({ stepIdReached, image, stepValidation, setStepValidation, setLaunchSuccess }) => [
4984
{
5085
name: 'Account and customization',
@@ -54,9 +89,11 @@ const wizardSteps = ({ stepIdReached, image, stepValidation, setStepValidation,
5489
id: 1,
5590
enableNext: stepValidation.awsStep,
5691
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>
6097
),
6198
canJumpTo: stepIdReached >= 1,
6299
},
@@ -66,9 +103,11 @@ const wizardSteps = ({ stepIdReached, image, stepValidation, setStepValidation,
66103
name: 'SSH key authentication',
67104
id: 4,
68105
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>
72111
),
73112
canJumpTo: stepIdReached >= 4,
74113
enableNext: stepValidation.sshStep,
@@ -77,9 +116,11 @@ const wizardSteps = ({ stepIdReached, image, stepValidation, setStepValidation,
77116
name: 'Review details',
78117
id: 5,
79118
component: (
80-
<Loader>
81-
<ReviewDetails image={image} />
82-
</Loader>
119+
<StepContentWrapper>
120+
<Loader>
121+
<ReviewDetails image={image} />
122+
</Loader>
123+
</StepContentWrapper>
83124
),
84125
canJumpTo: stepIdReached >= 5,
85126
nextButtonText: 'Launch',
@@ -88,9 +129,11 @@ const wizardSteps = ({ stepIdReached, image, stepValidation, setStepValidation,
88129
name: 'Finish Progress',
89130
id: 6,
90131
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>
94137
),
95138
isFinishedStep: true,
96139
},

0 commit comments

Comments
 (0)