Deprecated custom theme path and added new params.
The custom theme path option has been deprecated in mitaka and two new config options are available relating to themes. The new params are available_themes and default_theme. Change-Id: Ibc95cf88da83b257493a2701467198a5833e1aca
This commit is contained in:
parent
17e69573ee
commit
50fe686241
@ -203,10 +203,6 @@
|
||||
# (optional) Tuskar-UI - Deployment mode ('poc' or 'scale')
|
||||
# Defaults to 'scale'
|
||||
#
|
||||
# [*custom_theme_path*]
|
||||
# (optional) The directory location for the theme (e.g., "static/themes/blue")
|
||||
# Default to undef
|
||||
#
|
||||
# [*redirect_type*]
|
||||
# (optional) What type of redirect to use when redirecting an http request
|
||||
# for a user. This should be either 'temp' or 'permanent'. Setting this value
|
||||
@ -258,6 +254,25 @@
|
||||
# (optional) The timezone of the server.
|
||||
# Defaults to 'UTC'.
|
||||
#
|
||||
# [*available_themes*]
|
||||
# (optional) Hash of available themes. Each hash must have the followings keys
|
||||
# for themes to be made available; name, label, path.
|
||||
# Defaults to false
|
||||
#
|
||||
# { 'name' => 'theme_name', 'label' => 'theme_label', 'path' => 'theme_path' }
|
||||
#
|
||||
# Example:
|
||||
# class { 'horizon':
|
||||
# available_themes => [
|
||||
# { 'name' => 'default', 'label' => 'Default', 'path' => 'themes/default'},
|
||||
# { 'name' => 'material', 'label' => 'Material', 'path' => 'themes/material'},
|
||||
# ]
|
||||
# }
|
||||
#
|
||||
# [*default_theme*]
|
||||
# (optional) The default theme to use from list of available themes. Value should be theme_name.
|
||||
# Defaults to false
|
||||
#
|
||||
# === DEPRECATED group/name
|
||||
#
|
||||
# [*fqdn*]
|
||||
@ -267,6 +282,10 @@
|
||||
# deemed unimportant. Also used for Server Aliases in web configs.
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*custom_theme_path*]
|
||||
# (optional) The directory location for the theme (e.g., "static/themes/blue")
|
||||
# Default to undef
|
||||
#
|
||||
# === Examples
|
||||
#
|
||||
# class { 'horizon':
|
||||
@ -319,7 +338,6 @@ class horizon(
|
||||
$tuskar_ui_ironic_discoverd_url = 'http://127.0.0.1:5050',
|
||||
$tuskar_ui_undercloud_admin_password = undef,
|
||||
$tuskar_ui_deployment_mode = 'scale',
|
||||
$custom_theme_path = undef,
|
||||
$redirect_type = 'permanent',
|
||||
$api_versions = {'identity' => '3'},
|
||||
$keystone_multidomain_support = false,
|
||||
@ -332,7 +350,10 @@ class horizon(
|
||||
$secure_cookies = false,
|
||||
$django_session_engine = undef,
|
||||
$vhost_extra_params = undef,
|
||||
$available_themes = false,
|
||||
$default_theme = false,
|
||||
# DEPRECATED PARAMETERS
|
||||
$custom_theme_path = undef,
|
||||
$fqdn = undef,
|
||||
) inherits ::horizon::params {
|
||||
|
||||
@ -350,6 +371,10 @@ class horizon(
|
||||
$final_server_aliases = $server_aliases
|
||||
}
|
||||
|
||||
if $custom_theme_path {
|
||||
warning('custom_theme_path has been deprecated in mitaka and will be removed in a future release.')
|
||||
}
|
||||
|
||||
# Default options for the OPENSTACK_CINDER_FEATURES section. These will
|
||||
# be merged with user-provided options when the local_settings.py.erb
|
||||
# template is interpolated.
|
||||
|
@ -0,0 +1,8 @@
|
||||
---
|
||||
features:
|
||||
- In mitaka release, available themes was introduced. A parameter was introduced to allow
|
||||
configuration of this setting.
|
||||
- In mitaka release, default theme was introduced where the value would be defined from
|
||||
available themes. A new parameter was introduced to allow configuration of this setting.
|
||||
deprecations:
|
||||
- custom_theme_path has been deprecated in mitaka release.
|
@ -111,13 +111,17 @@ describe 'horizon' do
|
||||
'supported_provider_types' => ['flat', 'vxlan'], 'supported_vnic_types' => ['*'], 'default_ipv4_subnet_pool_label' => 'None', },
|
||||
:file_upload_temp_dir => '/var/spool/horizon',
|
||||
:secure_cookies => true,
|
||||
:custom_theme_path => 'static/themes/green',
|
||||
:api_versions => {'identity' => 2.0},
|
||||
:keystone_multidomain_support => true,
|
||||
:keystone_default_domain => 'domain.tld',
|
||||
:overview_days_range => 1,
|
||||
:session_timeout => 1800,
|
||||
:timezone => 'Asia/Shanghai',
|
||||
:available_themes => [
|
||||
{ 'name' => 'default', 'label' => 'Default', 'path' => 'themes/default' },
|
||||
{ 'name' => 'material', 'label' => 'Material', 'path' => 'themes/material' },
|
||||
],
|
||||
:default_theme => 'default'
|
||||
})
|
||||
end
|
||||
|
||||
@ -156,7 +160,11 @@ describe 'horizon' do
|
||||
'SECONDARY_ENDPOINT_TYPE = "ANY-VALUE"',
|
||||
'API_RESULT_LIMIT = 4682',
|
||||
'TIME_ZONE = "Asia/Shanghai"',
|
||||
"CUSTOM_THEME_PATH = 'static/themes/green'",
|
||||
"AVAILABLE_THEMES = [",
|
||||
" ('default', 'Default', 'themes/default'),",
|
||||
" ('material', 'Material', 'themes/material'),",
|
||||
"]",
|
||||
"DEFAULT_THEME = 'default'",
|
||||
" 'level': 'DEBUG',",
|
||||
" 'handlers': ['syslog'],",
|
||||
"SESSION_TIMEOUT = 1800",
|
||||
|
@ -506,6 +506,18 @@ EXTERNAL_MONITORING = <%= @horizon_app_links %>
|
||||
CUSTOM_THEME_PATH = '<%= @custom_theme_path %>'
|
||||
<% end %>
|
||||
|
||||
<% if @available_themes.kind_of?(Array) %>
|
||||
AVAILABLE_THEMES = [
|
||||
<% @available_themes.each do |theme| %>
|
||||
('<%= theme['name'] %>', '<%= theme['label'] %>', '<%= theme['path'] %>'),
|
||||
<% end %>
|
||||
]
|
||||
<% end %>
|
||||
|
||||
<% if @default_theme %>
|
||||
DEFAULT_THEME = '<%= @default_theme %>'
|
||||
<% end %>
|
||||
|
||||
# Set this to True to display an 'Admin Password' field on the Change Password
|
||||
# form to verify that it is indeed the admin logged-in who wants to change
|
||||
# the password.
|
||||
|
Loading…
x
Reference in New Issue
Block a user