Group related panels into packages

Bug #1259458 reported by Radomir Dopieralski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Wishlist
Radomir Dopieralski

Bug Description

It's possible in Horizon to have the panels grouped into PanelGroups in the menu, but unfortunately that is not reflected in the filesystem structure of the panel source files. We found a way of grouping related panels together into packages by using dot notation, like this:

class DeploymentOverview(horizon.Panel):
    name = _("Overview")
    slug = "deployment.overview"

class Deployment(horizon.PanelGroup):
    slug = "deployment"
    name = _("Deployment")
    panels = (
        'deployment.overview',
        'deployment.controller',
        'deployment.compute',
        'deployment.object_storage',
        'deployment.block_storage',
    )

This works fine with panel autodiscovery and would be a perfect solution for this problem, if not for one detail -- the URL generated for such a panel looks like: /infrastructure/deployment.overview/

This can be easily fixed by a small change in how the URLs of the panels are generated.

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/61043

Changed in horizon:
assignee: nobody → Radomir Dopieralski (thesheep)
status: New → In Progress
Changed in horizon:
milestone: none → icehouse-2
importance: Undecided → Wishlist
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/61043
Committed: http://github.com/openstack/horizon/commit/ad726b2f810881d55e931babb73a1faa2011b27d
Submitter: Jenkins
Branch: master

commit ad726b2f810881d55e931babb73a1faa2011b27d
Author: Radomir Dopieralski <email address hidden>
Date: Tue Dec 10 09:40:43 2013 +0100

    Fix URLs of panels grouped into packages

    If you group related panels into packages using the
    dot notation, the URLs generated for them will have
    the dot in them where you would rather expect a
    slash. This patch fixes it by replacing the dots in
    the panel slug with slashes when generating URLs for
    them.

    Change-Id: I450321f2c2a64297fbd3e1104ad5635aa5d9aba8
    Closes-bug: #1259458

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: icehouse-2 → 2014.1
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.