[APM]Adding tech preview on Span Links feature (#132280)

* adding tech preview on Span Links feature

* refactoring
This commit is contained in:
Cauê Marcondes 2022-05-17 11:56:00 -04:00 committed by GitHub
parent dce67d2dc5
commit 11b9c2924a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 4 deletions

View file

@ -4,12 +4,13 @@
* 2.0; you may not use this file except in compliance with the Elastic License * 2.0; you may not use this file except in compliance with the Elastic License
* 2.0. * 2.0.
*/ */
import React from 'react';
import { EuiNotificationBadge, EuiSpacer } from '@elastic/eui'; import { EuiNotificationBadge, EuiSpacer } from '@elastic/eui';
import { i18n } from '@kbn/i18n'; import { i18n } from '@kbn/i18n';
import React from 'react';
import { SpanLinks } from '.'; import { SpanLinks } from '.';
import { SpanLinksCount } from '../../app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers';
import { ProcessorEvent } from '../../../../common/processor_event'; import { ProcessorEvent } from '../../../../common/processor_event';
import { SpanLinksCount } from '../../app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers';
import { TechnicalPreviewBadge } from '../technical_preview_badge';
interface Props { interface Props {
spanLinksCount: SpanLinksCount; spanLinksCount: SpanLinksCount;
@ -31,6 +32,7 @@ export function getSpanLinksTabContent({
return { return {
id: 'span_links', id: 'span_links',
'data-test-subj': 'spanLinksTab', 'data-test-subj': 'spanLinksTab',
prepend: <TechnicalPreviewBadge icon="beaker" />,
name: ( name: (
<> <>
{i18n.translate('xpack.apm.propertiesTable.tabs.spanLinks', { {i18n.translate('xpack.apm.propertiesTable.tabs.spanLinks', {

View file

@ -5,11 +5,15 @@
* 2.0. * 2.0.
*/ */
import { EuiBetaBadge } from '@elastic/eui'; import { EuiBetaBadge, IconType } from '@elastic/eui';
import { i18n } from '@kbn/i18n'; import { i18n } from '@kbn/i18n';
import React from 'react'; import React from 'react';
export function TechnicalPreviewBadge() { interface Props {
icon?: IconType;
}
export function TechnicalPreviewBadge({ icon }: Props) {
return ( return (
<EuiBetaBadge <EuiBetaBadge
label={i18n.translate('xpack.apm.technicalPreviewBadgeLabel', { label={i18n.translate('xpack.apm.technicalPreviewBadgeLabel', {
@ -22,6 +26,7 @@ export function TechnicalPreviewBadge() {
'This functionality is in technical preview and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.', 'This functionality is in technical preview and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.',
} }
)} )}
iconType={icon}
/> />
); );
} }