mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Fleet] Remove adopted showDevToolRequest feature flag (#204586)
This commit is contained in:
parent
cc34e97de4
commit
02b65bd457
4 changed files with 36 additions and 51 deletions
|
@ -10,7 +10,6 @@ export type ExperimentalFeatures = typeof allowedExperimentalValues;
|
|||
const _allowedExperimentalValues = {
|
||||
createPackagePolicyMultiPageLayout: true,
|
||||
packageVerification: true,
|
||||
showDevtoolsRequest: true,
|
||||
diagnosticFileUploadEnabled: true,
|
||||
displayAgentMetrics: true,
|
||||
showIntegrationsSubcategories: true,
|
||||
|
|
|
@ -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,
|
||||
|
@ -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) {
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
@ -155,7 +154,6 @@ export const SettingsView = memo<{ agentPolicy: AgentPolicy }>(
|
|||
setIsLoading(false);
|
||||
};
|
||||
|
||||
const { showDevtoolsRequest } = ExperimentalFeaturesService.get();
|
||||
const devtoolRequest = useMemo(
|
||||
() =>
|
||||
generateUpdateAgentPolicyDevToolsRequest(
|
||||
|
@ -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}
|
||||
|
|
|
@ -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)`
|
||||
|
@ -109,7 +108,6 @@ export const CreateAgentPolicyFlyout: React.FunctionComponent<Props> = ({
|
|||
/>
|
||||
</EuiFlyoutBody>
|
||||
);
|
||||
const { showDevtoolsRequest } = ExperimentalFeaturesService.get();
|
||||
const agentPolicyContent = useMemo(
|
||||
() => generateCreateAgentPolicyDevToolsRequest(agentPolicy, withSysMonitoring),
|
||||
[agentPolicy, withSysMonitoring]
|
||||
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue