horizon-three level panel

asked 2015-05-03 03:30:11 -0500

ispot gravatar image

Now we add two level panel by adding panelgroups to dashboard.So can I add three-level panel to dashboard. Is there someone who have did this before?

What I want is a horizon.PanelGroup has another horizon.PanelGroup,then we have the "three level panel".

This is my code:

class Panel3_third(horizon.PanelGroup):
    slug = "panel3_third"
    name = _("panel3_third")
    panels = ("panel1")

class Panel2_second(horizon.PanelGroup):
    slug = "panel2_second"
    name = _("panel2_second")
    panels = (Panel3_third,)

class Panel1_first(horizon.PanelGroup):
    slug = "panel1_first"
    name = _("panel1_first")
    panels = (Panel2_second,
           )

class Panel_Three(horizon.Dashboard):
    name = _("Panel_Three")
    slug = "panel_three"
    panels = (Panel1_first,"panel2",)  # Add your panels here.
    default_panel = 'panel2'  # Specify the slug of the dashboard's default panel.

horizon.register(Panel_Three)

Here is the horizon_error.log:

[Sun May 03 00:12:17.474266 2015] [:error] [pid 22275] [remote 218.58.192.27:204]     self._setup()
[Sun May 03 00:12:17.474282 2015] [:error] [pid 22275] [remote 218.58.192.27:204]   File     "/usr/lib/python2.7/site-packages/django/utils/functional.py", line 298, in _setup
[Sun May 03 00:12:17.474306 2015] [:error] [pid 22275] [remote 218.58.192.27:204]     self._wrapped =     self._setupfunc()
[Sun May 03 00:12:17.474335 2015] [:error] [pid 22275] [remote 218.58.192.27:204]   File "/usr/lib/python2.7/site-packages/horizon/base.py", line 778, in url_patterns
[Sun May 03 00:12:17.474404 2015] [:error] [pid 22275] [remote 218.58.192.27:204]     return self._urls()[0]
[Sun May 03 00:12:17.474423 2015] [:error] [pid 22275] [remote 218.58.192.27:204]   File "/usr/lib/python2.7/site-packages/horizon/base.py", line 789, in _urls
[Sun May 03 00:12:17.474448 2015] [:error] [pid 22275] [remote 218.58.192.27:204]     dash._autodiscover()
[Sun May 03 00:12:17.474462 2015] [:error] [pid 22275] [remote 218.58.192.27:204]   File "/usr/lib/python2.7/site-packages/horizon/base.py", line 543, in _autodiscover
[Sun May 03 00:12:17.474485 2015] [:error] [pid 22275] [remote 218.58.192.27:204]     if module_has_submodule(mod, panel):
[Sun May 03 00:12:17.474501 2015] [:error] [pid 22275] [remote 218.58.192.27:204]   File "/usr/lib/python2.7/site-packages/django/utils/module_loading.py", line 37, in module_has_submodule
[Sun May 03 00:12:17.474525 2015] [:error] [pid 22275] [remote 218.58.192.27:204]     name = ".".join([package.__name__, module_name])
[Sun May 03 00:12:17.474554 2015] [:error] [pid 22275] [remote 218.58.192.27:204] TypeError: sequence item 1: expected string, type found

But that didn't work at all.I do not know whether openstack.horizon supports this architecture or not.

edit retag flag offensive close merge delete

Comments

1

I'm not going to be much help in this department but these two answered questions may point you in the right direction.

https://ask.openstack.org/en/question...https://ask.openstack.org/en/question...

omar-munoz gravatar imageomar-munoz ( 2015-05-04 10:59:33 -0500 )edit

Thanks for your answer.

ispot gravatar imageispot ( 2015-05-05 03:47:46 -0500 )edit