Skip to content

Commit

Permalink
[APM] fixing feedback copy
Browse files Browse the repository at this point in the history
  • Loading branch information
cauemarcondes committed Sep 26, 2022
2 parents 5c3761d + 181dcc1 commit 2b7618a
Showing 1 changed file with 13 additions and 36 deletions.
49 changes: 13 additions & 36 deletions x-pack/plugins/observability/server/ui_settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,16 @@ import {

const technicalPreviewLabel = i18n.translate(
'xpack.observability.uiSettings.technicalPreviewLabel',
{
defaultMessage: 'technical preview',
}
{ defaultMessage: 'technical preview' }
);

function feedbackLink({ href }: { href: string }) {
return `<a href="${href}" target="_blank" rel="noopener noreferrer">${i18n.translate(
'xpack.observability.uiSettings.giveFeedBackLabel',
{ defaultMessage: 'Give feedback' }
)}</a>`;
}

type UiSettings = UiSettingsParams<boolean | number | string> & { showInLabs?: boolean };

/**
Expand Down Expand Up @@ -167,12 +172,7 @@ export const uiSettings: Record<string, UiSettings> = {
'{technicalPreviewLabel} Enable the Service groups feature on APM UI. {feedbackLink}.',
values: {
technicalPreviewLabel: `<em>[${technicalPreviewLabel}]</em>`,
feedbackLink:
'<a href="https://ela.st/feedback-service-groups" target="_blank" rel="noopener noreferrer">' +
i18n.translate('xpack.observability.enableServiceGroups.feedbackLinkText', {
defaultMessage: 'Give feedback',
}) +
'</a>',
feedbackLink: feedbackLink({ href: 'https://ela.st/feedback-service-groups' }),
},
}),
schema: schema.boolean(),
Expand Down Expand Up @@ -206,15 +206,7 @@ export const uiSettings: Record<string, UiSettings> = {
'{technicalPreviewLabel} Default APM Service Inventory page sort (for Services without Machine Learning applied) to sort by Service Name. {feedbackLink}.',
values: {
technicalPreviewLabel: `<em>[${technicalPreviewLabel}]</em>`,
feedbackLink:
'<a href="https://ela.st/feedback-apm-page-performance" target="_blank" rel="noopener noreferrer">' +
i18n.translate(
'xpack.observability.apmServiceInventoryOptimizedSorting.feedbackLinkText',
{
defaultMessage: 'Give feedback',
}
) +
'</a>',
feedbackLink: feedbackLink({ href: 'https://ela.st/feedback-apm-page-performance' }),
},
}
),
Expand Down Expand Up @@ -245,12 +237,7 @@ export const uiSettings: Record<string, UiSettings> = {
'{technicalPreviewLabel} Enable the APM Trace Explorer feature, that allows you to search and inspect traces with KQL or EQL. {feedbackLink}.',
values: {
technicalPreviewLabel: `<em>[${technicalPreviewLabel}]</em>`,
feedbackLink:
'<a href="https://ela.st/feedback-trace-explorer" target="_blank" rel="noopener noreferrer">' +
i18n.translate('xpack.observability.apmTraceExplorerTabDescription.feedbackLinkText', {
defaultMessage: 'Give feedback',
}) +
'</a>',
feedbackLink: feedbackLink({ href: 'https://ela.st/feedback-trace-explorer' }),
},
}),
schema: schema.boolean(),
Expand All @@ -269,12 +256,7 @@ export const uiSettings: Record<string, UiSettings> = {
'{technicalPreviewLabel} Enable the APM Operations Breakdown feature, that displays aggregates for backend operations. {feedbackLink}.',
values: {
technicalPreviewLabel: `<em>[${technicalPreviewLabel}]</em>`,
feedbackLink:
'<a href="https://ela.st/feedback-operations-breakdown" target="_blank" rel="noopener noreferrer">' +
i18n.translate('xpack.observability.apmOperationsBreakdownDescription.feedbackLinkText', {
defaultMessage: 'Give feedback',
}) +
'</a>',
feedbackLink: feedbackLink({ href: 'https://ela.st/feedback-operations-breakdown' }),
},
}),
schema: schema.boolean(),
Expand Down Expand Up @@ -318,12 +300,7 @@ export const uiSettings: Record<string, UiSettings> = {
'{technicalPreviewLabel} Display Amazon Lambda metrics in the service metrics tab. {feedbackLink}',
values: {
technicalPreviewLabel: `<em>[${technicalPreviewLabel}]</em>`,
feedbackLink:
'<a href="https://ela.st/feedback-aws-lambda" target="_blank" rel="noopener noreferrer">' +
i18n.translate('xpack.observability.awsLambdaDescription', {
defaultMessage: 'Send feedback',
}) +
'</a>',
feedbackLink: feedbackLink({ href: 'https://ela.st/feedback-aws-lambda' }),
},
}),
schema: schema.boolean(),
Expand Down

0 comments on commit 2b7618a

Please sign in to comment.