Support customizing HORIZON_CONFIG['bug_url']
Change-Id: I912f7c7d9e7547e0d77b5af9b15492b439f1635c
This commit is contained in:
parent
ba749e09d5
commit
ead7aabb85
|
@ -158,6 +158,11 @@
|
||||||
# (optional) Location where the documentation should point.
|
# (optional) Location where the documentation should point.
|
||||||
# Defaults to undef
|
# Defaults to undef
|
||||||
#
|
#
|
||||||
|
# [*bug_url*]
|
||||||
|
# (optional) If provided, a "Report Bug" link will be displayed in the site
|
||||||
|
# header which links to the value of this setting.
|
||||||
|
# Defaults to undef
|
||||||
|
#
|
||||||
# [*compress_offline*]
|
# [*compress_offline*]
|
||||||
# (optional) Boolean to enable offline compress of assets.
|
# (optional) Boolean to enable offline compress of assets.
|
||||||
# Defaults to True
|
# Defaults to True
|
||||||
|
@ -589,6 +594,7 @@ class horizon(
|
||||||
$django_template_log_level = 'INFO',
|
$django_template_log_level = 'INFO',
|
||||||
$syslog_facility = 'local1',
|
$syslog_facility = 'local1',
|
||||||
$help_url = undef,
|
$help_url = undef,
|
||||||
|
$bug_url = undef,
|
||||||
$local_settings_template = 'horizon/local_settings.py.erb',
|
$local_settings_template = 'horizon/local_settings.py.erb',
|
||||||
$configure_apache = true,
|
$configure_apache = true,
|
||||||
$bind_address = undef,
|
$bind_address = undef,
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The new ``horizon::bug_url`` parameter has been added.
|
|
@ -683,17 +683,19 @@ describe 'horizon' do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with help_url and customization_module provided' do
|
context 'with help_url, bug_url and customization_module provided' do
|
||||||
before do
|
before do
|
||||||
params.merge!({
|
params.merge!({
|
||||||
:help_url => 'https://docs.openstack.org',
|
:help_url => 'https://docs.openstack.org',
|
||||||
|
:bug_url => 'https://bugs.launchpad.net',
|
||||||
:customization_module => 'my_project.overrides',
|
:customization_module => 'my_project.overrides',
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'configures both options' do
|
it 'configures all options' do
|
||||||
verify_concat_fragment_contents(catalogue, 'local_settings.py', [
|
verify_concat_fragment_contents(catalogue, 'local_settings.py', [
|
||||||
'HORIZON_CONFIG["help_url"] = "https://docs.openstack.org"',
|
'HORIZON_CONFIG["help_url"] = "https://docs.openstack.org"',
|
||||||
|
'HORIZON_CONFIG["bug_url"] = "https://bugs.launchpad.net"',
|
||||||
'HORIZON_CONFIG["customization_module"] = "my_project.overrides"',
|
'HORIZON_CONFIG["customization_module"] = "my_project.overrides"',
|
||||||
])
|
])
|
||||||
end
|
end
|
||||||
|
|
|
@ -142,6 +142,9 @@ HORIZON_CONFIG["customization_module"] = "<%= @customization_module -%>"
|
||||||
# which links to the value of this setting (ideally a URL containing
|
# which links to the value of this setting (ideally a URL containing
|
||||||
# information on how to report issues).
|
# information on how to report issues).
|
||||||
#HORIZON_CONFIG["bug_url"] = "http://bug-report.example.com"
|
#HORIZON_CONFIG["bug_url"] = "http://bug-report.example.com"
|
||||||
|
<% if @bug_url -%>
|
||||||
|
HORIZON_CONFIG["bug_url"] = "<%= @bug_url %>"
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
# Show backdrop element outside the modal, do not close the modal
|
# Show backdrop element outside the modal, do not close the modal
|
||||||
# after clicking on backdrop.
|
# after clicking on backdrop.
|
||||||
|
|
Loading…
Reference in New Issue