cannot add panel to openstack django horizon

88 views Asked by At

I tried to add panel openstack compute panel group but it's not working I do manually python package because toe is not working here is my mypanel tree enter image description here panel.py

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

class Testpanel(horizon.Panel):
name = _("Testpanel")
slug = "mypanel.testpanel"
permissions = ('openstack.project.compute', 'openstack.roles.admin')
policy_rules = ((("compute", "context_is_admin"),
                 ("compute", "compute:get_all")),)

dashboard.Project.register(Testpanel)

_12221_project_mypanel_test_panel.py

from django.utils.translation import ugettext_lazy as _
import horizon
from openstack_dashboard.dashboards.project import dashboard
class Testpanel(horizon.Panel):
   name = _("Testpanel")
   slug = "mypanel.testpanel"
   permissions = ('openstack.project.compute', 'openstack.roles.admin')
   policy_rules = ((("compute", "context_is_admin"),
                 ("compute", "compute:get_all")),)
dashboard.Project.register(Testpanel)

I can't not see mypanel on compute panel group /project dashboard

What am I miss?? I just want to see mypanel name on dashboard

0

There are 0 answers