ImagesTable: Only show Launch link for images using sources
The Launch service wizard should only be used to launch AWS images that were created using share_with_sources (and not share_with_accounts) in their request. The Launch service only supports a single source at the moment, as does the Image Builder Frontend. Therefore, we do not pass the entire share_with_sources array - only the 0th element, which should be the `only` source for images created using the front-end. We do not expect full compatibility between images created using the API (which could theoretically have multiple sources in share_with_sources) and Image Builder Frontend.
This commit is contained in:
parent
5d4e365ef8
commit
39af9bddeb
1 changed files with 2 additions and 1 deletions
|
|
@ -35,7 +35,7 @@ const ProvisioningLink = ({ imageId, isExpired, isInClonesTable }) => {
|
|||
);
|
||||
|
||||
const provider = getImageProvider(image);
|
||||
if (!error) {
|
||||
if (!error && image.share_with_sources) {
|
||||
return (
|
||||
<Suspense fallback="loading">
|
||||
<Button variant="link" isInline onClick={() => openWizard(true)}>
|
||||
|
|
@ -50,6 +50,7 @@ const ProvisioningLink = ({ imageId, isExpired, isInClonesTable }) => {
|
|||
id: image.id,
|
||||
architecture: image.architecture,
|
||||
provider: provider,
|
||||
sourceId: image.share_with_sources[0],
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue