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] Remove adopted showDevToolRequest feature flag #204586

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
1 change: 0 additions & 1 deletion x-pack/plugins/fleet/common/experimental_features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export type ExperimentalFeatures = typeof allowedExperimentalValues;
const _allowedExperimentalValues = {
createPackagePolicyMultiPageLayout: true,
packageVerification: true,
showDevtoolsRequest: true,
diagnosticFileUploadEnabled: true,
displayAgentMetrics: true,
showIntegrationsSubcategories: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { i18n } from '@kbn/i18n';
import { omit } from 'lodash';
import { set } from '@kbn/safer-lodash-set';

import { ExperimentalFeaturesService } from '../../../../../services';
import {
generateCreatePackagePolicyDevToolsRequest,
generateCreateAgentPolicyDevToolsRequest,
Expand Down Expand Up @@ -39,12 +38,7 @@ export function useDevToolsRequest({
packageInfo?: PackageInfo;
packagePolicyId?: string;
}) {
const { showDevtoolsRequest: isShowDevtoolRequestExperimentEnabled } =
ExperimentalFeaturesService.get();

const showDevtoolsRequest =
!HIDDEN_API_REFERENCE_PACKAGES.includes(packageInfo?.name ?? '') &&
isShowDevtoolRequestExperimentEnabled;
const showDevtoolsRequest = !HIDDEN_API_REFERENCE_PACKAGES.includes(packageInfo?.name ?? '');

const [devtoolRequest, devtoolRequestDescription] = useMemo(() => {
if (selectedPolicyTab === SelectedPolicyTab.NEW) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import {
ConfirmDeployAgentPolicyModal,
} from '../../../components';
import { DevtoolsRequestFlyoutButton } from '../../../../../components';
import { ExperimentalFeaturesService } from '../../../../../services';
import { generateUpdateAgentPolicyDevToolsRequest } from '../../../services';
import { UNKNOWN_SPACE } from '../../../../../../../../common/constants';

Expand Down Expand Up @@ -155,7 +154,6 @@ export const SettingsView = memo<{ agentPolicy: AgentPolicy }>(
setIsLoading(false);
};

const { showDevtoolsRequest } = ExperimentalFeaturesService.get();
const devtoolRequest = useMemo(
() =>
generateUpdateAgentPolicyDevToolsRequest(
Expand Down Expand Up @@ -235,28 +233,26 @@ export const SettingsView = memo<{ agentPolicy: AgentPolicy }>(
/>
</EuiButtonEmpty>
</EuiFlexItem>
{showDevtoolsRequest ? (
<EuiFlexItem grow={false}>
<DevtoolsRequestFlyoutButton
isDisabled={
isLoading ||
Object.keys(validation).length > 0 ||
hasAdvancedSettingsErrors ||
hasInvalidSpaceError
<EuiFlexItem grow={false}>
<DevtoolsRequestFlyoutButton
isDisabled={
isLoading ||
Object.keys(validation).length > 0 ||
hasAdvancedSettingsErrors ||
hasInvalidSpaceError
}
btnProps={{
color: 'text',
}}
description={i18n.translate(
'xpack.fleet.editAgentPolicy.devtoolsRequestDescription',
{
defaultMessage: 'This Kibana request updates an agent policy.',
}
btnProps={{
color: 'text',
}}
description={i18n.translate(
'xpack.fleet.editAgentPolicy.devtoolsRequestDescription',
{
defaultMessage: 'This Kibana request updates an agent policy.',
}
)}
request={devtoolRequest}
/>
</EuiFlexItem>
) : null}
)}
request={devtoolRequest}
/>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButton
onClick={onSubmit}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import { useAuthz, useStartServices, sendCreateAgentPolicy } from '../../../../h
import { AgentPolicyForm, agentPolicyFormValidation } from '../../components';
import { DevtoolsRequestFlyoutButton } from '../../../../components';
import { generateCreateAgentPolicyDevToolsRequest } from '../../services';
import { ExperimentalFeaturesService } from '../../../../services';
import { generateNewAgentPolicyWithDefaults } from '../../../../../../../common/services/generate_new_agent_policy';

const FlyoutWithHigherZIndex = styled(EuiFlyout)`
Expand Down Expand Up @@ -109,7 +108,6 @@ export const CreateAgentPolicyFlyout: React.FunctionComponent<Props> = ({
/>
</EuiFlyoutBody>
);
const { showDevtoolsRequest } = ExperimentalFeaturesService.get();
const agentPolicyContent = useMemo(
() => generateCreateAgentPolicyDevToolsRequest(agentPolicy, withSysMonitoring),
[agentPolicy, withSysMonitoring]
Expand All @@ -128,25 +126,23 @@ export const CreateAgentPolicyFlyout: React.FunctionComponent<Props> = ({
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiFlexGroup gutterSize="none">
{showDevtoolsRequest ? (
<EuiFlexItem grow={false}>
<DevtoolsRequestFlyoutButton
isDisabled={
isLoading ||
Object.keys(validation).length > 0 ||
hasAdvancedSettingsErrors ||
hasInvalidSpaceError
<EuiFlexItem grow={false}>
<DevtoolsRequestFlyoutButton
isDisabled={
isLoading ||
Object.keys(validation).length > 0 ||
hasAdvancedSettingsErrors ||
hasInvalidSpaceError
}
description={i18n.translate(
'xpack.fleet.createAgentPolicy.devtoolsRequestDescription',
{
defaultMessage: 'This Kibana request creates a new agent policy.',
}
description={i18n.translate(
'xpack.fleet.createAgentPolicy.devtoolsRequestDescription',
{
defaultMessage: 'This Kibana request creates a new agent policy.',
}
)}
request={agentPolicyContent}
/>
</EuiFlexItem>
) : null}
)}
request={agentPolicyContent}
/>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButton
fill
Expand Down
Loading