Skip to content

Commit

Permalink
[Fleet] Add docs links for performance tuning presets (#173318)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpollich authored Dec 13, 2023
1 parent 1868489 commit 1248f55
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 22 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 @@ -781,6 +781,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
elasticAgentInputConfiguration: `${FLEET_DOCS}elastic-agent-input-configuration.html`,
policySecrets: `${FLEET_DOCS}agent-policy.html#agent-policy-secret-values`,
remoteESOoutput: `${FLEET_DOCS}monitor-elastic-agent.html#external-elasticsearch-monitoring`,
performancePresets: `${FLEET_DOCS}es-output-settings.html#es-output-settings-performance-tuning-settings`,
},
ecs: {
guide: `${ELASTIC_WEBSITE_URL}guide/en/ecs/current/index.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 @@ -536,6 +536,7 @@ export interface DocLinks {
elasticAgentInputConfiguration: string;
policySecrets: string;
remoteESOoutput: string;
performancePresets: string;
}>;
readonly ecs: {
readonly guide: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -570,38 +570,57 @@ export const EditOutputFlyout: React.FunctionComponent<EditOutputFlyoutProps> =
<>
<EuiSpacer size="l" />
<EuiFormRow
fullWidth
label={
<FormattedMessage
id="xpack.fleet.settings.editOutputFlyout.performanceTuningLabel"
defaultMessage="Performance tuning"
/>
}
>
<>
<EuiSelect
data-test-subj="settingsOutputsFlyout.presetInput"
{...inputs.presetInput.props}
onChange={(e) => inputs.presetInput.setValue(e.target.value)}
disabled={
inputs.presetInput.props.disabled ||
outputYmlIncludesReservedPerformanceKey(
inputs.additionalYamlConfigInput.value,
safeLoad
)
}
options={[
{ value: 'balanced', text: 'Balanced' },
{ value: 'custom', text: 'Custom' },
{ value: 'throughput', text: 'Throughput' },
{ value: 'scale', text: 'Scale' },
{ value: 'latency', text: 'Latency' },
]}
helpText={
<FormattedMessage
id="xpack.fleet.settings.editOutputFlyout.performanceTuningHelpText"
defaultMessage="Performance tuning presets are curated output settings for common use cases. You can also select {custom} to specify your own settings in the Advanced YAML Configuration box below. For a detailed list of settings configured by each preset, see {link}."
values={{
custom: <strong>Custom</strong>,
link: (
<EuiLink
href={docLinks.links.fleet.performancePresets}
external
target="_blank"
>
<FormattedMessage
id="xpack.fleet.settings.editOutputFlyout.performanceTuningHelpTextLink"
defaultMessage="our documentation"
/>
</EuiLink>
),
}}
/>
</>
}
>
<EuiSelect
data-test-subj="settingsOutputsFlyout.presetInput"
{...inputs.presetInput.props}
onChange={(e) => inputs.presetInput.setValue(e.target.value)}
disabled={
inputs.presetInput.props.disabled ||
outputYmlIncludesReservedPerformanceKey(
inputs.additionalYamlConfigInput.value,
safeLoad
)
}
options={[
{ value: 'balanced', text: 'Balanced' },
{ value: 'custom', text: 'Custom' },
{ value: 'throughput', text: 'Throughput' },
{ value: 'scale', text: 'Scale' },
{ value: 'latency', text: 'Latency' },
]}
/>
</EuiFormRow>
</>
)}

{supportsPresets &&
outputYmlIncludesReservedPerformanceKey(
inputs.additionalYamlConfigInput.value,
Expand Down

0 comments on commit 1248f55

Please sign in to comment.