Wizard: Adjust AWS launch popover for images created in preview
If an image does not contain a share_with_accounts property, launch links do not appear in the launch popover. This happens when a user creates an AWS image in beta/preview, and then clicks Launch in stable. A message is now displayed that explains the image was created using Preview features, and the link to Preview has been clarified to be more explicit.
This commit is contained in:
parent
d54d347d83
commit
fb9b9ca9a6
1 changed files with 10 additions and 1 deletions
|
|
@ -72,6 +72,9 @@ export const RegionsPopover = ({ composeId }) => {
|
|||
return listItems;
|
||||
}, [regions]);
|
||||
|
||||
const compose = useSelector((state) => selectComposeById(state, composeId));
|
||||
const createdInPreview = compose?.share_with_sources?.[0] ? true : false;
|
||||
|
||||
return (
|
||||
<Popover
|
||||
/* popovers aren't rendered inside of the main page section, make sure our prefixed css still
|
||||
|
|
@ -84,6 +87,12 @@ export const RegionsPopover = ({ composeId }) => {
|
|||
<ul>{listItems}</ul>
|
||||
{!isBeta() && (
|
||||
<>
|
||||
{createdInPreview && (
|
||||
<p>
|
||||
This image was created using features only available in
|
||||
Preview.
|
||||
</p>
|
||||
)}
|
||||
<Divider className="pf-u-mt-sm pf-u-mb-sm" />
|
||||
<Button
|
||||
isInline
|
||||
|
|
@ -92,7 +101,7 @@ export const RegionsPopover = ({ composeId }) => {
|
|||
href="/preview/insights/image-builder/landing"
|
||||
>
|
||||
<BetaLabel />
|
||||
Launch from here
|
||||
Launch from Preview
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue