Skip to content

Commit fdd2cd5

Browse files
committed
updated harcoded url to use doc links service
1 parent d99c2b7 commit fdd2cd5

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
108108
configuration: `${ELASTIC_WEBSITE_URL}guide/en/beats/filebeat/${DOC_LINK_VERSION}/configuring-howto-filebeat.html`,
109109
elasticsearchModule: `${ELASTIC_WEBSITE_URL}guide/en/beats/filebeat/${DOC_LINK_VERSION}/filebeat-module-elasticsearch.html`,
110110
elasticsearchOutput: `${ELASTIC_WEBSITE_URL}guide/en/beats/filebeat/${DOC_LINK_VERSION}/elasticsearch-output.html`,
111+
kafkaOutput: `${ELASTIC_WEBSITE_URL}guide/en/beats/filebeat/${DOC_LINK_VERSION}/kafka-output.html`,
111112
startup: `${ELASTIC_WEBSITE_URL}guide/en/beats/filebeat/${DOC_LINK_VERSION}/filebeat-starting.html`,
112113
exportedFields: `${ELASTIC_WEBSITE_URL}guide/en/beats/filebeat/${DOC_LINK_VERSION}/exported-fields.html`,
113114
suricataModule: `${ELASTIC_WEBSITE_URL}guide/en/beats/filebeat/${DOC_LINK_VERSION}/filebeat-module-suricata.html`,

src/platform/packages/shared/kbn-doc-links/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export interface DocLinks {
7070
readonly configuration: string;
7171
readonly elasticsearchOutput: string;
7272
readonly elasticsearchModule: string;
73+
readonly kafkaOutput: string;
7374
readonly startup: string;
7475
readonly exportedFields: string;
7576
readonly suricataModule: string;

x-pack/platform/plugins/shared/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_kafka_topics.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import {
2020
import { FormattedMessage } from '@kbn/i18n-react';
2121
import { i18n } from '@kbn/i18n';
2222

23+
import { useStartServices } from '../../../../hooks';
24+
2325
import {
2426
kafkaTopicsType,
2527
KAFKA_DYNAMIC_FIELDS,
@@ -31,6 +33,8 @@ import type { OutputFormInputsType } from './use_output_form';
3133
export const OutputFormKafkaTopics: React.FunctionComponent<{ inputs: OutputFormInputsType }> = ({
3234
inputs,
3335
}) => {
36+
const { docLinks } = useStartServices();
37+
3438
const dynamicOptions: Array<EuiComboBoxOptionOption<string>> = useMemo(() => {
3539
const options = KAFKA_DYNAMIC_FIELDS.map((option) => ({
3640
label: option,
@@ -77,11 +81,7 @@ export const OutputFormKafkaTopics: React.FunctionComponent<{ inputs: OutputForm
7781
defaultMessage="Topic from field(s). For more info, see our {guideLink}"
7882
values={{
7983
guideLink: (
80-
<EuiLink
81-
href="https://www.elastic.co/guide/en/beats/filebeat/current/kafka-output.html#topic-option-kafka"
82-
target="_blank"
83-
external
84-
>
84+
<EuiLink href={docLinks.links.filebeat.kafkaOutput} target="_blank" external>
8585
<FormattedMessage
8686
id="xpack.fleet.settings.kafkaGuideLink"
8787
defaultMessage="docs."

0 commit comments

Comments
 (0)