Browse Source

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)
changes/29/722929/1
Pratik Bandarkar 1 year ago
committed by Radomir Dopieralski
parent
commit
c399a6a5ce
4 changed files with 15 additions and 1 deletions
  1. +5
    -0
      manifests/init.pp
  2. +6
    -0
      releasenotes/notes/add-dropdown_max_items-38ea8e64152d76e5.yaml
  3. +3
    -0
      spec/classes/horizon_init_spec.rb
  4. +1
    -1
      templates/local_settings.py.erb

+ 5
- 0
manifests/init.pp 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'
#
@@ -478,6 +482,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',


+ 6
- 0
releasenotes/notes/add-dropdown_max_items-38ea8e64152d76e5.yaml 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.

+ 3
- 0
spec/classes/horizon_init_spec.rb 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 },
@@ -198,6 +200,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'),",


+ 1
- 1
templates/local_settings.py.erb View File

@@ -590,7 +590,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.


Loading…
Cancel
Save