Add content-type field and change link in dashboard

Change-Id: Id072634b234970a990d941489158fb4b9c9fe32c
This commit is contained in:
Arseni Lipinski 2019-08-05 14:54:38 +02:00
parent f0231ab00f
commit df2e57b942
3 changed files with 7 additions and 6 deletions

View File

@ -104,14 +104,14 @@ GRAFANA_URL = getattr(settings, 'GRAFANA_URL', None)
SHOW_GRAFANA_HOME = getattr(settings, 'SHOW_GRAFANA_HOME', True) SHOW_GRAFANA_HOME = getattr(settings, 'SHOW_GRAFANA_HOME', True)
ENABLE_LOG_MANAGEMENT_BUTTON = getattr(settings, 'ENABLE_LOG_MANAGEMENT_BUTTON', False) ENABLE_LOG_MANAGEMENT_BUTTON = getattr(settings, 'ENABLE_LOG_MANAGEMENT_BUTTON', True)
ENABLE_EVENT_MANAGEMENT_BUTTON = getattr(settings, 'ENABLE_EVENT_MANAGEMENT_BUTTON', False) ENABLE_EVENT_MANAGEMENT_BUTTON = getattr(settings, 'ENABLE_EVENT_MANAGEMENT_BUTTON', False)
KIBANA_POLICY_RULE = getattr(settings, 'KIBANA_POLICY_RULE', KIBANA_POLICY_RULE = getattr(settings, 'KIBANA_POLICY_RULE',
'monitoring:kibana_access') 'monitoring:kibana_access')
KIBANA_POLICY_SCOPE = getattr(settings, 'KIBANA_POLICY_SCOPE', KIBANA_POLICY_SCOPE = getattr(settings, 'KIBANA_POLICY_SCOPE',
'monitoring') 'monitoring')
KIBANA_HOST = getattr(settings, 'KIBANA_HOST', 'http://192.168.10.4:5601/') KIBANA_HOST = getattr(settings, 'KIBANA_HOST', 'http://192.168.10.6:5601/')
OPENSTACK_SSL_NO_VERIFY = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False) OPENSTACK_SSL_NO_VERIFY = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
OPENSTACK_SSL_CACERT = getattr(settings, 'OPENSTACK_SSL_CACERT', None) OPENSTACK_SSL_CACERT = getattr(settings, 'OPENSTACK_SSL_CACERT', None)

View File

@ -45,7 +45,7 @@
{% endif %} {% endif %}
{% if can_access_kibana %} {% if can_access_kibana %}
{% if enable_log_management_button or enable_event_management_button %} {% if enable_log_management_button or enable_event_management_button %}
<a target="dashboard" href="{% url 'horizon:monitoring:overview:kibana_proxy' url='/' %}" class="btn btn-default"> <a target="dashboard" href="{% url 'horizon:monitoring:overview:kibana_proxy' url='/app/kibana' %}" class="btn btn-default">
<span class="fa fa-bar-chart"></span> <span class="fa fa-bar-chart"></span>
{% if enable_log_management_button %} {% if enable_log_management_button %}
{% if enable_event_management_button %} {% if enable_event_management_button %}

View File

@ -415,9 +415,10 @@ class KibanaProxyView(generic.View):
# passing kbn version explicitly for kibana >= 4.3.x # passing kbn version explicitly for kibana >= 4.3.x
headers = { headers = {
'X-Auth-Token': request.user.token.id, "X-Auth-Token": request.user.token.id,
'kbn-version': request.META.get('HTTP_KBN_VERSION', ''), "kbn-version": request.META.get("HTTP_KBN_VERSION", ""),
'Cookie': request.META.get('HTTP_COOKIE', '') "Cookie": request.META.get("HTTP_COOKIE", ""),
"Content-Type": "application/json",
} }
return self.read(request.method, url, request.body, headers) return self.read(request.method, url, request.body, headers)