Skip to content

Commit

Permalink
Small copy fixes and move deprecated unenrollment timeout setting to …
Browse files Browse the repository at this point in the history
…bottom
  • Loading branch information
jen-huang committed May 10, 2024
1 parent 1de6509 commit 81bfdaa
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export const AGENT_POLICY_ADVANCED_SETTINGS: SettingsConfig[] = [
name: 'agent.logging.level',
hidden: true,
title: i18n.translate('xpack.fleet.settings.agentPolicyAdvanced.agentLoggingLevelTitle', {
defaultMessage: 'Agent Logging Level',
defaultMessage: 'Agent logging level',
}),
description: i18n.translate(
'xpack.fleet.settings.agentPolicyAdvanced.agentLoggingLevelDescription',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent<Props> =
<FormattedMessage
id="xpack.fleet.agentPolicyForm.tamperingSwitchLabel"
defaultMessage="Prevent agent tampering"
/>
/>{' '}
{!policyHasElasticDefend && (
<span data-test-subj="tamperMissingIntegrationTooltip">
<EuiIconTip
Expand Down Expand Up @@ -587,7 +587,7 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent<Props> =
<h3>
<FormattedMessage
id="xpack.fleet.agentPolicyForm.downloadSourceLabel"
defaultMessage="Agent Binary Download"
defaultMessage="Agent binary download"
data-test-subj="agentPolicyForm.downloadSource.label"
/>
</h3>
Expand Down Expand Up @@ -624,62 +624,6 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent<Props> =
/>
</EuiFormRow>
</EuiDescribedFormGroup>
<EuiDescribedFormGroup
title={
<h3>
<FormattedMessage
id="xpack.fleet.agentPolicyForm.unenrollmentTimeoutLabel"
defaultMessage="Unenrollment timeout"
/>
&nbsp;
<EuiToolTip
content={i18n.translate('xpack.fleet.agentPolicyForm.unenrollmentTimeoutTooltip', {
defaultMessage:
'This setting is deprecated and will be removed in a future release. Consider using inactivity timeout instead',
})}
>
<EuiBetaBadge
label={i18n.translate(
'xpack.fleet.agentPolicyForm.unenrollmentTimeoutDeprecatedLabel',
{ defaultMessage: 'Deprecated' }
)}
size="s"
/>
</EuiToolTip>
</h3>
}
description={
<FormattedMessage
id="xpack.fleet.agentPolicyForm.unenrollmentTimeoutDescription"
defaultMessage="An optional timeout in seconds. If provided, and fleet server is below version 8.7.0, an agent will automatically unenroll after being gone for this period of time."
/>
}
>
<EuiFormRow
fullWidth
error={
touchedFields.unenroll_timeout && validation.unenroll_timeout
? validation.unenroll_timeout
: null
}
isInvalid={Boolean(touchedFields.unenroll_timeout && validation.unenroll_timeout)}
isDisabled={disabled}
>
<EuiFieldNumber
fullWidth
disabled={disabled || agentPolicy.is_managed === true}
value={agentPolicy.unenroll_timeout || ''}
min={0}
onChange={(e) => {
updateAgentPolicy({
unenroll_timeout: e.target.value ? Number(e.target.value) : 0,
});
}}
isInvalid={Boolean(touchedFields.unenroll_timeout && validation.unenroll_timeout)}
onBlur={() => setTouchedFields({ ...touchedFields, unenroll_timeout: true })}
/>
</EuiFormRow>
</EuiDescribedFormGroup>
<EuiDescribedFormGroup
title={
<h3>
Expand Down Expand Up @@ -766,6 +710,62 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent<Props> =
/>
</EuiFormRow>
</EuiDescribedFormGroup>
<EuiDescribedFormGroup
title={
<h3>
<FormattedMessage
id="xpack.fleet.agentPolicyForm.unenrollmentTimeoutLabel"
defaultMessage="Unenrollment timeout"
/>
&nbsp;
<EuiToolTip
content={i18n.translate('xpack.fleet.agentPolicyForm.unenrollmentTimeoutTooltip', {
defaultMessage:
'This setting is deprecated and will be removed in a future release. Consider using inactivity timeout instead',
})}
>
<EuiBetaBadge
label={i18n.translate(
'xpack.fleet.agentPolicyForm.unenrollmentTimeoutDeprecatedLabel',
{ defaultMessage: 'Deprecated' }
)}
size="s"
/>
</EuiToolTip>
</h3>
}
description={
<FormattedMessage
id="xpack.fleet.agentPolicyForm.unenrollmentTimeoutDescription"
defaultMessage="An optional timeout in seconds. If provided, and fleet server is below version 8.7.0, an agent will automatically unenroll after being gone for this period of time."
/>
}
>
<EuiFormRow
fullWidth
error={
touchedFields.unenroll_timeout && validation.unenroll_timeout
? validation.unenroll_timeout
: null
}
isInvalid={Boolean(touchedFields.unenroll_timeout && validation.unenroll_timeout)}
isDisabled={disabled}
>
<EuiFieldNumber
fullWidth
disabled={disabled || agentPolicy.is_managed === true}
value={agentPolicy.unenroll_timeout || ''}
min={0}
onChange={(e) => {
updateAgentPolicy({
unenroll_timeout: e.target.value ? Number(e.target.value) : 0,
});
}}
isInvalid={Boolean(touchedFields.unenroll_timeout && validation.unenroll_timeout)}
onBlur={() => setTouchedFields({ ...touchedFields, unenroll_timeout: true })}
/>
</EuiFormRow>
</EuiDescribedFormGroup>
<EuiSpacer size="l" />
</>
);
Expand Down

0 comments on commit 81bfdaa

Please sign in to comment.