diff --git a/horizon/templates/bin/_horizon.sh.tpl b/horizon/templates/bin/_horizon.sh.tpl index 4dbfc0eede..000bcbfe53 100644 --- a/horizon/templates/bin/_horizon.sh.tpl +++ b/horizon/templates/bin/_horizon.sh.tpl @@ -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 diff --git a/horizon/values.yaml b/horizon/values.yaml index 8bd1dd6248..0334f61259 100644 --- a/horizon/values.yaml +++ b/horizon/values.yaml @@ -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: