Client-side pagination

Registered by Cindy Lu on 2014-03-19

I know there is ongoing discussion in the community about pagination and api support across components.

In the meantime, as a fallback solution, I propose we add this extension
(http://mottie.github.io/tablesorter/addons/pager/jquery.tablesorter.pager.js)
to the tablesorter plugin we are already using (http://tablesorter.com/docs/).

This can address many of the issues in the bug list around pagination + sorting + filtering and can work with the quicksearch plugin (currently used for filter search).

We are currently relying on front-end javascript solutions like tablesorter and quicksearch. This would help bring together a complete solution for the time being.

Current bugs include:
- sort not working across pages
- filter not working across pages
- pagination not being available across all table
- in the tables with pagination, the 'More' button works, but there is no Previous or back button
- no page number displayed

See image for mocked screenshot. http://tinypic.com/view.php?pic=4qppig&s=8#.UyogNfldUeo

Blueprint information

Status:
Complete
Approver:
David Lyle
Priority:
Medium
Drafter:
Cindy Lu
Direction:
Approved
Assignee:
Cindy Lu
Definition:
Obsolete
Series goal:
None
Implementation:
Needs Code Review
Milestone target:
None
Started by
Cindy Lu on 2014-06-10
Completed by
Cindy Lu on 2016-10-28

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/client-side-pagination,n,z

Addressed by: https://review.openstack.org/84531
    client-side pagination and sorting across pages

---

Currently there is no solution for the pagination+sorting+filtering all-working-together problem until we have consensus across all the Openstack components. This will take awhile.

In the meantime, we can improve what we have.

This client-side solution will build on top of the existing functionality. It will not break anything and it provides the behavior we want to ultimately have. All changes are done in the javascript files. It works on tables that currently *don't* have API-supported pagination. It still loads all the data at once, but pages it and gives it sorting + filtering capabilities.

In the future, the plugin will work alongside the API-supported pagination.

[05-24-2014 clu]
Since we plan to use xstatic in the future (Juno design summit: https://etherpad.openstack.org/p/juno-summit-horizon-static-files), the pager ext. is already baked into Tablesorter library (https://pypi.python.org/pypi?%3Aaction=search&term=xstatic&submit=search). There is no overhead at all.

Direct link to pager extension file: https://github.com/Mottie/tablesorter/blob/master/js/widgets/widget-pager.js

[jpich 2014.06.10] Moving milestone to j-2. Could you update the status? Thank you.

[david-lyle 2014.08.27] moving out of Juno. Unfortunately, this has run into 3rd party JavaScript issues that I feel are unlikely to resolve by Sept 4.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.