Ask Your Question
0

Facing problem in adding horizon dashboard

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

anonymous user

Anonymous

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

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',)

horizon.register(chargeback)

From this link I have even tried to add the file _50_chargeback.py 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
1

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

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
2

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

david-lyle gravatar image

I can some problems with the dashboard.py 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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 113 times

Last updated: Jun 13 '14