previous button not present using limit, marker variables

Bug #1263142 reported by Tiago Martins
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Undecided
Cindy Lu

Bug Description

The current pagination scheme using limit and marker do not offer the possibility of navigating backwards.

Revision history for this message
chenhaiq (chenhaiq) wrote :

When click the more button, it should append next page of items to current table, rather then replace them.

User is supposed to see more items instead of next page.

Changed in horizon:
status: New → Confirmed
Revision history for this message
Tiago Martins (tiago-martins-deactivatedaccount) wrote :

chenhaiq: I think this is a temporary solution acceptable for Icehouse, however this would result in a huge page with the need of scrolling for a large list of users,we have a bad UX experience as a result. So I think the final solution should include pagination

Revision history for this message
Thai Tran (tqtran) wrote :

I agree with Tiago on this, pagination is currently a big usability issue for horizon tables. Having <previous> and <more> along with a page number will really help. The only downside is that they are extremely API dependent. There are really only 2 ways to solve this:

1. wait for the paging api to exist
2. store the data locally in horizon and page that

Obviously, option 1 will be the best outcome, but I think we should implement option 2 regardless. Paging can happen all on the front-end if the api for it doesn't exist. This is advantageous because:

1. prevent browser from crashing when rendering more than large data set
2. gets data all in one go, no additional traffic when user pages
3. filtering should continue to work, not just on a per page basis but across entire data set

Changed in horizon:
assignee: nobody → Cindy Lu (clu-m)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/91111
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=2428d78a156d215b6bdc0e6172c86609394ca726
Submitter: Jenkins
Branch: master

commit 2428d78a156d215b6bdc0e6172c86609394ca726
Author: Cindy Lu <email address hidden>
Date: Mon Apr 28 16:42:43 2014 -0700

    add Previous link to Admin > Images table

    The Glance API supports a sort direction which we can use to paginate back

    The Prev href tag contains a marker id of the first item in the table.
    When clicked, a GET API call is made, passing in this marker and the sort_dir='asc'
    This will return the previous page's data. Then we have to re-sort the data because
    it is ordered backwards. We use the default sort_key='created_by' for this.

    Once the patch #1252649 is restored, we can add the same behavior to Project > Images.

    If we are able to get the consistency across the APIs to include the sort_dir, then we can
    bring Prev to the other project tables as well. There are some blueprints to enhance
    API capabilities in this area.

    Change-Id: I3e7c6a2db595838dbdff595dc8f0fdda288b6bcf
    Partial-Bug: #1263142
    Partial-Bug: #1282987
    Partially-implements: blueprint pagination-add-prev-link

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by Cindy Lu (<email address hidden>) on branch: master
Review: https://review.openstack.org/84531
Reason: the tablesorter.js version it is dependent on was downgraded (2.14 --> 2.0)

Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

I think we can mark this as Fix Release, because Cindy's patch for Admin->Images solves the particular problem and shows a general way to circumvent the scarcity of pagination support in API.

Changed in horizon:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.