Skip to content

Commit

Permalink
[Fleet] Add Fleet Settings link to the output section (elastic#165678)
Browse files Browse the repository at this point in the history
## Summary
Update the fleet output page and add links for users.
Update the fleet ES output page and add link for the custom yaml box

Co-authored-by: julienlind <[email protected]>
  • Loading branch information
jlind23 and julienlind authored Sep 6, 2023
1 parent e8699ce commit b48dc84
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
1 change: 1 addition & 0 deletions packages/kbn-doc-links/src/get_doc_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
settings: `${FLEET_DOCS}fleet-settings.html`,
kafkaSettings: `${FLEET_DOCS}kafka-output-settings.html`,
logstashSettings: `${FLEET_DOCS}ls-output-settings.html`,
esSettings: `${FLEET_DOCS}es-output-settings.html`,
settingsFleetServerHostSettings: `${FLEET_DOCS}fleet-settings.html#fleet-server-hosts-setting`,
settingsFleetServerProxySettings: `${KIBANA_DOCS}fleet-settings-kb.html#fleet-data-visualizer-settings`,
troubleshooting: `${FLEET_DOCS}fleet-troubleshooting.html`,
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-doc-links/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ export interface DocLinks {
guide: string;
fleetServer: string;
fleetServerAddFleetServer: string;
esSettings: string;
settings: string;
logstashSettings: string;
kafkaSettings: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,13 @@ export const EditOutputFlyout: React.FunctionComponent<EditOutputFlyoutProps> =
/>
</EuiFormRow>
<EuiFormRow
label={i18n.translate('xpack.fleet.settings.editOutputFlyout.yamlConfigInputLabel', {
defaultMessage: 'Advanced YAML configuration',
})}
label={
<EuiLink href={docLinks.links.fleet.esSettings} external target="_blank">
{i18n.translate('xpack.fleet.settings.editOutputFlyout.yamlConfigInputLabel', {
defaultMessage: 'Advanced YAML configuration',
})}
</EuiLink>
}
{...inputs.additionalYamlConfigInput.formRowProps}
fullWidth
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
*/

import React from 'react';
import { EuiTitle, EuiText, EuiSpacer, EuiButtonEmpty } from '@elastic/eui';
import { EuiTitle, EuiText, EuiSpacer, EuiButtonEmpty, EuiLink } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';

import { useLink } from '../../../../hooks';
import { useLink, useStartServices } from '../../../../hooks';
import type { Output } from '../../../../types';
import { OutputsTable } from '../outputs_table';

Expand All @@ -23,6 +23,7 @@ export const OutputSection: React.FunctionComponent<OutputSectionProps> = ({
deleteOutput,
}) => {
const { getHref } = useLink();
const { docLinks } = useStartServices();

return (
<>
Expand All @@ -33,10 +34,12 @@ export const OutputSection: React.FunctionComponent<OutputSectionProps> = ({
</EuiTitle>
<EuiSpacer size="xs" />
<EuiText color="subdued" size="m">
<FormattedMessage
id="xpack.fleet.settings.outputSectionSubtitle"
defaultMessage="Specify where agents will send data."
/>
<EuiLink href={docLinks.links.fleet.settings} external target="_blank">
<FormattedMessage
id="xpack.fleet.settings.outputSectionSubtitle"
defaultMessage="Specify where agents will send data."
/>
</EuiLink>
</EuiText>
<EuiSpacer size="m" />
<OutputsTable outputs={outputs} deleteOutput={deleteOutput} />
Expand Down

0 comments on commit b48dc84

Please sign in to comment.