Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[ENG-6283] User table allows CSV and TSV downloads #10782
base: feature/insti-dash-improv
Are you sure you want to change the base?
[ENG-6283] User table allows CSV and TSV downloads #10782
Changes from 5 commits
8cb64b5
e2f7e47
62907cf
09370fe
4472a44
c1dac13
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be good to keep a logical separation of concerns -- a renderer should work with the data it's given; this is logic that belongs in the view
(tho might be even better to skip the special casing and let the client set
page[size]=10000
)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think we need yet another json renderer; we only need a way to download the existing json as a file (instead of opening in the browser)
how about accepting a
forDownload
query param inElasticsearchListView
(or evenJSONAPIBaseView
?) that toggles aContent-Disposition
header? could work the same way for any format, reducing special-casingThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In considering this I think the user probably doesn't want
meta
and general pagination information that would come from this endpoint. It should be a pure list, like the tabular formats are. But still considering options here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is that based on user feedback? (not sure where "it should be a pure list" came from, when talking about a non-tabular format like json)
total counts and pagination information seem like helpful info to include (especially if they can choose a page size, or if there are more than 10000), and easy to ignore if they don't need it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(could understand wanting to omit relationships, but i'd argue the effort would be better spent making
ElasticsearchListView
support sparse fieldsets (so the download could reflect selected columns from the frontend, implicitly omitting relationships))There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe change format param to fix collision with normal json format?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is getting beyond the scope of the ticket, but it'd be nice for
RecentReportList
to inheritElasticsearchListView
, now that it exists (instead of only duck-typingget_default_search
) -- could be fuller-featured and more consistent, but might also rabbit-hole, so don't bother unless you want to