Skip to content

Commit

Permalink
Merge pull request #1407 from sgratch/exclude-EditCredentials-from-pr…
Browse files Browse the repository at this point in the history
…ovider-dropdown-for-ova

Exclude the 'Edit Provider Credentials' dropdown menu item for OVA provider
  • Loading branch information
metalice authored Dec 11, 2024
2 parents 6b665d4 + ea4f80d commit 4000d26
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 4000d26

Please sign in to comment.