forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Inventory] Change discover link to use entity definition (elastic#20…
…1433) Closes elastic#200595 ## Summary This PR changes the link to discover: - Pass a different data view (using the entity definition indices) - from Open in Discover to Explore in Discover ## Testing - To have the test data I used metricbeat (for the host entity) and synthtrace (for the other entities type) - Open the inventory page and expand an entity type - Click on the `...` in the actions column - Click on `Explore in Discover` The results should be filtered by the selected entity and the dataview should include the indices from the entity definition: https://github.com/user-attachments/assets/29bb46b4-719e-4874-b1aa-056ac28d234a https://github.com/user-attachments/assets/36c08b8b-f507-445e-a7b5-8eb1176beb90 With service type filter (should not persist) https://github.com/user-attachments/assets/ae6ef28a-e55a-4a32-9128-802ebea25607 --------- Co-authored-by: kibanamachine <[email protected]>
- Loading branch information
1 parent
f054097
commit afc5e51
Showing
15 changed files
with
206 additions
and
136 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
packages/kbn-server-route-repository-utils/src/format_request.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the "Elastic License | ||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
import { formatRequest } from './format_request'; | ||
|
||
describe('formatRequest', () => { | ||
it('should return the correct path if the optional or required param is provided', () => { | ||
const pathParams = { param: 'testParam' }; | ||
const resultOptionalEnd = formatRequest('GET /api/endpoint/{param?}', pathParams); | ||
expect(resultOptionalEnd.pathname).toBe('/api/endpoint/testParam'); | ||
const resultRequiredEnd = formatRequest('GET /api/endpoint/{param}', pathParams); | ||
expect(resultRequiredEnd.pathname).toBe('/api/endpoint/testParam'); | ||
}); | ||
it('should return the correct path if the only an optional param is provided', () => { | ||
const resultOptEnd = formatRequest('GET /api/endpoint/{id?}', { id: 123 }); | ||
expect(resultOptEnd.pathname).toBe('/api/endpoint/123'); | ||
}); | ||
it('should return the correct path if the optional param is not provided', () => { | ||
const pathParams = {}; | ||
const resultEnd = formatRequest('GET /api/endpoint/{pathParamReq?}', pathParams); | ||
expect(resultEnd.pathname).toBe('/api/endpoint'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.