Ask Your Question
1

How to cleanly add a PanelGroup to the Project dashboard (Horizon)?

asked 2014-07-30 00:52:31 -0500

wchrisjohnson gravatar image

updated 2014-07-30 13:57:54 -0500

smaffulli gravatar image

I am attempting to build an app that works within the Horizon openstack_dashboard, similar to this: http://docs.openstack.org/developer/h... . This was useful too: http://docs.openstack.org/developer/h...

I am using the overides.py within my app to dynamically inject my app into the Horizon UI. It shows up, just not quite as cleanly as I'd like. Currently, it shows up within a PanelGroup called "Other", at the bottom of the Project's PanelGroups (Compute, Network, Object Store, Orchestration, Database, Other). I'd like to have the entry for my app/set of panels to occur via a PanelGroup within the existing Project dashboard, like so:

Project --> (Compute, Network, Object Store, Orchestration, Database, <my app="" name="">)

I've traced this to the way that Horizon dynamically builds the user interface when there is an app getting injected into the environment (ie: the tutorial noted above). In horizon -> horizon -> base.py, inside get_panel_groups(), it "gathers known panels", then "Deal with leftovers (such as add-on registrations)". This second section of code ("Deal with left overs... ") puts my panel into a PanelGroup called "Other". So this is with intent.

I know I can modify Horizon directly and get this to work; I'd prefer doing it indirectly if at all possible. More maintainable.

So my questions are:

1) Is there a reason behind this strategy of the "Other" PanelGroup? 2) Is there a way to do what I'm trying to do in my app? 3) If so, how?

Thanks in advance!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2014-07-30 12:06:19 -0500

wchrisjohnson gravatar image

updated 2014-07-30 13:56:18 -0500

smaffulli gravatar image

It appears that the preferred approach to this sort of integration is to avoid the overrides.py file in favor of a newer (since Icehouse) plugin based strategy:

I symlinked two files into Horizon here: Horizon -> openstack_dashboard -> local -> enabled

The files were named "_80_add_panel_group.py" and "_90_add_panel.py", and they followed the instructions/examples above. I removed my overrides file in my app and restarted the web server and it worked on the first try.

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-07-30 00:52:31 -0500

Seen: 625 times

Last updated: Jul 30 '14