-
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.
Merge pull request #1387 from sgratch/Warn-preserve-staticIP-mapped-t…
…o-pod-network Display a warning if preserve static IPs are enabled with pod network mapping
- Loading branch information
Showing
11 changed files
with
101 additions
and
18 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
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
12 changes: 5 additions & 7 deletions
12
...klift-console-plugin/src/modules/Plans/views/details/components/PlanCriticalCondition.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
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
31 changes: 31 additions & 0 deletions
31
...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,31 @@ | ||
import React from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import Linkify from 'react-linkify'; | ||
import { EMPTY_MSG } from 'src/utils/constants'; | ||
|
||
import { Alert, AlertVariant, Text, TextContent, TextVariants } from '@patternfly/react-core'; | ||
|
||
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={AlertVariant.warning} | ||
> | ||
<TextContent className="forklift-providers-list-header__alert"> | ||
<Text component={TextVariants.p}> | ||
<Linkify>{message || EMPTY_MSG}</Linkify> | ||
<br /> | ||
<br /> | ||
<Linkify>{suggestion || EMPTY_MSG}</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
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
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 @@ | ||
export const EMPTY_MSG = '-'; |
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