Skip to content
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

Ability to add a new filter explicitly in the UI #5250

Closed
tbragin opened this issue Oct 30, 2015 · 7 comments
Closed

Ability to add a new filter explicitly in the UI #5250

tbragin opened this issue Oct 30, 2015 · 7 comments

Comments

@tbragin
Copy link
Contributor

tbragin commented Oct 30, 2015

Right now to add a new filter, you have to do that from a specific field in Discover or chart in Visualize/Dashboard. With editable filters (#1583), it is now useful to add a new filter and simply paste in its definition.

Right now, there is no obvious place to do that, since the filter bar does not appear unless one filter is already applied, so tackling this will require rethinking the filter bar.

@markwalkom
Copy link
Contributor

I'll +1 this, it'd make things easier than forcing users to pick things from discover/other.

@markwalkom
Copy link
Contributor

It'd be great if there was a copy function for existing filters as well, which may make this easier than having a user understand exactly what they want to create a new filter on.

ie - Copy existing filter field: foo, then let them edit that to field: bar. Rather than a quick add type button where they may need to explicitly type the entire thing in.

(Yes it is simple to retype that, but it's simpler for a user to not understand what the field part is and know they just need to change the second value.)

@srbdev
Copy link

srbdev commented May 24, 2017

I've been looking into implementing this feature in Kibana 4.5 and the one thing I am unsure is how to get the default index pattern for the running instance. It seems like I can only get it from the existing filters. I've looked at the $scope variable and the application state but couldn't find it there.

Does anyone know if the default index pattern is stored somewhere where it can be queried? Thanks!

@Bargs
Copy link
Contributor

Bargs commented May 24, 2017

@srbdev you can get it from the config service, here's an example:

const id = exists ? state.index : config.get('defaultIndex');

@srbdev
Copy link

srbdev commented May 25, 2017

@Bargs Thanks, that worked! I have another question: what would you suggest for a basic/blank filter query to start the new filter with? Right now I use a simple match on a timestamp for the current time (not very useful...).

@Bargs
Copy link
Contributor

Bargs commented May 25, 2017

Hmmm, sorry I'm not really sure. If you don't actually want to filter anything by default you could use a match_all query.

@stacey-gammon
Copy link
Contributor

I think this has been fixed. We have both the new filter bar (albiet there is a bug currently with when it shows up: #14076, but it's supposed to show up all the time) which has + a filter link, and we have input controls too.

Going to close, re-open if I missed anything!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants