Adds COMPRESS_OFFLINE option to local_settings

The Ubuntu Havana packages includes pre-compressed
assets and does not install a package that provides
lesscpy.

This re-adds COMPRESS_OFFLINE=True to utilize this
and avoid a broken Horizon install on Ubuntu.

Change-Id: I6671938a87744a4dd0b84021ca87cd49aea10741
Closes-Bug: #1272441
This commit is contained in:
Kevin Benton
2014-01-24 09:41:42 -08:00
parent 314df2136e
commit 7213ea5388
3 changed files with 16 additions and 3 deletions

View File

@@ -82,6 +82,10 @@
# [*help_url*]
# (optional) Location where the documentation should point.
# Defaults to 'http://docs.openstack.org'.
#
# [*compress_offline*]
# (optional) Boolean to enable offline compress of assets.
# Defaults to True
class horizon(
$secret_key,
@@ -108,7 +112,8 @@ class horizon(
$horizon_key = undef,
$horizon_ca = undef,
$help_url = 'http://docs.openstack.org',
$local_settings_template = 'horizon/local_settings.py.erb'
$local_settings_template = 'horizon/local_settings.py.erb',
$compress_offline = 'True'
) {
include horizon::params

View File

@@ -83,7 +83,8 @@ describe 'horizon' do
'API_RESULT_LIMIT = 1000',
"LOGIN_URL = '/horizon/auth/login/'",
"LOGOUT_URL = '/horizon/auth/logout/'",
"LOGIN_REDIRECT_URL = '/horizon'"
"LOGIN_REDIRECT_URL = '/horizon'",
'COMPRESS_OFFLINE = True'
])
end
end
@@ -100,6 +101,7 @@ describe 'horizon' do
:django_debug => true,
:api_result_limit => 4682,
:can_set_mount_point => false,
:compress_offline => 'False',
})
end
@@ -112,7 +114,8 @@ describe 'horizon' do
'OPENSTACK_KEYSTONE_URL = "https://%s:4682/v2.0" % OPENSTACK_HOST',
'OPENSTACK_KEYSTONE_DEFAULT_ROLE = "SwiftOperator"',
" 'can_set_mount_point': False,",
'API_RESULT_LIMIT = 4682'
'API_RESULT_LIMIT = 4682',
'COMPRESS_OFFLINE = False'
])
end
end

View File

@@ -526,3 +526,8 @@ SECURITY_GROUP_RULES = {
LOGIN_URL = '<%= scope.lookupvar("horizon::params::root_url") %>/auth/login/'
LOGOUT_URL = '<%= scope.lookupvar("horizon::params::root_url") %>/auth/logout/'
LOGIN_REDIRECT_URL = '<%= scope.lookupvar("horizon::params::root_url") %>'
# The Ubuntu package includes pre-compressed JS and compiled CSS to allow
# offline compression by default. To enable online compression, install
# the python-lesscpy package and disable the following option.
COMPRESS_OFFLINE = <%= @compress_offline.to_s.capitalize %>