Skip to content
This repository has been archived by the owner on Jan 7, 2018. It is now read-only.

Simpler query builder interface for constructing admin analytics queries #7

Merged
merged 11 commits into from
Feb 20, 2015

Conversation

GUI
Copy link
Member

@GUI GUI commented Feb 20, 2015

In the current admin tool, if you wish to filter your analytics, you have to construct a query using Lucene's query syntax (which we pass along to ElasticSearch). This is powerful and flexible, but if you're not familiar with this syntax language or our internal field names, this isn't particularly friendly (especially when you get to URL paths and the need to escape slashes). Making an easier interface for people to filter the analytics has been on our todo list for forever.

This is an initial implementation of an easier query building interface. We're largely leveraging the jQuery QueryBuilder library to provide the UI for this. This provides drop down menus for picking which fields to filter on, the ability to choose conditions like "begins with", "contains", or "greater than", and then you can enter a search value (or choose from options for fields we know have a limited set of values). I've also added better inline help to describe each field. A screenshot probably best describes its functionality:

screen shot 2015-02-19 at 5 31 19 pm

Hopefully this is a lot more intuitive for most people to use. The fields available for filtering in this UI isn't entirely complete (we store other fields internally), but I think this covers the main fields that 98% of queries are probably interested in. The old interface is also available if you click the "Switch to advanced filters" link, so if you're still keen on the raw ElasticSearch/Lucene queries, that functionality is still present and works just like before.

GUI added 11 commits February 16, 2015 21:43
This uses the jQuery-QueryBuilder plugin to provide an easier
query building interface for constructing analytics queries. This is
intended to finally provide a nicer alternative to the raw "Advanced
filters" query syntax, which is just a straight ElasticSearch query.

I still need to figure out how the interface for this will fit in, but
it basically seems to work.
Since we're now precompiling the assets during tests, we need to
exclude this directory from Rubocop so it doesn't pick up files in there
on subsequent runs.
Since we disabled jquery animations in
b0383f8 this progress loader test began
failing. I think this updated approach should be safe.

While we're at it, update the jQuery BlockUI library. Also disable
animations in non-test environments for BlockUI by default, since it
doesn't really seem like we need the delays of fading in and out.
GUI added a commit that referenced this pull request Feb 20, 2015
Simpler query builder interface for constructing admin analytics queries
@GUI GUI merged commit 653e1e2 into master Feb 20, 2015
@GUI GUI deleted the admin-analytics-query-builder-ui branch March 29, 2015 17:10
GUI added a commit that referenced this pull request Jun 26, 2015
When we introduced the query builder interface for analytics
(#7), it turns out we
accidentally started making duplicate requests for the table data.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant