-
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
Add a mechanism to allow plugins to intercept "click to filter" #6189
Comments
Yes, it would be great to have this feature. We can then have Kibana dashboard interact with other websites for apps. |
I've been thinking on this recently and I wonder if the plugin API could be an override of the listeners.click and API.events.filter actions in visualizations? Currently, those just call filterBarClickHandler but what if they instead call into some code that grabs a list of registered actions. The actions would have a sort order and can determine if they want to be skipped or if they want to tackle the event. The last action would be the default filterBarClickHandler. Plugins could then register their actions. @epixa, thoughts? |
@trevan I like where you're going with that at a high level, at least. Do you envision this just being a way for plugins to change the singular action that occurs when you click, or do you propose adding some sort of context menu when there are multiple actions that match? ping @elastic/kibana-visualizations |
Similar requests have come up in the context of "drilldowns": #4439. The idea that, after clicking on a visualization, you can navigate elsewhere. An initial effort around this topic will be likely for dashboard-drilldowns (#12560). I agree that this would be very valuable to have for individual visualizations, and that this could be part of the plugin-API (like you mentioned, "custom click handlers"). We've discussed it internally on occasion, but have not made concrete steps to bring this into Kibana. |
@epixa, I would like it if Kibana always showed a context menu because I feel there are always two actions you can do: filter in and filter out. Then plugins could add additional actions to the context menu to drill down, call apis, go to external sites, etc. But I felt that forcing a context menu for all clicks in the default Kibana might be too disruptive so allowing a plugin to create the context menu would be a first step. I spoke with @timroes about this at Elasticon and we discussed where this hook might fit. He mentioned that there is work being done that might change how the plugin api works but he was interested in seeing a pr to see how I would make it work. |
@Dosant Can this be closed with the work done with triggers and drilldowns? |
My use case is to be able to click on an item and then choose from a set of "actions". This would be like filtering on it, filtering it out, going to another website, drilling down to a different dashboard, etc.
One way is to convert the current "click to filter" action into a context menu with default actions (filter in, filter out, etc) and then allow plugins to add additional actions (go to a website, drill to a different dashboard, etc).
The text was updated successfully, but these errors were encountered: