diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/endpoint_details.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/endpoint_details.tsx index 3f862285110d..d0d745df8a55 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/endpoint_details.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/endpoint_details.tsx @@ -167,7 +167,7 @@ export const EndpointDetails = memo( }), description: ( - + @@ -278,7 +278,6 @@ export const EndpointDetails = memo( onClick={handleReassignEndpointsClick} data-test-subj="endpointDetailsLinkToIngest" > - { EndpointDetailsFlyout.displayName = 'EndpointDetailsFlyout'; +const PolicyResponseFlyout = styled.div` + .endpointDetailsPolicyResponseFlyoutBody { + .euiFlyoutBody__overflowContent { + padding-top: 0; + } + } +`; + const PolicyResponseFlyoutPanel = memo<{ hostMeta: HostMetadata; }>(({ hostMeta }) => { @@ -171,12 +180,15 @@ const PolicyResponseFlyoutPanel = memo<{ }, [backToDetailsClickHandler, detailsUri]); return ( - <> + - +

)} - + ); }); diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/policy_response.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/policy_response.tsx index 5c883e9affe1..b6c6be673da6 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/policy_response.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/policy_response.tsx @@ -29,7 +29,7 @@ import { */ const PolicyResponseConfigAccordion = styled(EuiAccordion)` .euiAccordion__triggerWrapper { - padding: ${(props) => props.theme.eui.paddingSizes.s}; + padding: ${(props) => props.theme.eui.paddingSizes.xs}; } &.euiAccordion-isOpen { diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx index 99c313220e06..8599e1d61d35 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx @@ -645,49 +645,29 @@ describe('when on the list page', () => { it('should display Success overall policy status', async () => { const renderResult = await renderAndWaitForData(); - const policyStatusLink = await renderResult.findByTestId('policyStatusValue'); - expect(policyStatusLink.textContent).toEqual('Success'); - - const policyStatusHealth = await renderResult.findByTestId('policyStatusHealth'); - expect( - policyStatusHealth.querySelector('[data-euiicon-type][color="success"]') - ).not.toBeNull(); + const policyStatusBadge = await renderResult.findByTestId('policyStatusValue'); + expect(policyStatusBadge.textContent).toEqual('Success'); }); it('should display Warning overall policy status', async () => { mockEndpointListApi(createPolicyResponse(HostPolicyResponseActionStatus.warning)); const renderResult = await renderAndWaitForData(); - const policyStatusLink = await renderResult.findByTestId('policyStatusValue'); - expect(policyStatusLink.textContent).toEqual('Warning'); - - const policyStatusHealth = await renderResult.findByTestId('policyStatusHealth'); - expect( - policyStatusHealth.querySelector('[data-euiicon-type][color="warning"]') - ).not.toBeNull(); + const policyStatusBadge = await renderResult.findByTestId('policyStatusValue'); + expect(policyStatusBadge.textContent).toEqual('Warning'); }); it('should display Failed overall policy status', async () => { mockEndpointListApi(createPolicyResponse(HostPolicyResponseActionStatus.failure)); const renderResult = await renderAndWaitForData(); - const policyStatusLink = await renderResult.findByTestId('policyStatusValue'); - expect(policyStatusLink.textContent).toEqual('Failed'); - - const policyStatusHealth = await renderResult.findByTestId('policyStatusHealth'); - expect( - policyStatusHealth.querySelector('[data-euiicon-type][color="danger"]') - ).not.toBeNull(); + const policyStatusBadge = await renderResult.findByTestId('policyStatusValue'); + expect(policyStatusBadge.textContent).toEqual('Failed'); }); it('should display Unknown overall policy status', async () => { mockEndpointListApi(createPolicyResponse('' as HostPolicyResponseActionStatus)); const renderResult = await renderAndWaitForData(); - const policyStatusLink = await renderResult.findByTestId('policyStatusValue'); - expect(policyStatusLink.textContent).toEqual('Unknown'); - - const policyStatusHealth = await renderResult.findByTestId('policyStatusHealth'); - expect( - policyStatusHealth.querySelector('[data-euiicon-type][color="subdued"]') - ).not.toBeNull(); + const policyStatusBadge = await renderResult.findByTestId('policyStatusValue'); + expect(policyStatusBadge.textContent).toEqual('Unknown'); }); it('should include the link to reassignment in Ingest', async () => {