import React from 'react'; import { HorizontalGroup, LinkButton } from '@grafana/ui'; import { getExternalManageLink } from '../../helpers'; import { PluginStatus } from '../../types'; type ExternallyManagedButtonProps = { pluginId: string; pluginStatus: PluginStatus; }; export function ExternallyManagedButton({ pluginId, pluginStatus }: ExternallyManagedButtonProps) { const externalManageLink = `${getExternalManageLink(pluginId)}/?tab=installation`; if (pluginStatus === PluginStatus.UPDATE) { return ( Update via grafana.com Uninstall via grafana.com ); } if (pluginStatus === PluginStatus.UNINSTALL) { return ( Uninstall via grafana.com ); } return ( Install via grafana.com ); }