How to add a menu in horizon? [closed]

asked 2013-12-27 00:28:22 -0500

nethawk gravatar image

updated 2013-12-27 14:51:04 -0500

smaffulli gravatar image

I want to add a menu item in "project".I have done these steps: 1) Change /project/dashboard.py to add dynamicsec1

class BasePanels(horizon.PanelGroup):
slug = "compute"
name = _("Manage Compute")
panels = ('overview',
          'instances',
          'volumes',
          'images_and_snapshots',
          'access_and_security',
          'dynamicsec1')

2) I mkdir dynamicsec1 in the directory project

3) create panel.py,urls.py,views.py and the directory "templates" And panel.py like this:

from django.utils.translation import ugettext_lazy as _
import horizon
from openstack_dashboard.dashboards.project import dashboard

class DynamicSec(horizon.Panel):
    name = _("DynamicSec")
    slug = 'dynamicsec'
    roles = ('admin',)

dashboard.Project.register(DynamicSec)

4) I put index.html in templates/dynamicsec.

But after I doing these the menu dynaminsec could not be seen when logging in horizon. I want to know why and how can I deal with it.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by nethawk
close date 2014-01-01 19:33:02.677159