diff --git a/manifests/init.pp b/manifests/init.pp index a5ac1657..a612a066 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -88,6 +88,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' # @@ -475,6 +479,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', diff --git a/releasenotes/notes/add-dropdown_max_items-38ea8e64152d76e5.yaml b/releasenotes/notes/add-dropdown_max_items-38ea8e64152d76e5.yaml new file mode 100644 index 00000000..2d7894d3 --- /dev/null +++ b/releasenotes/notes/add-dropdown_max_items-38ea8e64152d76e5.yaml @@ -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. diff --git a/spec/classes/horizon_init_spec.rb b/spec/classes/horizon_init_spec.rb index 72e2a78b..d6f6cf81 100644 --- a/spec/classes/horizon_init_spec.rb +++ b/spec/classes/horizon_init_spec.rb @@ -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'", @@ -111,6 +112,7 @@ describe 'horizon' do :django_debug => true, :site_branding => 'mysite', :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'),", diff --git a/templates/local_settings.py.erb b/templates/local_settings.py.erb index a3defc96..f40f0c76 100644 --- a/templates/local_settings.py.erb +++ b/templates/local_settings.py.erb @@ -585,7 +585,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.