1

我尝试添加面板 openstack 计算面板组,但它不起作用我手动执行 python 包,因为脚趾在这里不起作用是我的面板树在此处 输入图像描述 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)

我在计算面板组/项目仪表板上看不到 mypanel

我想念什么??我只想在仪表板上看到我的面板名称

4

0 回答 0