<div dir="ltr">Hello, David<div><br></div><div>Thanks for your quick response. Changing the default behaviour of Horizon is fine :), yet it is still unclear to me how do I force Horizon to call my custom function provided via 'user_home' config parameter. It isn't called right now ('get_user_home' function from /usr/share/openstack-dashboard/openstack_dashboard/views.py is called despite I have specified HORIZON_CONFIG['user_home'] = 'muranodashboard.views.get_user_home').</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Oct 25, 2013 at 9:43 PM, Lyle, David <span dir="ltr"><<a href="mailto:david.lyle@hp.com" target="_blank">david.lyle@hp.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Timur,<br>
<br>
You have correctly analyzed the current behavior. And it is confusing. In our implementation,<br>
we have implemented a user_home method that uses the "default_dashboard" to give the user<br>
a default dashboard.<br>
<br>
Now the question is of course, should that be the default behavior for Horizon. I would argue yes.<br>
The default behavior will need to change, if the upcoming Information Architecture proposals<br>
yield changes as I expect them to. But there's no reason we couldn't fix this behavior now.<br>
<br>
David<br>
<br>
<br>
> From: Timur Sufiev [mailto:<a href="mailto:tsufiev@mirantis.com">tsufiev@mirantis.com</a>]<br>
> Sent: Friday, October 25, 2013 11:12 AM<br>
> To: <a href="mailto:openstack@lists.openstack.org">openstack@lists.openstack.org</a><br>
> Cc: Ekaterina Fedorova<br>
> Subject: [Openstack] [horizon] Weird behaviour of 'user_home' and 'default_dashboard" paramenters in HORIZON_CONFIG<br>
<div class="HOEnZb"><div class="h5">><br>
> Hello there!<br>
><br>
> So I specify following config lines:<br>
<br>
> HORIZON_CONFIG['default_dashboard'] = 'murano'<br>
> HORIZON_CONFIG['user_home'] = 'muranodashboard.views.get_user_home'<br>
> HORIZON_CONFIG['dashboards'] += ('murano',)<br>
<br>
> where get_user_home function is defined in muranodashboard/views.py:<br>
> def get_user_home(user):<br>
> return horizon.get_dashboard('murano').get_absolute_url()<br>
><br>
> and 'muranodashboard' itself is in the INSTALLED_APPS tuple.<br>
><br>
> 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).<br>
><br>
> I'm not quite sure whether it's a bug or something I haven't fully understood. What exactly I do not understand is:<br>
> 1) how do I call my own get_user_home function?<br>
> 2) in case 'user_home' works ok, why do need 'default_dashboard" parameter (that, in my opinion, does roughly the same)?<br>
><br>
> Thanks in advance!<br>
><br>
> --<br>
> Timur Sufiev<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Timur Sufiev</div>
</div>