Add heat dashboard if available to horizon

Currently there is no enabling of the heat dashboard if its
installed on the horizon image.

This patch add an extra conf var that allows several dashboards
to be added and will try to find and enable them on start

If the panel dirs dont exists, it will do nothing

This patch add the extra heat_dashboard and includes the existing
neutron_taas_dashboard into the new config

Change-Id: Ibcc4da166d907f3cb842bfc45d842a650361a2d8
This commit is contained in:
Itxaka 2019-03-22 12:45:25 +01:00 committed by Chris Wedgwood
parent a187084bdd
commit 55f70be381
2 changed files with 18 additions and 4 deletions

View File

@ -46,11 +46,17 @@ function start () {
rm -rf /var/run/apache2/*
APACHE_DIR="apache2"
# Add TaaS dashboard panel if available
TAAS_PANEL="${SITE_PACKAGES_ROOT}/neutron_taas_dashboard/enabled/_90_project_tapservices_panel.py"
if [ -f ${TAAS_PANEL} ]; then
ln -s ${TAAS_PANEL} ${SITE_PACKAGES_ROOT}/openstack_dashboard/local/enabled/_90_project_tapservices_panel.py
# Add extra panels if available
{{- range .Values.conf.horizon.extra_panels }}
PANEL_DIR="${SITE_PACKAGES_ROOT}/{{ . }}/enabled"
if [ -d ${PANEL_DIR} ];then
for panel in `ls -1 ${PANEL_DIR}/_[1-9]*.py`
do
ln -s ${panel} ${SITE_PACKAGES_ROOT}/openstack_dashboard/local/enabled/$(basename ${panel})
done
fi
unset PANEL_DIR
{{- end }}
# If the image has support for it, compile the translations
if type -p gettext >/dev/null 2>/dev/null; then

View File

@ -1952,6 +1952,14 @@ conf:
'os_compute_api:servers:stop': 'rule:admin_or_owner'
'os_compute_api:servers:trigger_crash_dump': 'rule:admin_or_owner'
'os_compute_api:servers:update': 'rule:admin_or_owner'
# list of panels to enable for horizon
# this requires that the panels are already installed in the horizon image, if they are not
# nothing will be added
# the name of the panel should be the name of the dir where the panel is installed
# for example heat_dashboard, cloudkittydashboard or neutron_taas_dashboard
extra_panels:
- heat_dashboard
- neutron_taas_dashboard
dependencies:
dynamic: