-
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
[Log Explorer] Add filter controls customization point #158561
Comments
Pinging @elastic/kibana-presentation (Team:Presentation) |
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
@elastic/kibana-data-discovery tagging this with both of our teams as we may need to work together to get the Controls working nicely with Discover. |
@ThomThomson currently the idea was for us to add a customization point to Discover to plug our custom filter controls into. That would get your team off the critical path for now, but leaves open the option of moving it from a customization point into a native search bar or Discover feature in the future. Does that make sense for you? |
Sounds good @weltenwort! We'll keep our tag on this to keep an eye on it for the time being. |
PoC of this work for reference: #159318 |
Options for persisting the controlsThe POC created by @davismcphee already goes a long way to show what the extension point will probably look like. While it's out of scope for this issue, we should try to think ahead about how we will allow integrations to ship dataset-specific controls. This might influence how we design the API that injects filters into the search source. Option A: input controls in unified search and search sourcesIf the unified search bar natively supported control groups the controls could be persisted in the serialized search source:
Option B: persist control groups in saved searchThe control group definition and filter values could be persisted in the saved search and passed to the control group component when the saved search is loaded.
Option C: persist control group embeddable state in saved searchSince a control group can be consumed as an embeddable, we could also store the embeddable state in the saved search.
Option D: read control group state from integrationSince the dataset selector is supposed to be the bridge between
|
|
closes #158561 ## 📝 Summary This PR adds a new customization point to allow for prepending custom filter controls to the search bar. At the moment we are only showing a default namespace filter, once this is ready we will then check how to provide curated filters per integration. ## ✅ Testing 1. Make sure to have some documents to different data sets with different namespace, you can use [this document](https://www.elastic.co/guide/en/elasticsearch/reference/current/set-up-a-data-stream.html) as an example 2. Navigate to Discover with the log-explorer profile, `/p/log-explorer` 3. Validate that the new filter control is there 4. Filter using this new control and make sure documents are filtered out ## 🎥 Demo https://github.com/elastic/kibana/assets/11225826/6828f62f-dd09-42bd-930c-dd7eaf94958b --------- Co-authored-by: kibanamachine <[email protected]>
📓 Summary
We want to offer curated filters by well-known fields using the unified input control group. While the filters will be curated for individual datasets in the future, we want to start out with a persistent namespace filter.
✔️ Acceptance criteria
default
profile it doesn't render anything and doesn't take up space.data_stream.namespace
field in the currently active data view.getFilters
callback in the customization interface that is called before fetching.examples/discover_customization_examples
and a test for that example intest/examples/discover_customization_examples
.🎨 Mock-ups
The text was updated successfully, but these errors were encountered: