Hi Timur, You have correctly analyzed the current behavior. And it is confusing. In our implementation, we have implemented a user_home method that uses the "default_dashboard" to give the user a default dashboard.
Now the question is of course, should that be the default behavior for Horizon. I would argue yes. The default behavior will need to change, if the upcoming Information Architecture proposals yield changes as I expect them to. But there's no reason we couldn't fix this behavior now. David > From: Timur Sufiev [mailto:[email protected]] > Sent: Friday, October 25, 2013 11:12 AM > To: [email protected] > Cc: Ekaterina Fedorova > Subject: [Openstack] [horizon] Weird behaviour of 'user_home' and > 'default_dashboard" paramenters in HORIZON_CONFIG > > 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 _______________________________________________ Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack Post to : [email protected] Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
