From d33053e4604178e232834ebe58644fa61747c8e8 Mon Sep 17 00:00:00 2001 From: cpathipa <119517080+cpathipa@users.noreply.github.com> Date: Thu, 16 Mar 2023 10:26:17 -0500 Subject: [PATCH 1/4] fix: [M3-6254] show warning message for only Linode clone and backups flow --- .../linodes/LinodesCreate/LinodeCreate.tsx | 13 ++-------- .../UserDataAccordion/AccordionHeading.tsx | 24 +++++++++++++++---- .../UserDataAccordion.test.tsx | 11 +++++---- .../UserDataAccordion/UserDataAccordion.tsx | 6 ++--- 4 files changed, 31 insertions(+), 23 deletions(-) diff --git a/packages/manager/src/features/linodes/LinodesCreate/LinodeCreate.tsx b/packages/manager/src/features/linodes/LinodesCreate/LinodeCreate.tsx index 7ed1e00015f..319700f87c5 100644 --- a/packages/manager/src/features/linodes/LinodesCreate/LinodeCreate.tsx +++ b/packages/manager/src/features/linodes/LinodesCreate/LinodeCreate.tsx @@ -35,7 +35,6 @@ import { DefaultProps as ImagesProps } from 'src/containers/images.container'; import { AppsDocs } from 'src/documentation'; import EUAgreementCheckbox from 'src/features/Account/Agreements/EUAgreementCheckbox'; import SMTPRestrictionText from 'src/features/linodes/SMTPRestrictionText'; -import UserDataAccordion from 'src/features/linodes/LinodesCreate/UserDataAccordion/UserDataAccordion'; import { getCommunityStackscripts, getMineAndAccountStackScripts, @@ -60,6 +59,7 @@ import FromBackupsContent from './TabbedContent/FromBackupsContent'; import FromImageContent from './TabbedContent/FromImageContent'; import FromLinodeContent from './TabbedContent/FromLinodeContent'; import FromStackScriptContent from './TabbedContent/FromStackScriptContent'; +import UserDataAccordion from './UserDataAccordion/UserDataAccordion'; import { renderBackupsDisplaySection } from './TabbedContent/utils'; import { AllFormStateAndHandlers, @@ -551,11 +551,6 @@ export class LinodeCreate extends React.PureComponent< const showUserData = imageIsCloudInitCompatible || linodeIsCloudInitCompatible; - const userDataHeaderWarningMessage = - this.props.createType === 'fromBackup' - ? 'Existing user data is not available when creating a Linode from a backup.' - : 'User data is not cloned.'; - return (