Update configuration of kibana button

Update function that configure kibana button
to support new configuration format

Change-Id: I7e259d3f0deb86f72a7eba8eb9a7e95a88f5bbf4
This commit is contained in:
Adrian Czarnecki 2018-09-17 10:04:08 +02:00
parent 5fced3ed4d
commit 9d99aed62f
1 changed files with 6 additions and 1 deletions

View File

@ -785,10 +785,15 @@ function enable_log_management {
local localSettings=${DEST}/horizon/monitoring/config/local_settings.py
sudo sed -e "
s|ENABLE_KIBANA_BUTTON = getattr(settings, 'ENABLE_KIBANA_BUTTON', False)|ENABLE_KIBANA_BUTTON = getattr(settings, 'ENABLE_KIBANA_BUTTON', True)|g;
s|KIBANA_HOST = getattr(settings, 'KIBANA_HOST', 'http://192.168.10.4:5601/')|KIBANA_HOST = getattr(settings, 'KIBANA_HOST', 'http://${KIBANA_SERVICE_HOST}:${KIBANA_SERVICE_PORT}/')|g;
" -i ${localSettings}
if is_service_enabled monasca-log-api; then
sudo sed -e "
s|'ENABLE_LOG_MANAGEMENT_BUTTON', False|'ENABLE_LOG_MANAGEMENT_BUTTON', True|g;
" -i ${localSettings}
fi
restart_apache_server
fi
}