Creating a PanelGroup produces group with name "Other"

Bug #1329050 reported by Chad Roberts
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Lin Hua Cheng

Bug Description

Creating a PanelGroup that is made up of one or more panels that exist in a subdirectory does not yield a group with the correct name. Instead, it gives a Panel Group with a display name of "Other".

Example code:
In project/dashboard.py, I added a new PanelGroup

class DataProcessingPanels(horizon.PanelGroup):
    name = _("Data Processing")
    slug = "data_processing"
    panels = ("data_processing.plugins",)

and added it to the panels for the "Project" dashboard.

The code for the "data_processing.plugins" panel is in .....dashboards/project/data_processing/plugins

This results in a Panel Group showing up in the UI with a display name of "Other". The "plugins" panel is correctly listed in there and it seems to have full functionality. The only bit that looks to be broken is the display name.

As a part of my debugging effort, I changed the panel from "data_processing.plugins" to another panel that is not in a subdirectory and then the "Data Processing" group name displayed correctly.

Revision history for this message
Chad Roberts (croberts) wrote :

I should note that I can generate the desired Panel Group by using the "enabled" folder mechanism. That is an undesirable mechanism though since there are eventually about 9 panels that we want to have in this group, which requires 10 files to be saved to the enabled directory (1 for each panel + 1 for the group itself).

Changed in horizon:
assignee: nobody → Ana Krivokapić (akrivoka)
Revision history for this message
Chad Roberts (croberts) wrote :

Update, additional information.

Ok, I *may* have made some sort of progress on this. I have discovered that if I change my panel slugs to be "data_processing.<actual_panel_name>", that I DO get a "Data Processing" Panel Group to display and that the panels DO display in the proper order (per https://bugs.launchpad.net/horizon/+bug/1333739 the panels do NOT currently show up in the specified order).

Unfortunately, changing my slug to "data_processing.<actual_panel_name>" causes my templates to not be found. I suspect this also has something to do with the directory structure of these panel group/panels [current structure is project/data_processing/<panel>/templates/<panel_name>/*.html ]

I still think that I should be able to have a slug of just "<panel_name>" and things should work (in other words: this bug is valid), but I'm providing this bit of info in case it helps you track down the issue.

Revision history for this message
Chad Roberts (croberts) wrote :

I sent an email to openstack-dev that is related to this bug: http://lists.openstack.org/pipermail/openstack-dev/2014-June/038696.html

Revision history for this message
Tatiana Ovchinnikova (tmazur) wrote :

I had the same problem with panel name: "Other" instead of "Data Processing" or whatever I tried to type. However when I tried to use new stack with Sahara, everything worked fine. I think that's because of some cookies problems: I have tested some old versions of your Sahara patches first when the name of panel was "Other".

Changed in horizon:
assignee: Ana Krivokapić (akrivoka) → nobody
Changed in horizon:
assignee: nobody → Lin Hua Cheng (lin-hua-cheng)
Revision history for this message
Lin Hua Cheng (lin-hua-cheng) wrote :

To reproduce the issue, setup the plugin config as such:

a. _90_add_panel_groupA.py
b. _91_add_panel_to_groupA.py
c. _92_add_panel_groupB.py
d. _93_add_panel_to_groupB.py

groupA panel falls into the "Other" panel group. The issue seems related to having a plugin config that is adding more than one panel group.

Changed in horizon:
status: New → Triaged
importance: Undecided → Medium
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/117123

Changed in horizon:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/117123
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=292fc881d093195c87b05495847c9e5aec4dc5f0
Submitter: Jenkins
Branch: master

commit 292fc881d093195c87b05495847c9e5aec4dc5f0
Author: lin-hua-cheng <email address hidden>
Date: Wed Aug 27 00:34:33 2014 -0700

    Fix for adding panel to panel group via plugin

    When adding panels to panel group, it should also be added to the
    list of panels at the class atttribute. Otherwise, it will lose the
    reference to the panels when _autodiscover() is triggered.

    Change-Id: Ifa530d5a39f48d9fd9cd0ea66f6c16594447058b
    Closes-Bug: #1329050

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
milestone: none → juno-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: juno-3 → 2014.2
Revision history for this message
Alan Pevec (apevec) wrote :
no longer affects: horizon/juno
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.