[Openstack] [horizon] Weird behaviour of 'user_home' and 'default_dashboard" paramenters in HORIZON_CONFIG

Timur Sufiev tsufiev at mirantis.com
Fri Oct 25 17:11:41 UTC 2013


Hello there!

So I specify following config lines:

HORIZON_CONFIG['default_dashboard'] = 'murano'
HORIZON_CONFIG['user_home'] = 'muranodashboard.views.get_user_home'
HORIZON_CONFIG['dashboards'] += ('murano',)

where get_user_home function is defined in muranodashboard/views.py:
def get_user_home(user):
    return horizon.get_dashboard('murano').get_absolute_url()

and 'muranodashboard' itself is in the INSTALLED_APPS tuple.

With all these things set I expect Horizon to show me Murano dashboard when
I login to it, but instead it shows me the 'Admin' dashboard as usual. I've
a bit of debugging and it seems that get_user_home from
/usr/share/openstack-dashboard/openstack_dashboard/views.py is called
(Horizon installed on Ubuntu).

I'm not quite sure whether it's a bug or something I haven't fully
understood. What exactly I do not understand is:
1) how do I call my own get_user_home function?
2) in case 'user_home' works ok, why do need 'default_dashboard" parameter
(that, in my opinion, does roughly the same)?

Thanks in advance!

-- 
Timur Sufiev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20131025/e8e34f5a/attachment.html>


More information about the Openstack mailing list