From 1bd20907d937c5229528420fe6a2088bf0d73cd3 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 4 Dec 2024 01:25:26 +1100 Subject: [PATCH] [8.16] [EDR Workflows] Fix wrong endpoint link (#202434) (#202701) # Backport This will backport the following commits from `main` to `8.16`: - [[EDR Workflows] Fix wrong endpoint link (#202434)](https://github.com/elastic/kibana/pull/202434) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Tomasz Ciecierski --- .../endpoint_hosts/view/hooks/use_endpoint_action_items.tsx | 2 +- .../public/management/pages/endpoint_hosts/view/index.test.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/use_endpoint_action_items.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/use_endpoint_action_items.tsx index bb6102e8051c4..579561573488c 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/use_endpoint_action_items.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/use_endpoint_action_items.tsx @@ -56,7 +56,7 @@ export const useEndpointActionItems = ( const endpointMetadata = endpointInfo.metadata; const isIsolated = isEndpointHostIsolated(endpointMetadata); const endpointId = endpointMetadata.agent.id; - const endpointHostName = endpointMetadata.host.hostname; + const endpointHostName = endpointMetadata.host.hostname.toLowerCase(); const fleetAgentId = endpointMetadata.elastic.agent.id; const { show, selected_endpoint: _selectedEndpoint, ...currentUrlParams } = allCurrentUrlParams; const endpointActionsPath = getEndpointDetailsPath({ 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 d0b05404dc16d..57b0dde41177d 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 @@ -1306,7 +1306,7 @@ describe('when on the endpoint list page', () => { it('navigates to the Security Solution Host Details page', async () => { const hostLink = await renderResult.findByTestId('hostLink'); expect(hostLink.getAttribute('href')).toEqual( - `${APP_PATH}/hosts/${hostInfo[0].metadata.host.hostname}` + `${APP_PATH}/hosts/${hostInfo[0].metadata.host.hostname.toLowerCase()}` ); }); it('navigates to the correct Ingest Agent Policy page', async () => {