Add support for Horizon customization module
Allow the deployer to specify a customization module to be uploaded and configured in Horizon. The process is outlined here in the Horizon documentation: http://docs.openstack.org/developer/horizon/topics/customizing.html#horizon-customization-module-overrides Change-Id: Ie638c826abe43f1f484f16e60b90fbe25c684c6e
This commit is contained in:
parent
0b35d1c180
commit
1f52acc1c3
@ -142,6 +142,10 @@ horizon_swift_file_transfer_chunk_size: 524288
|
||||
## Panel
|
||||
horizon_default_panel: overview
|
||||
|
||||
## Customization module
|
||||
## See http://docs.openstack.org/developer/horizon/topics/customizing.html#horizon-customization-module-overrides
|
||||
# horizon_customization_module: /local/path/to/customization_module.py
|
||||
|
||||
horizon_webroot: /
|
||||
|
||||
horizon_listen_ports:
|
||||
|
@ -92,3 +92,26 @@
|
||||
tags:
|
||||
- horizon-configs
|
||||
- horizon-wsgi-venv
|
||||
|
||||
- name: Create customization module directory
|
||||
file:
|
||||
path: "{{ horizon_lib_dir }}/horizon_customization"
|
||||
state: directory
|
||||
owner: "{{ horizon_system_user_name }}"
|
||||
group: "{{ horizon_system_group_name }}"
|
||||
mode: "0755"
|
||||
when: horizon_customization_module is defined
|
||||
tags:
|
||||
- horizon-configs
|
||||
|
||||
- name: Drop horizon customization module
|
||||
template:
|
||||
src: "{{ horizon_customization_module }}"
|
||||
dest: "{{ horizon_lib_dir }}/horizon_customization/__init__.py"
|
||||
owner: "{{ horizon_system_user_name }}"
|
||||
group: "{{ horizon_system_group_name }}"
|
||||
mode: "0644"
|
||||
notify: Restart apache2
|
||||
when: horizon_customization_module is defined
|
||||
tags:
|
||||
- horizon-configs
|
||||
|
@ -715,3 +715,8 @@ REST_API_REQUIRED_SETTINGS = ['OPENSTACK_HYPERVISOR_FEATURES']
|
||||
{% if horizon_site_name is defined %}
|
||||
SITE_BRANDING = '{{ horizon_site_name }}'
|
||||
{% endif %}
|
||||
|
||||
{% if horizon_customization_module is defined %}
|
||||
#custom python module with horizon dashboard theme overrides
|
||||
HORIZON_CONFIG["customization_module"] = 'horizon_customization.overrides'
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user