Filter bar usage - how to apply multiple filters question


(Viorel Rusu) #1

Hi,

I am developing my own Kibana plugin and applying multiple filters at the same time, in the Tim Roes way:

I need to apply multiple filters at the same time and I would like to do it in the Kibana way, asking if the user wants to "Apply these filters":

Applying two filters instead of one with the Tim Roes tutorial does the job, but doesn't show up the message, it just applies them directly. I have been trying to understand how filter_bar does this in the default plugins without succes. Do you know any simple usage example? How could I add this functionality to my plugin?

Any help is very welcome. Thanks in advance


(CJ Cenizal) #2

Hi Viorel,

I apologize in advance for the unhelpfulness of my reply... we don't officially support the plugin API for third-party developers, though we hope to do so in the future. So unfortunately, I can't really offer you any good advice on this problem. Maybe you could try reaching out to Tim directly?

Thanks,
CJ


(Viorel Rusu) #3

Thanks anyway cjcenizal.

I saw some similar questions answered here and I thought you offered some support...

Regards


(Mark Walkom) #4

Ping @timroes :slight_smile:


(Tim Roes) #5

Looking at the source code of Kibana it looks like the filter_manager.add method should automatically show this bar. Since the bar has afaik only inlcuded in more recent Kibana versions (not sure which exactly), I wonder, whether you have a high enough Kibana version to see this bar?


(Viorel Rusu) #6

Hey Tim!

First of all, thank you for your tutorials. They have been of great help.

This is how I'm using the double filter in my code:

filterManager.add(...);
filterManager.add(...);

This directly applies the two filters, without asking

I have been doing some more research. This is what I got so far:

  • I have checked if the Kibana version I'm using (5.0.0) has this feature, and there it is: filter_bar.html has this feature, and actually visualizations like "Vertical bar chart" correctly displays the "Apply these filters?".
  • Setting a breakpoint in javascript at filter_manager.js/filterManager.add and executing a double filter in "Vertical bar chart" does nothing. The "Apply these filters?" question displays but it seems like this plugin is filtering somehow without using filterManager.add.

And here's where I'm stuck. Any ideas of what it could be or what I should try?

Thanks in advance,

Vio


(system) #7

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.