Ask Your Question

Facing problem in adding horizon dashboard

asked 2014-06-12 03:46:32 -0600

anonymous user


updated 2014-06-13 16:45:01 -0600

smaffulli gravatar image

am trying to create a new dashboard but whenever I do so, I get no changes in the OpenStack dashboard, and the dashboard doesn't get added to it.

from django.utils.translation import ugettext_lazy as_
import horizon

class BasePanelGroup(horizon.Dashboard):
    name = _("Overview")
    slug = "overview"
    panels = ("hypervisors",)

class Chargeback(horizon.Dashboard):
    name = _("Chargeback")
    slug = "chargeback"
    panels = ('BasePanelGroup',)
    default_panel = 'hypervisor'
    permissions = ('openstack.roles.admin',)


From this link I have even tried to add the file with the given details in it and now my existing OpenStack dashboard doesn't show up.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2014-06-13 16:44:32 -0600

smaffulli gravatar image

Have a look at this answer and other similar ones on this site. If you don't find an answer there edit the question to provide more details, especially explain what you've tried to do to fix the issue and where those failed.

edit flag offensive delete link more

answered 2014-06-13 23:07:36 -0600

david-lyle gravatar image

I can some problems with the file you posted. First BasePanelGroup should inherit from horizon.PanelGroup and not horizon.Dashboard Second, you are using two different slugs to refer to the hypervisors panel, "hypervisors" is correct (assuming you are wanting to use the existing panel). Third, you need to register the class, not the slug on the final line, so use horizon.register(Chargeback)

Fixing those may not get you all the way, but give you a clearer error to work forward from.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-06-12 03:46:32 -0600

Seen: 189 times

Last updated: Jun 13 '14