Page numbers and back button while listing resources in a paginated fashion

Bug #1282987 reported by Rushi Agrawal
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Won't Fix
Wishlist
Unassigned

Bug Description

Let's say I have created 45 instances, and the 'items per page' value is 20 (which is also the default value). The user will see first 20 instances listed in horizon, with a little 'more' button to see the next 20 rows. BUT there is no way on the UI to go to the last page (except for clicking the 'back' button in the browser). ALSO, there are no page numbers, so the user don't know how many more pages are ahead (and behind!).

Additional enhancement: Show a 'displaying 21-40 of 45 items' just before where the page numbers are specified.

Steps to reproduce: create 5 instances, and change the 'items per page' to '2' in the 'settings' section.

Tags: pagination
Revision history for this message
Rushi Agrawal (rushiagr) wrote :

Related but not exactly the same bug: https://bugs.launchpad.net/horizon/+bug/1100318

Revision history for this message
Liyingjun (liyingjun) wrote :
Revision history for this message
Matthew D. Wood (woodm1979) wrote :

Also a duplicate of https://bugs.launchpad.net/horizon/+bug/1263142

There's a lot of them.

Changed in horizon:
assignee: nobody → Cindy Lu (clu-m)
status: New → 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
Ying Zuo (yingzuo) wrote :

Looks like the changes added by Cinday Lu have been merged on 2014/7/1, but I don't I see the Previous link on horizon with the master branch. Also, why is the status of this defect is "In Progress" instead of "Released"? Are we expecting other changes?

Revision history for this message
David Lyle (david-lyle) wrote :

The problem is the service APIs are inconsistent and only a few support a previous field. Page numbering is not available from any service APIs. With the addition of Searchlight, this might be possible.

Changed in horizon:
status: In Progress → Confirmed
importance: Undecided → Wishlist
tags: added: pagination
David Lyle (david-lyle)
Changed in horizon:
assignee: Cindy Lu (clu-m) → nobody
Revision history for this message
Ying Zuo (yingzuo) wrote :

We are moving to Angular panels so there's no plan to change the django implementation at this point. For future reference, this kind of changes will need a blueprint.

Changed in horizon:
status: Confirmed → Won't Fix
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.