-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[8.11] [Fleet] Replace dataviews suggestions in KQL searchboxes with internal ones (#172190) #172437
Merged
Conversation
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
…l ones (elastic#172190) Fixes elastic#169760 Related to elastic#171425 ## Summary [Fleet] Replace dataviews suggestions in KQL searchboxes with internal ones. Now using Fleet mappings to create the suggestions fields instead of fetching them through dataView plugin. This is done for two reasons: - Solves [permission problems](elastic#169760) when the user doesn't have privileges to read Fleet indices - Allows us to search only those mappings that we want to expose, instead of all of them Only weird thing is that the [querystring component](https://github.com/elastic/kibana/blob/1f8c816901fa286b842ac652b0fce86608d01202/src/plugins/unified_search/public/query_string_input/query_string_input.tsx#L161) has a cap to show max 50 suggestions. Since for agents suggestions we are showing some more fields, so the ones starting with `u` are not visible anymore. I though I had a bug in the way I was creating the `fieldsMap` but in reality there's no way to show more suggestions than 50 (without touching the original component, which I would gladly avoid). ### Screenshots There should be no visible difference with the current suggestions. <details> <summary>Agents</summary> ![Screenshot 2023-12-01 at 10 49 55](https://github.com/elastic/kibana/assets/16084106/af73476c-3de2-40c1-93fc-c6a1c28a8a8a) ![Screenshot 2023-12-01 at 10 49 48](https://github.com/elastic/kibana/assets/16084106/5db8b30f-ff9e-4542-a590-f77285dbeef6) </details> <details> <summary>Agent policies</summary> ![Screenshot 2023-12-01 at 10 50 09](https://github.com/elastic/kibana/assets/16084106/69756149-6769-48a9-9a34-de482e4e37fc) </details> <details> <summary>Enrollment keys</summary> ![Screenshot 2023-12-01 at 10 50 18](https://github.com/elastic/kibana/assets/16084106/e542550a-9721-4f5c-a05b-32829dd8fcee) </details> ### Testing 1. With a normal user, navigate to the "agents", "agent policies" and "enrollment keys" tabs and click on the searchboxes. The suggestions should be visible as normal 2. Create a user with role Fleet "all", Integrations "all". Log in and check the above searchboxes, the suggestions should be visible as normal. Previously they weren't. ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) --------- Co-authored-by: Kibana Machine <[email protected]> (cherry picked from commit ad66313) # Conflicts: # x-pack/plugins/fleet/common/constants/mappings.ts
botelastic
bot
added
the
Team:Fleet
Team label for Observability Data Collection Fleet team
label
Dec 4, 2023
2 tasks
Pinging @elastic/fleet (Team:Fleet) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
juliaElastic
approved these changes
Dec 4, 2023
@elasticmachine merge upstream |
💔 Build FailedFailed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
main
to8.11
:Questions ?
Please refer to the Backport tool documentation