diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/host_details.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/host_details.tsx index 80c4e2f379c7c..66abf993770a7 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/host_details.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/host_details.tsx @@ -19,7 +19,7 @@ import React, { memo, useMemo } from 'react'; import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; import { HostMetadata } from '../../../../../../common/endpoint/types'; -import { useHostSelector, useHostLogsUrl, useAgentDetailsIngestUrl } from '../hooks'; +import { useHostSelector, useAgentDetailsIngestUrl } from '../hooks'; import { useNavigateToAppEventHandler } from '../../../../../common/hooks/endpoint/use_navigate_to_app_event_handler'; import { policyResponseStatus, uiQueryParams } from '../../store/selectors'; import { POLICY_STATUS_TO_HEALTH_COLOR } from '../host_constants'; @@ -51,7 +51,6 @@ const LinkToExternalApp = styled.div` const openReassignFlyoutSearch = '?openReassignFlyout=true'; export const HostDetails = memo(({ details }: { details: HostMetadata }) => { - const { url: logsUrl, appId: logsAppId, appPath: logsAppPath } = useHostLogsUrl(details.host.id); const agentId = details.elastic.agent.id; const { url: agentDetailsUrl, @@ -78,12 +77,6 @@ export const HostDetails = memo(({ details }: { details: HostMetadata }) => { }), description: , }, - { - title: i18n.translate('xpack.securitySolution.endpoint.host.details.alerts', { - defaultMessage: 'Alerts', - }), - description: '0', - }, ]; }, [details]); @@ -251,22 +244,6 @@ export const HostDetails = memo(({ details }: { details: HostMetadata }) => { listItems={detailsResultsLower} data-test-subj="hostDetailsLowerList" /> - - - - - - - - ); }); diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks.ts index c072c812edbb5..68198b691da40 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks.ts @@ -21,22 +21,6 @@ export function useHostSelector(selector: (state: HostState) => TSele }); } -/** - * Returns an object that contains Kibana Logs app and URL information for a given host id - * @param hostId - */ -export const useHostLogsUrl = (hostId: string): { url: string; appId: string; appPath: string } => { - const { services } = useKibana(); - return useMemo(() => { - const appPath = `/stream?logFilter=(expression:'host.id:${hostId}',kind:kuery)`; - return { - url: `${services.application.getUrlForApp('logs')}${appPath}`, - appId: 'logs', - appPath, - }; - }, [hostId, services.application]); -}; - /** * Returns an object that contains Ingest app and URL information */ 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 68943797ea07e..073e2a07457ff 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 @@ -278,7 +278,6 @@ describe('when on the hosts page', () => { agentId = hostDetails.metadata.elastic.agent.id; coreStart.http.get.mockReturnValue(Promise.resolve(hostDetails)); - coreStart.application.getUrlForApp.mockReturnValue('/app/logs'); reactTestingLibrary.act(() => { history.push({ @@ -433,30 +432,6 @@ describe('when on the hosts page', () => { }); }); - it('should include the link to logs', async () => { - const renderResult = render(); - const linkToLogs = await renderResult.findByTestId('hostDetailsLinkToLogs'); - expect(linkToLogs).not.toBeNull(); - expect(linkToLogs.textContent).toEqual('Endpoint Logs'); - expect(linkToLogs.getAttribute('href')).toEqual( - "/app/logs/stream?logFilter=(expression:'host.id:1',kind:kuery)" - ); - }); - - describe('when link to logs is clicked', () => { - beforeEach(async () => { - const renderResult = render(); - const linkToLogs = await renderResult.findByTestId('hostDetailsLinkToLogs'); - reactTestingLibrary.act(() => { - reactTestingLibrary.fireEvent.click(linkToLogs); - }); - }); - - it('should navigate to logs without full page refresh', () => { - expect(coreStart.application.navigateToApp.mock.calls).toHaveLength(1); - }); - }); - describe('when showing host Policy Response panel', () => { let renderResult: ReturnType; beforeEach(async () => {