From 6bab1577f600ad9e8b9ba474215a4e37dcd8eba9 Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Mon, 30 Aug 2021 14:41:16 -0700 Subject: [PATCH] Replace hard-coded link to APM rules (#109021) --- src/core/public/doc_links/doc_links_service.ts | 1 + .../apm/public/components/alerting/register_apm_alerts.ts | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/core/public/doc_links/doc_links_service.ts b/src/core/public/doc_links/doc_links_service.ts index ff0542232e9860..a366202ceddda2 100644 --- a/src/core/public/doc_links/doc_links_service.ts +++ b/src/core/public/doc_links/doc_links_service.ts @@ -278,6 +278,7 @@ export class DocLinksService { alerting: { guide: `${KIBANA_DOCS}create-and-manage-rules.html`, actionTypes: `${KIBANA_DOCS}action-types.html`, + apmRules: `${KIBANA_DOCS}apm-alerts.html`, emailAction: `${KIBANA_DOCS}email-action-type.html`, emailActionConfig: `${KIBANA_DOCS}email-action-type.html`, generalSettings: `${KIBANA_DOCS}alert-action-settings-kb.html#general-alert-action-settings`, diff --git a/x-pack/plugins/apm/public/components/alerting/register_apm_alerts.ts b/x-pack/plugins/apm/public/components/alerting/register_apm_alerts.ts index dc52d572e2f35f..4fc2dcefc9c5fd 100644 --- a/x-pack/plugins/apm/public/components/alerting/register_apm_alerts.ts +++ b/x-pack/plugins/apm/public/components/alerting/register_apm_alerts.ts @@ -78,7 +78,7 @@ export function registerApmAlerts( }, iconClass: 'bell', documentationUrl(docLinks) { - return `${docLinks.ELASTIC_WEBSITE_URL}guide/en/kibana/${docLinks.DOC_LINK_VERSION}/apm-alerts.html`; + return `${docLinks.links.alerting.apmRules}`; }, alertParamsExpression: lazy(() => import('./error_count_alert_trigger')), validate: () => ({ @@ -126,7 +126,7 @@ export function registerApmAlerts( }), iconClass: 'bell', documentationUrl(docLinks) { - return `${docLinks.ELASTIC_WEBSITE_URL}guide/en/kibana/${docLinks.DOC_LINK_VERSION}/apm-alerts.html`; + return `${docLinks.links.alerting.apmRules}`; }, alertParamsExpression: lazy( () => import('./transaction_duration_alert_trigger') @@ -177,7 +177,7 @@ export function registerApmAlerts( }), iconClass: 'bell', documentationUrl(docLinks) { - return `${docLinks.ELASTIC_WEBSITE_URL}guide/en/kibana/${docLinks.DOC_LINK_VERSION}/apm-alerts.html`; + return `${docLinks.links.alerting.apmRules}`; }, alertParamsExpression: lazy( () => import('./transaction_error_rate_alert_trigger') @@ -226,7 +226,7 @@ export function registerApmAlerts( }), iconClass: 'bell', documentationUrl(docLinks) { - return `${docLinks.ELASTIC_WEBSITE_URL}guide/en/kibana/${docLinks.DOC_LINK_VERSION}/apm-alerts.html`; + return `${docLinks.links.alerting.apmRules}`; }, alertParamsExpression: lazy( () => import('./transaction_duration_anomaly_alert_trigger')