diff --git a/config.yaml b/config.yaml index 6cd83fcb..310ac460 100644 --- a/config.yaml +++ b/config.yaml @@ -74,3 +74,7 @@ options: type: string default: "no" description: Show Django debug messages. + ubuntu-theme: + type: string + default: "yes" + description: Use Ubuntu theme for the dashboard. diff --git a/hooks/horizon-common b/hooks/horizon-common index 116a05ee..e4f9d87a 100644 --- a/hooks/horizon-common +++ b/hooks/horizon-common @@ -3,7 +3,7 @@ CHARM="openstack-dashboard" -PACKAGES="openstack-dashboard openstack-dashboard-ubuntu-theme python-keystoneclient python-memcache memcached haproxy" +PACKAGES="openstack-dashboard python-keystoneclient python-memcache memcached haproxy" LOCAL_SETTINGS="/etc/openstack-dashboard/local_settings.py" if [[ -e "$CHARM_DIR/lib/openstack-common" ]] ; then diff --git a/hooks/horizon-relations b/hooks/horizon-relations index 745869d1..382e350f 100755 --- a/hooks/horizon-relations +++ b/hooks/horizon-relations @@ -120,6 +120,12 @@ function config_changed { set_or_update DEBUG True fi + if [ "$(config-get ubuntu-theme)" != "yes" ]; then + apt-get purge openstack-dashboard-ubuntu-theme || : + else + apt-get install openstack-dashboard-ubuntu-theme + fi + # Reconfigure Apache Ports configure_apache "80:70" "443:433" service apache2 restart