Merge "Add support for custom Horizon themes"
This commit is contained in:
commit
7a0b2665fe
@ -154,6 +154,44 @@ horizon_default_panel: overview
|
||||
## See http://docs.openstack.org/developer/horizon/topics/customizing.html#horizon-customization-module-overrides
|
||||
# horizon_customization_module: /local/path/to/customization_module.py
|
||||
|
||||
## Replace default theme files with your own
|
||||
# horizon_custom_uploads:
|
||||
# logo:
|
||||
# src: "path_on_deployment_host_of_your_custom_logo.png"
|
||||
# dest: "img/logo.png"
|
||||
# logo_splash:
|
||||
# src: "path_on_deployment_host_of_your_custom_logo-splash.png"
|
||||
# dest: "img/logo-splash.png"
|
||||
|
||||
_horizon_available_themes:
|
||||
default:
|
||||
theme_name: "default"
|
||||
theme_label: "Default"
|
||||
theme_path: "themes/default"
|
||||
material:
|
||||
theme_name: "material"
|
||||
theme_label: "Material"
|
||||
theme_path: "themes/material"
|
||||
|
||||
# Add custom themes. Deployers need to place the theme directories
|
||||
# and files on the horizon containers in:
|
||||
# {{ horizon_lib_dir }}/openstack_dashboard/themes
|
||||
# See http://docs.openstack.org/developer/horizon/topics/customizing.html#themes
|
||||
# for more details on custom themes
|
||||
# Example:
|
||||
#
|
||||
# horizon_custom_themes:
|
||||
# custom_theme:
|
||||
# theme_name: "custom"
|
||||
# theme_label: "Custom"
|
||||
# theme_path: "themes/custom"
|
||||
#
|
||||
horizon_custom_themes: {}
|
||||
|
||||
# Which of the available themes will be used by default
|
||||
# value is the theme_name from the vars above
|
||||
horizon_default_theme: "default"
|
||||
|
||||
horizon_webroot: /
|
||||
|
||||
horizon_listen_ports:
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
features:
|
||||
- The ``os_horizon`` role now supports configuration of custom themes.
|
||||
Deployers can use the new ``horizon_custom_themes`` and
|
||||
``horizon_default_theme`` variables to configure the dashboard with
|
||||
custom themes and default to a specific theme respectively.
|
@ -428,10 +428,6 @@ ENFORCE_PASSWORD_CHECK = {{ horizon_enforce_password_check }}
|
||||
#TROVE_ADD_USER_PERMS = []
|
||||
#TROVE_ADD_DATABASE_PERMS = []
|
||||
|
||||
# Change this patch to the appropriate static directory containing
|
||||
# two files: _variables.scss and _styles.scss
|
||||
#CUSTOM_THEME_PATH = 'themes/default'
|
||||
|
||||
LOGGING = {
|
||||
'version': 1,
|
||||
# When set to True this will disable all logging except
|
||||
@ -729,6 +725,16 @@ SITE_BRANDING = '{{ horizon_site_name }}'
|
||||
HORIZON_CONFIG["customization_module"] = 'horizon_customization.overrides'
|
||||
{% endif %}
|
||||
|
||||
AVAILABLE_THEMES = [
|
||||
{% for key, value in _horizon_available_themes.iteritems() %}
|
||||
('{{ value.theme_name }}', '{{ value.theme_label }}', '{{ value.theme_path }}'),
|
||||
{% endfor %}
|
||||
{% for key, value in horizon_custom_themes.iteritems() %}
|
||||
('{{ value.theme_name }}', '{{ value.theme_label }}', '{{ value.theme_path }}'),
|
||||
{% endfor %}
|
||||
]
|
||||
|
||||
DEFAULT_THEME = '{{ horizon_default_theme }}'
|
||||
|
||||
# Set arbitrary horizon configuration options
|
||||
HORIZON_CONFIG.update({{ horizon_config_overrides }})
|
||||
|
Loading…
Reference in New Issue
Block a user