Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion x-pack/plugins/fleet/common/experimental_features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const allowedExperimentalValues = Object.freeze({
experimentalDataStreamSettings: false,
displayAgentMetrics: true,
showIntegrationsSubcategories: true,
agentFqdnMode: false,
agentFqdnMode: true,
showExperimentalShipperOptions: false,
fleetServerStandalone: false,
agentTamperProtectionEnabled: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import { AgentPolicyPackageBadge } from '../../../../components';
import { AgentPolicyDeleteProvider } from '../agent_policy_delete_provider';
import type { ValidationResults } from '../agent_policy_validation';

import { ExperimentalFeaturesService, policyHasFleetServer } from '../../../../services';
import { policyHasFleetServer } from '../../../../services';

import {
useOutputOptions,
Expand All @@ -66,7 +66,6 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent<Props> =
isEditing = false,
onDelete = () => {},
}) => {
const { agentFqdnMode: agentFqdnModeEnabled } = ExperimentalFeaturesService.get();
const { docLinks } = useStartServices();
const config = useConfig();
const maxAgentPoliciesWithInactivityTimeout =
Expand Down Expand Up @@ -558,93 +557,91 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent<Props> =
/>
</EuiFormRow>
</EuiDescribedFormGroup>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

best viewed with "hide whitespace" I've just removed the conditional render of the component here

{agentFqdnModeEnabled && (
<EuiDescribedFormGroup
title={
<h4>
<FormattedMessage
id="xpack.fleet.agentPolicyForm.hostnameFormatLabel"
defaultMessage="Host name format"
/>
&nbsp;
<EuiBetaBadge label="beta" size="s" color="accent" />
</h4>
}
description={
<EuiDescribedFormGroup
title={
<h4>
<FormattedMessage
id="xpack.fleet.agentPolicyForm.hostnameFormatLabelDescription"
defaultMessage="Select how you would like agent domain names to be displayed."
id="xpack.fleet.agentPolicyForm.hostnameFormatLabel"
defaultMessage="Host name format"
/>
}
>
<EuiFormRow fullWidth>
<EuiRadioGroup
options={[
{
id: 'hostname',
label: (
<>
<EuiFlexGroup gutterSize="xs" direction="column">
<EuiFlexItem grow={false}>
<EuiText size="s">
<b>
<FormattedMessage
id="xpack.fleet.agentPolicyForm.hostnameFormatOptionHostname"
defaultMessage="Hostname"
/>
</b>
</EuiText>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiText size="s" color="subdued">
<FormattedMessage
id="xpack.fleet.agentPolicyForm.hostnameFormatOptionHostnameExample"
defaultMessage="ex: My-Laptop"
/>
</EuiText>
</EuiFlexItem>
</EuiFlexGroup>
<EuiSpacer size="s" />
</>
),
},
{
id: 'fqdn',
label: (
&nbsp;
<EuiBetaBadge label="beta" size="s" color="accent" />
</h4>
}
description={
<FormattedMessage
id="xpack.fleet.agentPolicyForm.hostnameFormatLabelDescription"
defaultMessage="Select how you would like agent domain names to be displayed."
/>
}
>
<EuiFormRow fullWidth>
<EuiRadioGroup
options={[
{
id: 'hostname',
label: (
<>
<EuiFlexGroup gutterSize="xs" direction="column">
<EuiFlexItem grow={false}>
<EuiText size="s">
<b>
<FormattedMessage
id="xpack.fleet.agentPolicyForm.hostnameFormatOptionFqdn"
defaultMessage="Fully Qualified Domain Name (FQDN)"
id="xpack.fleet.agentPolicyForm.hostnameFormatOptionHostname"
defaultMessage="Hostname"
/>
</b>
</EuiText>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiText size="s" color="subdued">
<FormattedMessage
id="xpack.fleet.agentPolicyForm.hostnameFormatOptionFqdnExample"
defaultMessage="ex: My-Laptop.admin.acme.co"
id="xpack.fleet.agentPolicyForm.hostnameFormatOptionHostnameExample"
defaultMessage="ex: My-Laptop"
/>
</EuiText>
</EuiFlexItem>
</EuiFlexGroup>
),
},
]}
idSelected={agentPolicy.agent_features?.length ? 'fqdn' : 'hostname'}
onChange={(id: string) => {
updateAgentPolicy({
agent_features: id === 'hostname' ? [] : [{ name: 'fqdn', enabled: true }],
});
}}
name="radio group"
/>
</EuiFormRow>
</EuiDescribedFormGroup>
)}
<EuiSpacer size="s" />
</>
),
},
{
id: 'fqdn',
label: (
<EuiFlexGroup gutterSize="xs" direction="column">
<EuiFlexItem grow={false}>
<EuiText size="s">
<b>
<FormattedMessage
id="xpack.fleet.agentPolicyForm.hostnameFormatOptionFqdn"
defaultMessage="Fully Qualified Domain Name (FQDN)"
/>
</b>
</EuiText>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiText size="s" color="subdued">
<FormattedMessage
id="xpack.fleet.agentPolicyForm.hostnameFormatOptionFqdnExample"
defaultMessage="ex: My-Laptop.admin.acme.co"
/>
</EuiText>
</EuiFlexItem>
</EuiFlexGroup>
),
},
]}
idSelected={agentPolicy.agent_features?.length ? 'fqdn' : 'hostname'}
onChange={(id: string) => {
updateAgentPolicy({
agent_features: id === 'hostname' ? [] : [{ name: 'fqdn', enabled: true }],
});
}}
name="radio group"
/>
</EuiFormRow>
</EuiDescribedFormGroup>
{isEditing && 'id' in agentPolicy && !agentPolicy.is_managed ? (
<EuiDescribedFormGroup
title={
Expand Down