Stop overriding default value for some limit options

This removes the hard-coded default values for the following options
so that we can leverage the defaults defined in Horizon itself.
 - API_RESULT_LIMIT
 - API_RESULT_PAGE_SIZE
 - DROPDOWN_MAX_ITEMS

Change-Id: Id392b959ff05bba0dd75343313b2c3f956d29565
This commit is contained in:
Takashi Kajinami 2023-04-07 14:03:51 +09:00
parent 2180f17d01
commit 10e543f333
3 changed files with 13 additions and 9 deletions

View File

@ -120,15 +120,15 @@
# [*api_result_limit*]
# (optional) Maximum number of objects (Swift containers/objects or images)
# to display on a single page.
# Defaults to 1000.
# Defaults to undef.
#
# [*api_result_page_size*]
# (optional) Maximum number of objects retrieved by a single request.
# Defaults to 20.
# Defaults to undef.
#
# [*dropdown_max_items*]
# (optional) Specify a maximum number of items to display in a dropdown.
# Defaults to 30
# Defaults to undef.
#
# [*log_handlers*]
# (optional) Log handlers. Defaults to ['file']
@ -585,9 +585,9 @@ class horizon(
$secondary_endpoint_type = undef,
$openstack_keystone_endpoint_type = undef,
$available_regions = undef,
$api_result_limit = 1000,
$api_result_page_size = 20,
$dropdown_max_items = 30,
$api_result_limit = undef,
$api_result_page_size = undef,
$dropdown_max_items = undef,
$log_handlers = ['file'],
$log_level = 'INFO',
$django_log_level = undef,

View File

@ -76,9 +76,6 @@ describe 'horizon' do
" 'enable_ha_router': False,",
" 'enable_quotas': True,",
" 'enable_security_group': True,",
'API_RESULT_LIMIT = 1000',
'API_RESULT_PAGE_SIZE = 20',
'DROPDOWN_MAX_ITEMS = 30',
'TIME_ZONE = "UTC"',
" 'handlers': ['file'],",
'COMPRESS_OFFLINE = True',

View File

@ -619,14 +619,21 @@ OPENSTACK_KEYSTONE_ENDPOINT_TYPE = "<%= @openstack_keystone_endpoint_type %>"
# to paginate results.
#API_RESULT_LIMIT = 1000
#API_RESULT_PAGE_SIZE = 20
<% if !(@api_result_limit.nil?) -%>
API_RESULT_LIMIT = <%= @api_result_limit %>
<% end -%>
<% if !(@api_result_page_size.nil?) -%>
API_RESULT_PAGE_SIZE = <%= @api_result_page_size %>
<% end -%>
# The size of chunk in bytes for downloading objects from Swift
#SWIFT_FILE_TRANSFER_CHUNK_SIZE = 512 * 1024
# Specify a maximum number of items to display in a dropdown.
#DROPDOWN_MAX_ITEMS = 30
<% if !(@dropdown_max_items.nil?) -%>
DROPDOWN_MAX_ITEMS = <%= @dropdown_max_items %>
<% end -%>
# The timezone of the server. This should correspond with the timezone
# of your entire OpenStack installation, and hopefully be in UTC.