Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fleet] Add beta badge to host name format agent policy setting #150855

Merged
merged 2 commits into from
Feb 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,15 @@ import {
EuiFieldText,
EuiSuperSelect,
EuiToolTip,
EuiBadge,
EuiRadioGroup,
EuiText,
EuiFlexGroup,
EuiFlexItem,
EuiBetaBadge,
} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
import { i18n } from '@kbn/i18n';

import styled from 'styled-components';

import { dataTypes } from '../../../../../../../common/constants';
import type { NewAgentPolicy, AgentPolicy } from '../../../../types';
import { useStartServices } from '../../../../hooks';
Expand All @@ -48,10 +46,6 @@ import {
useFleetServerHostsOptions,
} from './hooks';

const LeftPaddedEUIBadge = styled(EuiBadge)`
margin-left: 5px;
`;

interface Props {
agentPolicy: Partial<NewAgentPolicy | AgentPolicy>;
updateAgentPolicy: (u: Partial<NewAgentPolicy | AgentPolicy>) => void;
Expand Down Expand Up @@ -476,18 +470,20 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent<Props> =
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',
})}
>
<LeftPaddedEUIBadge color="hollow">
<FormattedMessage
id="xpack.fleet.agentPolicyForm.unenrollmentTimeoutDeprecatedLabel"
defaultMessage="Deprecated"
/>
</LeftPaddedEUIBadge>
<EuiBetaBadge
label={i18n.translate(
'xpack.fleet.agentPolicyForm.unenrollmentTimeoutDeprecatedLabel',
{ defaultMessage: 'Deprecated' }
)}
size="s"
/>
</EuiToolTip>
</h4>
}
Expand Down Expand Up @@ -530,6 +526,8 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent<Props> =
id="xpack.fleet.agentPolicyForm.hostnameFormatLabel"
defaultMessage="Host name format"
/>
&nbsp;
<EuiBetaBadge label="beta" size="s" color="accent" />
</h4>
}
description={
Expand Down