projects drop-down broken for large numbers of projects

Bug #1498039 reported by Andrew Bogott
66
This bug affects 15 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Unassigned

Bug Description

The project drop-down list does not scroll, so anything not already on it (e.g., as defined by the DROPDOWN_MAX_ITEMS setting) is not choosable.

I'm a member of several dozen projects -- more than can fit in a single screen's worth of drop-down. Right now I'm trying to view the VMs in a project called 'testlabs.'

- When I click on the 'project' drop-down up top, it displays the first 20 or so projects, and then a "More Projects" link.
- I select 'More Projects', and it drops me into the 'Projects' tab of the Identity panel. But, hey, it says 'Unable to retrieve project list'. I guess that's because I wasn't ADMIN in the project that was active... before? The one I'm trying to switch away from?
- I select a different project from the project drop-down... not 'testlabs' but just one that I happen to be admin in.
- I select 'More Projects' again, and now I'm back in the Identity panel but now I can actually see a project list.
- I find 'testlabs' in the list, click on the little arrow next to 'Manage Members' and there's a drop down there
- I select 'Set as Active Project' from that dropdown
- I click away from the Identity panel, back on the 'Project' panel
- NOW I can see my VMs.

Correct behavior is that the 'projects' pull down is just super long and scrolls. Ugly, but not as ugly as the status quo!

Running Kilo from the Ubuntu cloud archive.

description: updated
Revision history for this message
Matthias Runge (mrunge) wrote :

I wonder if that's another case for tokens too big?

What kind of tokens do you use? pki token?

David Lyle (david-lyle)
Changed in horizon:
status: New → Incomplete
Revision history for this message
Daniel Speichert (dasp) wrote :

I have a similar problem: having access to >50 projects, I do NOT see "More Projects" link at the bottom. The drop-down is just cut with no scrolling possible.

Revision history for this message
Blair Bethwaite (blair-bethwaite) wrote :

Have this problem in Liberty too - the projects drop-down is not scrollable. There is a config option which might work around it, but in a really horrible static, break again later, way:
```
``DROPDOWN_MAX_ITEMS``
----------------------

.. versionadded:: 2015.1(Kilo)

Default: ``30``

This setting sets the maximum number of items displayed in a dropdown.
Dropdowns that limit based on this value need to support a way to observe
the entire list.
```

This really needs fixing. Better still, the dropdown should be both scrollable and searchable/filterable.

Sam Morrison (sorrison)
Changed in horizon:
status: Incomplete → New
summary: - projects drop-down broken for large numbers or projects
+ projects drop-down broken for large numbers of projects
description: updated
Tyr Johanson (tyr-6)
Changed in horizon:
status: New → Confirmed
Revision history for this message
Tyr Johanson (tyr-6) wrote :

context_selection.py show_project_list() uses DROPDOWN_MAX_ITEMS to slice off any additional project beyond the max (default 30).

Instead, consider removing the use of max_proj and instead show all projects and change the dropdown-menu CSS to something like

.dropdown-menu {
    max-height: 400px;
    overflow: hidden;
    overflow-y: auto;
}

See also: http://eichefam.net/2012/04/12/scrollable-menus-in-bootstrap/

Revision history for this message
Andrew Bogott (andrewbogott) wrote :

@Tyr, the MAX_ITEMS change is no trouble. I've poked at .scss files for a couple of hours, though, and have concluded that either 1) I'm totally misunderstanding where this change should be made, or 2) Somehow css isn't getting properly refreshed when I restart apache.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/301981

Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
Marcos Lobo (marcos-fermin-lobo) wrote :

For me the DROPDOWN_MAX_ITEMS is not working. I've changed to "3" in local_settings (restart apache) and still I see all the projects in the project drop down list, when it should display only "3"

Version Liberty RPM in CentOS7

Changed in horizon:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by Andrew Bogott (<email address hidden>) on branch: master
Review: https://review.openstack.org/301981
Reason: It's going to be a while before I have a useful dev framework to work on this; hopefully someone else will pick up this bug in the meantime.

Changed in horizon:
assignee: nobody → Rob Cresswell (robcresswell)
milestone: none → newton-1
tags: added: mitaka-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/301981
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=1644a0eee407ba59ed07927cb41783e5c04f0c18
Submitter: Jenkins
Branch: master

commit 1644a0eee407ba59ed07927cb41783e5c04f0c18
Author: andrewbogott <email address hidden>
Date: Tue Apr 5 08:27:43 2016 -0500

    Add scrolling to the projector selector

    Adds a scrollbar to the project selector for larger screens. This isn't
    needed for smaller sizes, as it already scrolls.

    Co-Authored-By: Rob Cresswell <email address hidden>
    Change-Id: Ib03eafccd4725af94556286f1f541a9e7cde96e4
    Closes-Bug: #1498039

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/320054

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/mitaka)

Reviewed: https://review.openstack.org/320054
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=7896a2a3aaf42fd972dbf2c3c3f0f38994b68571
Submitter: Jenkins
Branch: stable/mitaka

commit 7896a2a3aaf42fd972dbf2c3c3f0f38994b68571
Author: andrewbogott <email address hidden>
Date: Tue Apr 5 08:27:43 2016 -0500

    Add scrolling to the projector selector

    Adds a scrollbar to the project selector for larger screens. This isn't
    needed for smaller sizes, as it already scrolls.

    Co-Authored-By: Rob Cresswell <email address hidden>
    Change-Id: Ib03eafccd4725af94556286f1f541a9e7cde96e4
    Closes-Bug: #1498039
    (cherry picked from commit 1644a0eee407ba59ed07927cb41783e5c04f0c18)

tags: added: in-stable-mitaka
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/horizon 10.0.0.0b1

This issue was fixed in the openstack/horizon 10.0.0.0b1 development milestone.

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/horizon 9.0.1

This issue was fixed in the openstack/horizon 9.0.1 release.

Revision history for this message
Deepa (dpaclt) wrote :

I am still having this issue in Ocata version of Openstack ,Openstack version 11.0.1 ,OS ubuntu 16.04.
Even after setting DROPDOWN MAX ITEMS to 100 in local_settings.py file in /etc/openstack-dashboard just defauly 30 projects is being listed.Anywork around ?

Revision history for this message
Paul Peereboom (peereb) wrote :

@Deepa Increasing DROPDOWN_MAX_ITEMS works for me in Rocky release.

Revision history for this message
Alp (alp123-deactivatedaccount) wrote :

We have just updated our OpenStack Version to Pike a few days ago. We are still facing this issue. Increasind Dropdown_max_items in local_settings.py does not solve our problem.
Any other workarounds?

Revision history for this message
Vincent Zhang (geotransformer) wrote :

Have this issue in our labs for different Openstack.

Here is an example:
Version: Queens
OS: Ubuntu 16.04.6 LTS
# openstack --version
openstack 3.14.2

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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