diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_details.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_details.tsx index e14f56881d673..bc89fe572b936 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_details.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_details.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { useCallback, useEffect, useMemo, useState } from 'react'; +import React, { useCallback, useEffect, useMemo, useState, useContext } from 'react'; +import styled, { ThemeContext } from 'styled-components'; import { EuiFlexGroup, EuiFlexItem, @@ -15,7 +16,7 @@ import { EuiConfirmModal, EuiCallOut, EuiLoadingSpinner, - EuiHideFor, + EuiBottomBar, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; @@ -32,7 +33,6 @@ import { } from '../store/policy_details/selectors'; import { useKibana, toMountPoint } from '../../../../../../../../src/plugins/kibana_react/public'; import { AgentsSummary } from './agents_summary'; -import { VerticalDivider } from './vertical_divider'; import { useToasts } from '../../../../common/lib/kibana'; import { AppAction } from '../../../../common/store/actions'; import { SpyRoute } from '../../../../common/utils/route/spy_routes'; @@ -46,6 +46,25 @@ import { WrapperPage } from '../../../../common/components/wrapper_page'; import { HeaderPage } from '../../../../common/components/header_page'; import { PolicyDetailsForm } from './policy_details_form'; +const maxFormWidth = '770px'; +const PolicyDetailsHeader = styled.div` + padding: ${(props) => props.theme.eui.paddingSizes.xl} 0; + background-color: #fafbfd; + border-bottom: 1px solid #d3dae6; + .siemHeaderPage { + max-width: ${maxFormWidth}; + margin: 0 auto; + } +`; + +const PolicyDetailsFormDiv = styled.div` + background-color: ${(props) => props.theme.eui.euiHeaderBackgroundColor}; + padding: ${(props) => props.theme.eui.paddingSizes.l} 0; + max-width: ${maxFormWidth}; + flex: 1; + align-self: center; +`; + export const PolicyDetails = React.memo(() => { const dispatch = useDispatch<(action: AppAction) => void>(); const { @@ -69,6 +88,7 @@ export const PolicyDetails = React.memo(() => { const [routeState, setRouteState] = useState(); const policyName = policyItem?.name ?? ''; const hostListRouterPath = getEndpointListPath({ name: 'endpointList' }); + const theme = useContext(ThemeContext); // Handle showing update statuses useEffect(() => { @@ -153,43 +173,12 @@ export const PolicyDetails = React.memo(() => { } const headerRightContent = ( - - - - - - - - - - - - - - - - - - - - + ); return ( @@ -201,24 +190,68 @@ export const PolicyDetails = React.memo(() => { onConfirm={handleSaveConfirmation} /> )} - - - {headerRightContent} - + + + + {headerRightContent} + + - + + + + + + + + + + + + + + + + + +