Bug 911888

Summary: Create mechanism for allowing Horizon to have a custom theme/skin applied to it
Product: Red Hat OpenStack Reporter: Perry Myers <pmyers>
Component: python-django-horizonAssignee: Matthias Runge <mrunge>
Status: CLOSED ERRATA QA Contact: Nir Magnezi <nmagnezi>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.0 (Folsom)CC: acathrow, ajeain, aortega, jpichon, markmc, mlopes, mrunge, sgordon
Target Milestone: Upstream M3Keywords: FutureFeature, OtherQA, Triaged
Target Release: 4.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python-django-horizon-2013.2-0.12b3.el6ost Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-19 23:57:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 975499    

Description Perry Myers 2013-02-16 13:06:46 UTC
Create mechanism for allowing Horizon to have a custom theme/skin applied to it

Comment 1 Perry Myers 2013-02-16 13:10:05 UTC
Info on how this can be done from mrunge:
http://www.matthias-runge.de/2013/02/15/how-to-create-a-custom-theme-for-horizon/

Comment 5 Andrew Cathrow 2013-07-11 21:17:44 UTC
Perry - thoughts on this for 4.0?

Comment 6 Perry Myers 2013-07-11 21:32:53 UTC
mrunge, can we get this upstream in Havana to get into RHOS 4.0?

Comment 7 Matthias Runge 2013-07-23 09:13:47 UTC
Back in February, I've made a proof of concept, which requires patching of settings.py. 

I also proposed it upstream, which was denied., because it's basically there.


The whole commit can be found here https://github.com/mrunge/horizon/commit/40cfc4e610c932235aad570eba07c7ebbee135ca

Thaking the patch and a some enhancement for the spec:
%package -n openstack-dashboard-rhos
Summary:    Openstack web user interface reference implementation for RHOS
Requires:   openstack-dashboard = %{version}

%description -n openstack-dashboard-rhos
RHOS customization module for OpenStack Dashboard
.....
%files -n openstack-dashboard-rhos
%{_datadir}/openstack-dashboard/openstack_dashboard_theme
%{_datadir}/openstack-dashboard/static/dashboard/less/rhtheme.less
%{_datadir}/openstack-dashboard/static/dashboard/img/rh-logo.png
%{_datadir}/openstack-dashboard/static/dashboard/img/rhfavicon.ico

and we're basically there. Still, it was not accepted upstream, so we'd need to carry that in our code-base.

Comment 8 Matthias Runge 2013-09-03 13:46:40 UTC
Build: python-django-horizon-2013.2-0.8b2.fc21
to be used for the RHOS build and also to be used for RDO builds. Currently, they differ through the different logos.

How to test: 
install 
openstack-dashboard
openstack-dashboard-custom

Then you should see the RHOS logo at login and also on the left upper corner on the screen, when logged in. The favicon is changed to the shadowman.

yum remove openstack-dashboard-custom
systemctl restart httpd
should give you a fully functional dashboard as well, but with upstream logos, and no Red Hat specific favicon.

Comment 10 Julie Pichon 2013-11-27 14:54:37 UTC
From what I understand, there's no code change to sanity check, and it's possible to verify simply by checking that the shadowman logo is displayed since it is installed using the openstack-dashboard-theme package (rather than carrying patches on our side). Am I correct? Because of the dependencies I seem unable to simply remove openstack-dashboard-theme to check on my assumptions. Thanks!

Comment 11 Matthias Runge 2013-11-28 07:24:14 UTC
Julie, there's a little change in settings.py (to include, what's in openstack_dashboard_theme).

you should be able to remove the Red Hat theme using:
rpm -e --nodeps openstack-dashboard-theme

In general, you're right. This is about package organization, and nothing really for the end user.

Comment 13 Nir Magnezi 2013-12-04 13:13:43 UTC
Verified NVR: 
python-django-horizon-2013.2-5.el6ost.noarch / 
openstack-dashboard-theme-2013.2-5.el6ost.noarch

As Julie already tested: the redhat logo is displayed only when the openstack-dashboard-theme is installed.

Comment 15 Matthias Runge 2013-12-09 21:32:16 UTC
as already stated in comment 11, this change is internal and mostly packaging related.

Comment 17 errata-xmlrpc 2013-12-19 23:57:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2013-1859.html