Skip to content

Commit

Permalink
Exclude the 'Edit Provider Credentials' dropdown item for OVA
Browse files Browse the repository at this point in the history
Reference: https://issues.redhat.com/browse/MTV-1766

Since editing the OVA provider cresentials is not supported, exclude
this option from the providers dropdown menu items.

Signed-off-by: Sharon Gratch <[email protected]>
  • Loading branch information
sgratch committed Dec 10, 2024
1 parent faf4a53 commit ea4f80d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const ProviderActionsDropdownItems = ({ data }: ProviderActionsDropdownIt
showModal(<DeleteModal resource={provider} model={ProviderModel} />);
};

return [
const dropdownItems = [
<DropdownItemLink key="EditProvider" href={providerURL}>
{t('Edit Provider')}
</DropdownItemLink>,
Expand All @@ -38,6 +38,11 @@ export const ProviderActionsDropdownItems = ({ data }: ProviderActionsDropdownIt
{t('Delete Provider')}
</DropdownItem>,
];

// excluding the EditCredentials options since not supported for OVA
const ovaDropdownItems = dropdownItems.filter((item) => item.key !== 'EditCredentials');

return provider?.spec?.type === 'ova' ? ovaDropdownItems : dropdownItems;
};

interface ProviderActionsDropdownItemsProps {
Expand Down

0 comments on commit ea4f80d

Please sign in to comment.