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:
@@ -82,6 +82,10 @@
|
|||||||
# [*help_url*]
|
# [*help_url*]
|
||||||
# (optional) Location where the documentation should point.
|
# (optional) Location where the documentation should point.
|
||||||
# Defaults to 'http://docs.openstack.org'.
|
# Defaults to 'http://docs.openstack.org'.
|
||||||
|
#
|
||||||
|
# [*compress_offline*]
|
||||||
|
# (optional) Boolean to enable offline compress of assets.
|
||||||
|
# Defaults to True
|
||||||
|
|
||||||
class horizon(
|
class horizon(
|
||||||
$secret_key,
|
$secret_key,
|
||||||
@@ -108,7 +112,8 @@ class horizon(
|
|||||||
$horizon_key = undef,
|
$horizon_key = undef,
|
||||||
$horizon_ca = undef,
|
$horizon_ca = undef,
|
||||||
$help_url = 'http://docs.openstack.org',
|
$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
|
include horizon::params
|
||||||
|
|||||||
@@ -83,7 +83,8 @@ describe 'horizon' do
|
|||||||
'API_RESULT_LIMIT = 1000',
|
'API_RESULT_LIMIT = 1000',
|
||||||
"LOGIN_URL = '/horizon/auth/login/'",
|
"LOGIN_URL = '/horizon/auth/login/'",
|
||||||
"LOGOUT_URL = '/horizon/auth/logout/'",
|
"LOGOUT_URL = '/horizon/auth/logout/'",
|
||||||
"LOGIN_REDIRECT_URL = '/horizon'"
|
"LOGIN_REDIRECT_URL = '/horizon'",
|
||||||
|
'COMPRESS_OFFLINE = True'
|
||||||
])
|
])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -100,6 +101,7 @@ describe 'horizon' do
|
|||||||
:django_debug => true,
|
:django_debug => true,
|
||||||
:api_result_limit => 4682,
|
:api_result_limit => 4682,
|
||||||
:can_set_mount_point => false,
|
:can_set_mount_point => false,
|
||||||
|
:compress_offline => 'False',
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -112,7 +114,8 @@ describe 'horizon' do
|
|||||||
'OPENSTACK_KEYSTONE_URL = "https://%s:4682/v2.0" % OPENSTACK_HOST',
|
'OPENSTACK_KEYSTONE_URL = "https://%s:4682/v2.0" % OPENSTACK_HOST',
|
||||||
'OPENSTACK_KEYSTONE_DEFAULT_ROLE = "SwiftOperator"',
|
'OPENSTACK_KEYSTONE_DEFAULT_ROLE = "SwiftOperator"',
|
||||||
" 'can_set_mount_point': False,",
|
" 'can_set_mount_point': False,",
|
||||||
'API_RESULT_LIMIT = 4682'
|
'API_RESULT_LIMIT = 4682',
|
||||||
|
'COMPRESS_OFFLINE = False'
|
||||||
])
|
])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -526,3 +526,8 @@ SECURITY_GROUP_RULES = {
|
|||||||
LOGIN_URL = '<%= scope.lookupvar("horizon::params::root_url") %>/auth/login/'
|
LOGIN_URL = '<%= scope.lookupvar("horizon::params::root_url") %>/auth/login/'
|
||||||
LOGOUT_URL = '<%= scope.lookupvar("horizon::params::root_url") %>/auth/logout/'
|
LOGOUT_URL = '<%= scope.lookupvar("horizon::params::root_url") %>/auth/logout/'
|
||||||
LOGIN_REDIRECT_URL = '<%= scope.lookupvar("horizon::params::root_url") %>'
|
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 %>
|
||||||
|
|||||||
Reference in New Issue
Block a user