From bf74ad5ea1b338dc94a1584183c6c0f108ad88d1 Mon Sep 17 00:00:00 2001 From: kevinlog Date: Tue, 8 Jun 2021 13:39:44 -0400 Subject: [PATCH 1/2] remove feature flag --- .../plugins/security_solution/common/experimental_features.ts | 1 - .../security_solution/public/common/mock/global_state.ts | 1 - .../timelines/components/side_panel/event_details/index.tsx | 4 ---- .../security_solution/factory/hosts/details/index.test.tsx | 1 - 4 files changed, 7 deletions(-) diff --git a/x-pack/plugins/security_solution/common/experimental_features.ts b/x-pack/plugins/security_solution/common/experimental_features.ts index 02006fdb29d475..b20b1501eecc57 100644 --- a/x-pack/plugins/security_solution/common/experimental_features.ts +++ b/x-pack/plugins/security_solution/common/experimental_features.ts @@ -14,7 +14,6 @@ export type ExperimentalFeatures = typeof allowedExperimentalValues; const allowedExperimentalValues = Object.freeze({ trustedAppsByPolicyEnabled: false, metricsEntitiesEnabled: false, - hostIsolationEnabled: false, ruleRegistryEnabled: false, }); diff --git a/x-pack/plugins/security_solution/public/common/mock/global_state.ts b/x-pack/plugins/security_solution/public/common/mock/global_state.ts index 71e33c603b65b2..557c04e4e8a475 100644 --- a/x-pack/plugins/security_solution/public/common/mock/global_state.ts +++ b/x-pack/plugins/security_solution/public/common/mock/global_state.ts @@ -42,7 +42,6 @@ export const mockGlobalState: State = { enableExperimental: { trustedAppsByPolicyEnabled: false, metricsEntitiesEnabled: false, - hostIsolationEnabled: false, ruleRegistryEnabled: false, }, }, diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.tsx index 341397da09e1d9..e4f1fd13b657fc 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.tsx @@ -31,7 +31,6 @@ import { UNISOLATE_HOST, } from '../../../../detections/components/host_isolation/translations'; import { ALERT_DETAILS } from './translations'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; import { useIsolationPrivileges } from '../../../../common/hooks/endpoint/use_isolate_privileges'; const StyledEuiFlyoutBody = styled(EuiFlyoutBody)` @@ -74,8 +73,6 @@ const EventDetailsPanelComponent: React.FC = ({ skip: !expandedEvent.eventId, }); - const isHostIsolationEnabled = useIsExperimentalFeatureEnabled('hostIsolationEnabled'); - const [isHostIsolationPanelOpen, setIsHostIsolationPanel] = useState(false); const [isolateAction, setIsolateAction] = useState('isolateHost'); @@ -157,7 +154,6 @@ const EventDetailsPanelComponent: React.FC = ({ )} {isIsolationAllowed && - isHostIsolationEnabled && isEndpointAlert && isHostIsolationPanelOpen === false && ( diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/index.test.tsx b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/index.test.tsx index f489fd0c16455b..b50623bf9090aa 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/index.test.tsx +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/index.test.tsx @@ -32,7 +32,6 @@ const mockDeps = { experimentalFeatures: { trustedAppsByPolicyEnabled: false, metricsEntitiesEnabled: false, - hostIsolationEnabled: false, ruleRegistryEnabled: false, }, service: {} as EndpointAppContextService, From 89206975aa4cc16bd9857372eb9f92dd11cbde7b Mon Sep 17 00:00:00 2001 From: kevinlog Date: Tue, 8 Jun 2021 13:52:48 -0400 Subject: [PATCH 2/2] fix lint --- .../side_panel/event_details/index.tsx | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.tsx index e4f1fd13b657fc..76341055f28eff 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.tsx @@ -153,19 +153,17 @@ const EventDetailsPanelComponent: React.FC = ({ /> )} - {isIsolationAllowed && - isEndpointAlert && - isHostIsolationPanelOpen === false && ( - - - - - - - - - - )} + {isIsolationAllowed && isEndpointAlert && isHostIsolationPanelOpen === false && ( + + + + + + + + + + )} ) : ( <>