summaryrefslogtreecommitdiffstats
path: root/dashboard/dashboard/elastic2kibana/templates/visualization.json
blob: d51d4174ea5a28fe6c28287adfa161e17ee912a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{% set vis = vis|default({}) -%}


{
  "description": "Kibana visualization for {{ vis.filters }}",
  "kibanaSavedObjectMeta": {
    "searchSourceJSON": {
      "filter": [
        {% for key, value in vis.filters.iteritems() if key != "metric" %}
        {% if not (key == "pod_name" and value == "all") %}
        {
          "match": {
            "{{ key }}": {
              "query": "{{ value }}",
              "type": "phrase"
            }
          }
        }
        {% if not loop.last %}
        ,
        {% endif %}
        {% endif %}
        {% endfor %}
      ]
    }
  },
  "scenario": 1,
  "title": "{{vis.filters.project_name}} {{vis.filters.case_name}} {{vis.filters.installer}} {{vis.filters.metric}} {{vis.filters.pod_name}} {{vis.filters.scenario}}",
  "uiStateJSON": {},
  "visState": {{ vis.visState }}
}