update "DROPDOWN_MAX_ITEMS" horizon parameter as a variable

"DROPDOWN_MAX_ITEMS" horizon parameter was hardcoded in a ruby
template. Hence, it was not possible to manage it using heat.
This fix will allow user to manage "DROPDOWN_MAX_ITEMS" from
heat template.

Change-Id: I121a4ad2070cfef173c572a3d25788abbbf16989
Closes-Bug: #1813786
(cherry picked from commit 004142d577)
This commit is contained in:
Pratik Bandarkar 2019-01-29 16:39:16 +00:00 committed by Radomir Dopieralski
parent 393fbf1636
commit 83b6d1b325
4 changed files with 15 additions and 1 deletions

View File

@ -84,6 +84,10 @@
# (optional) Maximum number of Swift containers/objects to display
# on a single page. Defaults to 1000.
#
# [*dropdown_max_items*]
# (optional) Specify a maximum number of items to display in a dropdown.
# Defaults to 30
#
# [*log_handler*]
# (optional) Log handler. Defaults to 'file'
#
@ -480,6 +484,7 @@ class horizon(
$secondary_endpoint_type = undef,
$available_regions = undef,
$api_result_limit = 1000,
$dropdown_max_items = 30,
$log_handler = 'file',
$log_level = 'INFO',
$help_url = 'http://docs.openstack.org',

View File

@ -0,0 +1,6 @@
---
features:
- |
Added new horizon::dropdown_max_items parameter that configures the
DROPDOWN_MAX_ITEMS config option in local_settings.py. Default value
is set to 30 like the Horizon default is.

View File

@ -76,6 +76,7 @@ describe 'horizon' do
" 'enable_security_group': True,",
" 'enable_vpn': False,",
'API_RESULT_LIMIT = 1000',
'DROPDOWN_MAX_ITEMS = 30',
'TIME_ZONE = "UTC"',
'COMPRESS_OFFLINE = True',
"FILE_UPLOAD_TEMP_DIR = '/tmp'",
@ -110,6 +111,7 @@ describe 'horizon' do
:secondary_endpoint_type => 'ANY-VALUE',
:django_debug => true,
:api_result_limit => 4682,
:dropdown_max_items => 123,
:compress_offline => false,
:hypervisor_options => {'can_set_mount_point' => false, 'can_set_password' => true },
:cinder_options => {'enable_backup' => true },
@ -196,6 +198,7 @@ describe 'horizon' do
'OPENSTACK_ENDPOINT_TYPE = "internalURL"',
'SECONDARY_ENDPOINT_TYPE = "ANY-VALUE"',
'API_RESULT_LIMIT = 4682',
'DROPDOWN_MAX_ITEMS = 123',
'TIME_ZONE = "Asia/Shanghai"',
"AVAILABLE_THEMES = [",
" ('default', 'Default', 'themes/default'),",

View File

@ -564,7 +564,7 @@ API_RESULT_PAGE_SIZE = 20
#SWIFT_FILE_TRANSFER_CHUNK_SIZE = 512 * 1024
# Specify a maximum number of items to display in a dropdown.
#DROPDOWN_MAX_ITEMS = 30
DROPDOWN_MAX_ITEMS = <%= @dropdown_max_items %>
# The timezone of the server. This should correspond with the timezone
# of your entire OpenStack installation, and hopefully be in UTC.