[Security Solution] Remove Host Isolation feature flag (#101655)

This commit is contained in:
Kevin Logan 2021-06-08 17:17:19 -04:00 committed by GitHub
parent 3c68a0c810
commit 8699803255
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 20 deletions

View file

@ -14,7 +14,6 @@ export type ExperimentalFeatures = typeof allowedExperimentalValues;
const allowedExperimentalValues = Object.freeze({ const allowedExperimentalValues = Object.freeze({
trustedAppsByPolicyEnabled: false, trustedAppsByPolicyEnabled: false,
metricsEntitiesEnabled: false, metricsEntitiesEnabled: false,
hostIsolationEnabled: false,
ruleRegistryEnabled: false, ruleRegistryEnabled: false,
}); });

View file

@ -42,7 +42,6 @@ export const mockGlobalState: State = {
enableExperimental: { enableExperimental: {
trustedAppsByPolicyEnabled: false, trustedAppsByPolicyEnabled: false,
metricsEntitiesEnabled: false, metricsEntitiesEnabled: false,
hostIsolationEnabled: false,
ruleRegistryEnabled: false, ruleRegistryEnabled: false,
}, },
}, },

View file

@ -31,7 +31,6 @@ import {
UNISOLATE_HOST, UNISOLATE_HOST,
} from '../../../../detections/components/host_isolation/translations'; } from '../../../../detections/components/host_isolation/translations';
import { ALERT_DETAILS } from './translations'; import { ALERT_DETAILS } from './translations';
import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features';
import { useIsolationPrivileges } from '../../../../common/hooks/endpoint/use_isolate_privileges'; import { useIsolationPrivileges } from '../../../../common/hooks/endpoint/use_isolate_privileges';
const StyledEuiFlyoutBody = styled(EuiFlyoutBody)` const StyledEuiFlyoutBody = styled(EuiFlyoutBody)`
@ -74,8 +73,6 @@ const EventDetailsPanelComponent: React.FC<EventDetailsPanelProps> = ({
skip: !expandedEvent.eventId, skip: !expandedEvent.eventId,
}); });
const isHostIsolationEnabled = useIsExperimentalFeatureEnabled('hostIsolationEnabled');
const [isHostIsolationPanelOpen, setIsHostIsolationPanel] = useState(false); const [isHostIsolationPanelOpen, setIsHostIsolationPanel] = useState(false);
const [isolateAction, setIsolateAction] = useState('isolateHost'); const [isolateAction, setIsolateAction] = useState('isolateHost');
@ -156,20 +153,17 @@ const EventDetailsPanelComponent: React.FC<EventDetailsPanelProps> = ({
/> />
)} )}
</StyledEuiFlyoutBody> </StyledEuiFlyoutBody>
{isIsolationAllowed && {isIsolationAllowed && isEndpointAlert && isHostIsolationPanelOpen === false && (
isHostIsolationEnabled && <EuiFlyoutFooter>
isEndpointAlert && <EuiFlexGroup justifyContent="flexEnd">
isHostIsolationPanelOpen === false && ( <EuiFlexItem grow={false}>
<EuiFlyoutFooter> <TakeActionDropdown onChange={showHostIsolationPanel} agentId={agentId} />
<EuiFlexGroup justifyContent="flexEnd"> </EuiFlexItem>
<EuiFlexItem grow={false}> </EuiFlexGroup>
<TakeActionDropdown onChange={showHostIsolationPanel} agentId={agentId} /> <EuiSpacer size="l" />
</EuiFlexItem> <EuiSpacer size="l" />
</EuiFlexGroup> </EuiFlyoutFooter>
<EuiSpacer size="l" /> )}
<EuiSpacer size="l" />
</EuiFlyoutFooter>
)}
</> </>
) : ( ) : (
<> <>

View file

@ -32,7 +32,6 @@ const mockDeps = {
experimentalFeatures: { experimentalFeatures: {
trustedAppsByPolicyEnabled: false, trustedAppsByPolicyEnabled: false,
metricsEntitiesEnabled: false, metricsEntitiesEnabled: false,
hostIsolationEnabled: false,
ruleRegistryEnabled: false, ruleRegistryEnabled: false,
}, },
service: {} as EndpointAppContextService, service: {} as EndpointAppContextService,