[APM] Fix custom links warning (#163832)

Originally fixed in https://github.com/elastic/kibana/pull/83836


**Problem**

When running in basic mode and navigates to the transactions details
page a toast is display with the warning:

>To create custom links, you must be subscribed to an Elastic Gold
license or above. With it, you'll have the ability to create custom
links to improve your workflow when analyzing your services.

This is caused by a request to `GET internal/apm/settings/custom_links`.
This PR ensures that only when users have a valid license custom links
will be attempted loaded


<img width="1705" alt="image"
src="60c59c87-9837-4fbb-8172-5a4add121db0">
This commit is contained in:
Søren Louv-Jansen 2023-08-15 12:43:58 +02:00 committed by GitHub
parent feb72cd69f
commit 600c74997d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,11 +79,13 @@ export function TransactionActionMenu({ transaction, isLoading }: Props) {
return (
<>
<CustomLinkFlyout
transaction={transaction}
isOpen={isCreateEditFlyoutOpen}
onClose={() => setIsCreateEditFlyoutOpen(false)}
/>
{hasGoldLicense && (
<CustomLinkFlyout
transaction={transaction}
isOpen={isCreateEditFlyoutOpen}
onClose={() => setIsCreateEditFlyoutOpen(false)}
/>
)}
<ActionMenu
id="transactionActionMenu"