Make DROPDOWN_MAX_ITEMS configurable
This change implements a new option dropdown-max-items, that sets the DROPDOWN_MAX_ITEMS of horizon. Change-Id: I2ac03b406cc8b787424747c0bfeeedffd7712c9f
This commit is contained in:
parent
0edeceb80a
commit
fd9fe98536
|
@ -165,6 +165,12 @@ options:
|
|||
description: |
|
||||
Secret for Horizon to use when securing internal data; set this when
|
||||
using multiple dashboard units.
|
||||
dropdown-max-items:
|
||||
type: int
|
||||
default: 30
|
||||
description: |
|
||||
Max dropdown items to show in dropdown controls.
|
||||
NOTE: This setting is supported >= OpenStack Liberty.
|
||||
profile:
|
||||
type: string
|
||||
default:
|
||||
|
|
|
@ -205,7 +205,8 @@ class HorizonContext(OSContextGenerator):
|
|||
'image_formats': config('image-formats'),
|
||||
'api_result_limit': config('api-result-limit') or 1000,
|
||||
'enable_fip_topology_check': config('enable-fip-topology-check'),
|
||||
'session_timeout': config('session-timeout')
|
||||
'session_timeout': config('session-timeout'),
|
||||
'dropdown_max_items': config('dropdown-max-items')
|
||||
}
|
||||
|
||||
return ctxt
|
||||
|
|
|
@ -351,7 +351,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.
|
||||
|
|
|
@ -431,7 +431,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.
|
||||
|
|
|
@ -466,7 +466,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.
|
||||
|
|
|
@ -469,7 +469,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.
|
||||
|
|
|
@ -165,6 +165,7 @@ class TestHorizonContexts(CharmTestCase):
|
|||
"api_result_limit": 1000,
|
||||
"enable_fip_topology_check": True,
|
||||
"session_timeout": 3600,
|
||||
"dropdown_max_items": 30,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -194,6 +195,7 @@ class TestHorizonContexts(CharmTestCase):
|
|||
"api_result_limit": 1000,
|
||||
"enable_fip_topology_check": True,
|
||||
"session_timeout": 3600,
|
||||
"dropdown_max_items": 30,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -223,6 +225,7 @@ class TestHorizonContexts(CharmTestCase):
|
|||
"api_result_limit": 1000,
|
||||
"enable_fip_topology_check": True,
|
||||
"session_timeout": 3600,
|
||||
"dropdown_max_items": 30,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -252,6 +255,7 @@ class TestHorizonContexts(CharmTestCase):
|
|||
"api_result_limit": 1000,
|
||||
"enable_fip_topology_check": True,
|
||||
"session_timeout": 3600,
|
||||
"dropdown_max_items": 30,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -282,6 +286,7 @@ class TestHorizonContexts(CharmTestCase):
|
|||
"api_result_limit": 1000,
|
||||
"enable_fip_topology_check": True,
|
||||
"session_timeout": 3600,
|
||||
"dropdown_max_items": 30,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -315,6 +320,7 @@ class TestHorizonContexts(CharmTestCase):
|
|||
"api_result_limit": 1000,
|
||||
"enable_fip_topology_check": True,
|
||||
"session_timeout": 3600,
|
||||
"dropdown_max_items": 30,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -344,6 +350,7 @@ class TestHorizonContexts(CharmTestCase):
|
|||
"api_result_limit": 1000,
|
||||
"enable_fip_topology_check": True,
|
||||
"session_timeout": 3600,
|
||||
"dropdown_max_items": 30,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -373,6 +380,7 @@ class TestHorizonContexts(CharmTestCase):
|
|||
"api_result_limit": 1000,
|
||||
"enable_fip_topology_check": True,
|
||||
"session_timeout": 3600,
|
||||
"dropdown_max_items": 30,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -407,6 +415,7 @@ class TestHorizonContexts(CharmTestCase):
|
|||
"api_result_limit": 1000,
|
||||
"enable_fip_topology_check": True,
|
||||
"session_timeout": 3600,
|
||||
"dropdown_max_items": 30,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -436,6 +445,7 @@ class TestHorizonContexts(CharmTestCase):
|
|||
"api_result_limit": 1000,
|
||||
"enable_fip_topology_check": True,
|
||||
"session_timeout": 3600,
|
||||
"dropdown_max_items": 30,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -465,6 +475,7 @@ class TestHorizonContexts(CharmTestCase):
|
|||
"api_result_limit": 1000,
|
||||
"enable_fip_topology_check": True,
|
||||
"session_timeout": 3600,
|
||||
"dropdown_max_items": 30,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -495,6 +506,7 @@ class TestHorizonContexts(CharmTestCase):
|
|||
"api_result_limit": 1000,
|
||||
"enable_fip_topology_check": True,
|
||||
"session_timeout": 3600,
|
||||
"dropdown_max_items": 30,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -525,6 +537,7 @@ class TestHorizonContexts(CharmTestCase):
|
|||
"api_result_limit": 1000,
|
||||
"enable_fip_topology_check": True,
|
||||
"session_timeout": 3600,
|
||||
"dropdown_max_items": 30,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -555,6 +568,7 @@ class TestHorizonContexts(CharmTestCase):
|
|||
"api_result_limit": 1000,
|
||||
"enable_fip_topology_check": True,
|
||||
"session_timeout": 3600,
|
||||
"dropdown_max_items": 30,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -585,6 +599,7 @@ class TestHorizonContexts(CharmTestCase):
|
|||
"api_result_limit": 1000,
|
||||
"enable_fip_topology_check": False,
|
||||
"session_timeout": 3600,
|
||||
"dropdown_max_items": 30,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue