add CUSTOM_THEME_PATH variable for horizon

CUSTOM_THEME_PATH - set to 'static/themes/webroot'
 upstream change-id: I5fa9e232427f9e3bef4662b01421b5dbbcaefeed

Related-Bug: #1478937
Related-Bug: #1478567

Change-Id: I53a5623a6139443b1122f21f5b18ff016ba19e5c
This commit is contained in:
vsaienko 2015-08-04 18:31:18 +03:00 committed by Vasyl Saienko
parent 1851b4dff7
commit 3b081f4553
5 changed files with 21 additions and 1 deletions

View File

@ -212,6 +212,10 @@
# (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 undefined
#
# === Examples
#
# class { 'horizon':
@ -265,6 +269,7 @@ 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,
# DEPRECATED PARAMETERS
$can_set_mount_point = undef,
$vhost_extra_params = undef,

View File

@ -101,7 +101,8 @@ describe 'horizon' do
:neutron_options => {'enable_lb' => true, 'enable_firewall' => true, 'enable_quotas' => false, 'enable_security_group' => false, 'enable_vpn' => true,
'enable_distributed_router' => false, 'enable_ha_router' => false, 'profile_support' => 'cisco', },
:file_upload_temp_dir => '/var/spool/horizon',
:secure_cookies => true
:secure_cookies => true,
:custom_theme_path => 'static/themes/green'
})
end
@ -132,6 +133,7 @@ describe 'horizon' do
'OPENSTACK_ENDPOINT_TYPE = "internalURL"',
'SECONDARY_ENDPOINT_TYPE = "ANY-VALUE"',
'API_RESULT_LIMIT = 4682',
"CUSTOM_THEME_PATH = 'static/themes/green'",
" 'level': 'DEBUG',",
" 'handlers': ['syslog'],",
'COMPRESS_OFFLINE = False',

View File

@ -284,6 +284,16 @@ EXTERNAL_MONITORING = <%= @horizon_app_links %>
# 'reverse': False,
# }
# CUSTOM_THEME_PATH allows to set to the directory location for the
# theme (e.g., "static/themes/blue"). The path can either be
# relative to the openstack_dashboard directory or an absolute path
# to an accessible location on the file system.
# If not specified, the default CUSTOM_THEME_PATH is
# static/themes/default.
<% if @custom_theme_path %>
CUSTOM_THEME_PATH = '<%= @custom_theme_path %>'
<% end %>
# The Horizon Policy Enforcement engine uses these values to load per service
# policy rule files. The content of these files should match the files the
# OpenStack services are using to determine role based access control in the

View File

@ -43,6 +43,7 @@ class openstack::horizon (
$cache_backend = undef,
$cache_options = undef,
$log_handler = 'file',
$custom_theme_path = undef,
) {
if $debug { #syslog and nondebug case
@ -87,6 +88,7 @@ class openstack::horizon (
secure_cookies => false,
log_handler => $log_handler,
neutron_options => $neutron_options,
custom_theme_path => $custom_theme_path,
}
# Performance optimization for wsgi

View File

@ -44,6 +44,7 @@ class { 'openstack::horizon':
nova_quota => hiera('nova_quota'),
servername => hiera('public_vip'),
neutron_options => $neutron_options,
custom_theme_path => 'static/themes/webroot'
}
include ::tweaks::apache_wrappers