diff --git a/x-pack/plugins/watcher/public/application/app_context.tsx b/x-pack/plugins/watcher/public/application/app_context.tsx index 8b1efbc9a1fe5..81fbfa97845a6 100644 --- a/x-pack/plugins/watcher/public/application/app_context.tsx +++ b/x-pack/plugins/watcher/public/application/app_context.tsx @@ -16,18 +16,14 @@ interface ContextValue extends Omit { const AppContext = createContext(null as any); -// eslint-disable-next-line @typescript-eslint/naming-convention -const generateDocLinks = ({ ELASTIC_WEBSITE_URL, DOC_LINK_VERSION }: DocLinksStart) => { - const elasticDocLinkBase = `${ELASTIC_WEBSITE_URL}guide/en/`; - const esBase = `${elasticDocLinkBase}elasticsearch/reference/${DOC_LINK_VERSION}`; - const kibanaBase = `${elasticDocLinkBase}kibana/${DOC_LINK_VERSION}`; - const putWatchApiUrl = `${esBase}/watcher-api-put-watch.html`; - const executeWatchApiUrl = `${esBase}/watcher-api-execute-watch.html#watcher-api-execute-watch-action-mode`; - const watcherGettingStartedUrl = `${kibanaBase}/watcher-ui.html`; +const generateDocLinks = ({ links }: DocLinksStart) => { + const putWatchApiUrl = `${links.apis.putWatch}`; + const executeWatchApiUrl = `${links.apis.executeWatchActionModes}`; + const watcherGettingStartedUrl = `${links.watcher.ui}`; const watchActionsConfigurationMap = { - [ACTION_TYPES.SLACK]: `${esBase}/actions-slack.html#configuring-slack`, - [ACTION_TYPES.PAGERDUTY]: `${esBase}/actions-pagerduty.html#configuring-pagerduty`, - [ACTION_TYPES.JIRA]: `${esBase}/actions-jira.html#configuring-jira`, + [ACTION_TYPES.SLACK]: `${links.watcher.slackAction}`, + [ACTION_TYPES.PAGERDUTY]: `${links.watcher.pagerDutyAction}`, + [ACTION_TYPES.JIRA]: `${links.watcher.jiraAction}`, }; return {