PANEL_GROUP="default" in enabled file no longer working in Juno

Bug #1403094 reported by Joris Roovers
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Janet Yu

Bug Description

Using:

PANEL_DASHBOARD = 'settings'
PANEL = 'mypanel'
PANEL_GROUP = "default"
ADD_PANEL = 'mypackage.foo.bar.MyPanel'

Will result in the new panel being added to the "Other" panel group instead of to the default panelgroup as documented (http://docs.openstack.org/developer/horizon/topics/settings.html#panel-group).

This worked fine in icehouse, it looks like this is a regression.

In particular, the following line is throwing an exception (Could not process panel mypanel: type object 'PanelGroup' has no attribute 'panels') because the default panelgroup's __class__ has no panels attribute:
https://github.com/openstack/horizon/blame/stable/juno/horizon/base.py#L893

Proposed fix: Add the following line on after https://github.com/openstack/horizon/blame/stable/juno/horizon/base.py#L293
self.__class__.panels = self.panels

A fix in Juno would be nice, because this break existing extensions.

summary: - PANEL_GROUP="default" no longer working in Juno
+ PANEL_GROUP="default" in enabled file no longer working in Juno
description: updated
Timur Sufiev (tsufiev-x)
Changed in horizon:
importance: Undecided → Medium
assignee: nobody → Timur Sufiev (tsufiev-x)
Timur Sufiev (tsufiev-x)
Changed in horizon:
status: New → Triaged
tags: added: juno-backport-potential
Revision history for this message
Janet Yu (jwy) wrote :

Same issue as in bug #1378558. Coincidentally, I just picked that one up again, adding a unit test per the review comments.

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

Janet, at first I thought that this error is entirely different from the one you're fixing. The reason is different error message "Could not process panel mypanel: type object 'PanelGroup' has no attribute 'panels'" - while your commit is fixing the situation with the error "Could not process panel foo: 'tuple' object has no attribute 'append'". After again looking at your fix I've realized that it's the same code, but it could use another check to eliminate this situation also. More comments in https://review.openstack.org/#/c/128133/

I agree that this one is duplicate.

Revision history for this message
Janet Yu (jwy) wrote :

Removed duplicate status. Separating out fix from bug #1378558's patch.

Changed in horizon:
assignee: Timur Sufiev (tsufiev-x) → Janet Yu (jwy)
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/164387

Changed in horizon:
status: Triaged → In Progress
Changed in horizon:
assignee: Janet Yu (jwy) → Lin Hua Cheng (lin-hua-cheng)
Changed in horizon:
assignee: Lin Hua Cheng (lin-hua-cheng) → Janet Yu (jwy)
Changed in horizon:
assignee: Janet Yu (jwy) → Timur Sufiev (tsufiev-x)
Timur Sufiev (tsufiev-x)
Changed in horizon:
assignee: Timur Sufiev (tsufiev-x) → Janet Yu (jwy)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

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

commit c3864ab35c4d6358b49a86144291897b28d13087
Author: Janet Yu <email address hidden>
Date: Wed Apr 15 18:54:23 2015 -0700

    Make sure dashboard has a default panel group

    According to the Horizon documentation for Settings and Configuration,
    for a plugin panel, 'If you want the panel to show up without a panel
    group, use the panel group “default”'. In some cases, plugin panels were
    getting put under the panel group "Other" instead. This is because
    the default panel group wasn't getting created during plugin panel
    processing when the panel's dashboard class already had some panel
    groups defined. Fix this by making sure a default panel group is created
    in each dashboard.

    Change-Id: I98064c434326aabec16b5d1631e360643609ed40
    Closes-Bug: 1403094

Changed in horizon:
status: In Progress → Fix Committed
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/horizon 9.0.0.0b1

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

Changed in horizon:
status: Fix Committed → Fix Released
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.