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

Admin Analytics: CSV Downloads broken #173

Closed
GUI opened this issue Jan 16, 2015 · 1 comment
Closed

Admin Analytics: CSV Downloads broken #173

GUI opened this issue Jan 16, 2015 · 1 comment

Comments

@GUI
Copy link
Member

GUI commented Jan 16, 2015

In the admin analytics pages, you can download the complete results on most pages by clicking the "Download CSV" link in the bottom left corner. However, these links are currently returning errors.

The culprit seems to be related to the start/end time query parameters in the URL. In the download link the query parameters are start and end. If those get replaced with start_time and end_time, the download link works. But I'm a bit confused, and this needs further investigation because on the results page in the admin UI, we do use start and end (and the download URL parameters should generally match those). There's obviously a discrepancy between these parameter names somewhere we should cleanup.

We should also figure out why our test suite didn't catch this, since I recall fixing broken downloads before.

@GUI GUI added the bug label Jan 16, 2015
@GUI GUI self-assigned this Jan 16, 2015
GUI added a commit to NREL/api-umbrella-web that referenced this issue Jan 18, 2015
See: 18F/api.data.gov#173

When we updated DataTables to 1.10 and the new ajax standard
(http://datatables.net/manual/server-side), we began to have conflicts
over their concept of the "start" param being for pagination, and our
use of "start" parameter being for date ranges. We had sort of solved it
by renaming the parameter differently depending on the use-case, but
this got to be confusing. This is also what partially broke the CSV
downloads, since the query parameter names had gotten out of sync.

This fixes all of that by letting DataTables take the "start" parameter,
and we've renamed our date parameters to be "start_at" and "end_at".
This removes the conflict and makes things a little more sane.

There were other aspects of the CSV download that were also broken from
when we switched to the official elasticsearch ruby client. Those are
also fixed now.

And finally, we've finally begun to add some very initial tests to the
analytics area, so we're actually testing our elasticsearch queries.
Tests are now present for the CSV download link to hopefully make sure
this doesn't happen again.
@GUI GUI added this to the Sprint 13 (1/12-1/23) milestone Jan 19, 2015
@GUI
Copy link
Member Author

GUI commented Jan 19, 2015

This should be fixed in NREL/api-umbrella-web@6420c24 See the comment on the commit for more details.

@GUI GUI closed this as completed Jan 19, 2015
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

1 participant