-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add export and column visibility buttons to tables #363
Conversation
To note here that as nearly all the tables are server side these export buttons export what is currently on the page. I more see this as a convenience so I don't think we need to write our own fetching function to get all rows, especially as it could be nearly a million rows in some cases. Though the only place I see this as a problem is the sources query but I would rather direct users to the Jupyter Hub. |
* Added datatables-buttons extension. * Added jszip node dependency (for excel export). * Added Export to CSV and Excel buttons to tables. * Added Column visibility button. * Changed external search results page numbers. * Updated datatables to 1.10.22.
54dc9ee
to
4c4beee
Compare
This can now be reviewed. Only change will be waiting for a Datatables-buttons release to fix the Excel export (if you want to test it the solution is in that linked issue). They say it's imminent... |
CHANGELOG.md
Outdated
- Added csv and excel export buttons to datatables on webinterface [#363](https://github.com/askap-vast/vast-pipeline/pull/363). | ||
- Added column visibility button to datatables on webinterface [#363](https://github.com/askap-vast/vast-pipeline/pull/363). | ||
- Added dependancy datatables-buttons 1.6.4 [#363](https://github.com/askap-vast/vast-pipeline/pull/363). | ||
- Added dependancy jszip (required for Excel export) [#363](https://github.com/askap-vast/vast-pipeline/pull/363). |
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.
move at the top of the list
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.
Gah, fixed in be4f81c.
Uses the Datatables buttons extension.
The
dom
was defined using the solution presented here: https://stackoverflow.com/questions/32252616/datatable-styling-so-bootstrap-button-appears-on-same-row-as-other-elements.Excel will work when Datatables buttons makes a new release, see DataTables/Buttons#182.
This PR is based from #345 so will wait for that one to be done.
Some screenshots:
CSV exported from above:
Also reduces the pagination control numbers on the external results table to avoid overlap.
Fixes #360.
p.s. I couldn't work out how to ungroup the buttons, but the look grew on me.