-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display a Warnning if preserve static IPs are enabled with pod network
Reference:https://issues.redhat.com/browse/MTV-1503 In case there is no critical error for a plan and in addition, the plan is set to enable the preserve static IPs for the VMs while at least one of the destination network mappings is set to 'Pod Networking' type => then display a warning alert at the head of plan page. Signed-off-by: Sharon Gratch <[email protected]>
- Loading branch information
Showing
4 changed files
with
77 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...rklift-console-plugin/src/modules/Plans/views/details/components/PlanWarningCondition.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import Linkify from 'react-linkify'; | ||
|
||
import { Alert, Text, TextContent, TextVariants } from '@patternfly/react-core'; | ||
|
||
export const PlanWarningCondition: React.FC<{ | ||
type: string; | ||
message: string; | ||
suggestion: string; | ||
}> = ({ type, message, suggestion }) => { | ||
const { t } = useTranslation(); | ||
return ( | ||
<Alert title={t('The plan migration might not work as expected - ') + type} variant="warning"> | ||
<TextContent className="forklift-providers-list-header__alert"> | ||
<Text component={TextVariants.p}> | ||
<Linkify>{message || '-'}</Linkify> | ||
<br /> | ||
<br /> | ||
<Linkify>{suggestion || '-'}</Linkify> | ||
</Text> | ||
</TextContent> | ||
</Alert> | ||
); | ||
}; | ||
|
||
export default PlanWarningCondition; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters