lucidworks / banana

Banana for Solr - A Port of Kibana
Other
668 stars 235 forks source link

Add a custom query #247

Open rdubreui opened 9 years ago

rdubreui commented 9 years ago

I have created a custom panel which is composed of a select form. I want to get the selected value and put it in the "custom query" field of my panel (just this for now).

In fact, I want to create a custom query panel which will change the "custom query" field of every panel on the dashboard, but it will turn with selected values.

For the time being, I tried to put a variable (which contains the selected value) in the "custom" field, in the variable "_d" in the "module.js" file, but it does not work. Maybe I can replace something in the "get_data" function in the part commented "Set the additional custom query" in the https://github.com/LucidWorks/banana/wiki/Tutorial:-How-to-Build-a-Custom-Panel.

rdubreui commented 9 years ago

I have changed my plan. Now, I want to copy the filtering panel principle. But I don’t know how it ads filters to the dashboard. Which files does it need and use ?

nickvasilyev commented 9 years ago

Hi,

Have you looked into the filterSrv angular service?

On Tue, Sep 1, 2015 at 11:52 AM, rdubreui notifications@github.com wrote:

I have changed my plan. Now, I want to copy the filtering panel principle. But I don’t know how it ads filters to the dashboard. Which files does it need and use ?

— Reply to this email directly or view it on GitHub https://github.com/LucidWorks/banana/issues/247#issuecomment-136767614.

rdubreui commented 9 years ago

I have seen this service right now. I am not sure that to see the structure of this manager function will help me, but I will check it out more deeply.

I think the answer is in the "this.set" function (of filterSrv.js), maybe someone can agree that.

But I really don’t understand why, in the filtering/module.html there is no parameter in the "add()" !!!

Just for set up my issue, I want that when I select the options (in my select tags), and after click on an "apply" button, the filter is add to a filter list and toggled.

/* I have copy/paste all the module.html, meta.html and module.js (the only thing I cannot take is $rootScope which doesn’t want to work in my controller) in my panel, but I can’t see the filter list or I can’t add a filter by the filtering panel way. – I can’t see what is different between the two codes, so I think it is about dependency: which program, module, controller, is calling or is auxiliary to the filtering.js and html? /