Skip to content

Pagination on containers #12

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Pagination on containers #12

wants to merge 3 commits into from

Conversation

Petahhh
Copy link

@Petahhh Petahhh commented Mar 30, 2015

The following changes add pagination among containers. It is achieved by using a basic form and POST. The backend keeps track of what "marker" the user is at with a list stored in the session. This marker is used in swiftclient.client.get_account's marker paramter (http://docs.openstack.org/developer/python-swiftclient/swiftclient.html#swiftclient.client.get_account) to get containers starting from after the marker.

Some potential changes to this arrangement include:
-Moving the logic from views.py:containerview() to a model?
-Replacing the form post with ajax

A known bug:
-After a user clicks "get next", loads the page, and then refreshes, the next page will load instead of refreshing the current page. This can be fixed by using ajax instead of form/post.

Please let me know your thoughts, I am completely open to any changes to get this patch landed.

Thank you,

Peter

PS The gif below is weird and flashy in the first few seconds but then it calms down and you can see the demo.
pagination-demo

Peter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants