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

[Security Solution] Fixes the Customize Event Renderers modal by removing the EuiOverlayMask #93150

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
EuiButtonIcon,
EuiText,
EuiToolTip,
EuiOverlayMask,
EuiModal,
EuiModalHeader,
EuiModalHeaderTitle,
Expand All @@ -33,12 +32,12 @@ import { RowRenderersBrowser } from './row_renderers_browser';
import * as i18n from './translations';

const StyledEuiModal = styled(EuiModal)`
margin: 0 auto;
${({ theme }) => `margin-top: ${theme.eui.euiSizeXXL};`}
max-width: 95vw;
min-height: 95vh;
min-height: 90vh;

> .euiModal__flex {
max-height: 95vh;
max-height: 90vh;
}
`;

Expand All @@ -65,15 +64,6 @@ const StyledEuiModalBody = styled(EuiModalBody)`
}
`;

const StyledEuiOverlayMask = styled(EuiOverlayMask)`
z-index: 8001;
padding-bottom: 0;

> div {
width: 100%;
}
`;

interface StatefulRowRenderersBrowserProps {
timelineId: string;
}
Expand Down Expand Up @@ -125,54 +115,47 @@ const StatefulRowRenderersBrowserComponent: React.FC<StatefulRowRenderersBrowser
</EuiToolTip>

{show && (
<StyledEuiOverlayMask>
<StyledEuiModal onClose={hideFieldBrowser}>
<EuiModalHeader>
<EuiFlexGroup
alignItems="center"
justifyContent="spaceBetween"
direction="row"
gutterSize="none"
>
<EuiFlexItem grow={false}>
<EuiModalHeaderTitle>{i18n.CUSTOMIZE_EVENT_RENDERERS_TITLE}</EuiModalHeaderTitle>
<EuiText size="s">{i18n.CUSTOMIZE_EVENT_RENDERERS_DESCRIPTION}</EuiText>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiFlexGroup>
<EuiFlexItem grow={false}>
<EuiButtonEmpty
size="s"
data-test-subj="disable-all"
onClick={handleDisableAll}
>
{i18n.DISABLE_ALL}
</EuiButtonEmpty>
</EuiFlexItem>

<EuiFlexItem grow={false}>
<EuiButton
fill
size="s"
data-test-subj="enable-all"
onClick={handleEnableAll}
>
{i18n.ENABLE_ALL}
</EuiButton>
</EuiFlexItem>
</EuiFlexGroup>
</EuiFlexItem>
</EuiFlexGroup>
</EuiModalHeader>

<StyledEuiModalBody>
<RowRenderersBrowser
excludedRowRendererIds={excludedRowRendererIds}
setExcludedRowRendererIds={setExcludedRowRendererIds}
/>
</StyledEuiModalBody>
</StyledEuiModal>
</StyledEuiOverlayMask>
<StyledEuiModal onClose={hideFieldBrowser}>
<EuiModalHeader>
<EuiFlexGroup
alignItems="center"
justifyContent="spaceBetween"
direction="row"
gutterSize="none"
>
<EuiFlexItem grow={false}>
<EuiModalHeaderTitle>{i18n.CUSTOMIZE_EVENT_RENDERERS_TITLE}</EuiModalHeaderTitle>
<EuiText size="s">{i18n.CUSTOMIZE_EVENT_RENDERERS_DESCRIPTION}</EuiText>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiFlexGroup>
<EuiFlexItem grow={false}>
<EuiButtonEmpty
size="s"
data-test-subj="disable-all"
onClick={handleDisableAll}
>
{i18n.DISABLE_ALL}
</EuiButtonEmpty>
</EuiFlexItem>

<EuiFlexItem grow={false}>
<EuiButton fill size="s" data-test-subj="enable-all" onClick={handleEnableAll}>
{i18n.ENABLE_ALL}
</EuiButton>
</EuiFlexItem>
</EuiFlexGroup>
</EuiFlexItem>
</EuiFlexGroup>
</EuiModalHeader>

<StyledEuiModalBody>
<RowRenderersBrowser
excludedRowRendererIds={excludedRowRendererIds}
setExcludedRowRendererIds={setExcludedRowRendererIds}
/>
</StyledEuiModalBody>
</StyledEuiModal>
)}
</>
);
Expand Down