- try to reduce code duplication by using same route handler for ajax and csv,
using request->is_ajax to switch the template, and set content-type
- use new HTML5 "download" attribute on links so content-disposition header is
no longer necessary
- download CSV icon is placed on all tables (per report/device/serach section)
- update download CSV link using javascript just before table content is
fetched - this is necessary to make sure updated sidebar query params are
included
The idea here is to allow us to support CSV download in the pages which
display tables by only doing the following:
- (existing routes:) replace "ajax" with "get" route handler
- add logic to switch template in handler, based on request->is_ajax
- write _csv.tt version of the template, to spit out CSV file content
This makes it much easier for new devs to write reports supporting CSV, I
think?
* for an exact match use "quoting", a bit like what Google does
to enforce a search term
* otherwise terms are assumed to be wildcard bounded and case insensitive
* without quotes, * and ? characters are supported for multi and single
character wildcards.
we could revert this commit if we don't like it.