Merge "Add qtip job to pod zte-virtual6"
[releng.git] / utils / test / dashboard / dashboard / elastic2kibana / templates / dashboard.json
1 {% set db = db|default({}) -%}
2
3
4 {% macro calc_col(index) -%}
5   {% if index is divisibleby 2 %}
6     7
7   {% else %}
8     1
9   {% endif %}
10 {%- endmacro %}
11
12 {% macro calc_row(index) -%}
13 {% set num = (index - 1)//2 %}
14   {{1 + num * 3}}
15 {%- endmacro %}
16
17 {
18   "description": "Kibana dashboard for {{db.query}}",
19   "hits": 0,
20   "kibanaSavedObjectMeta": {
21     "searchSourceJSON": {
22       "filter": [
23         {
24           "query": {
25             "query_string": {
26               "analyze_wildcard": true,
27               "query": "*"
28             }
29           }
30         }
31       ]
32     }
33   },
34   "metadata": {
35     "label": "{{db.query.case_name}} {{db.query.metric}}",
36     "test_family": "{{db.test_family}}"
37   },
38   "optionsJSON": {
39     "darkTheme": false
40   },
41   "panelsJSON": [
42     {% for id in db.ids %}
43     {
44       "col": {{calc_col(loop.index)}},
45       "id": "{{id}}",
46       "panelIndex": {{loop.index}},
47       "row": {{calc_row(loop.index)}},
48       "size_x": 6,
49       "size_y": 3,
50       "type": "visualization"
51     }
52     {% if not loop.last %}
53     ,
54     {% endif %}
55     {% endfor %}
56   ],
57   "scenario": 1,
58   "timeRestore": false,
59   "title": "{{db.query.project_name}} {{db.query.case_name}} {{db.query.installer}} {{db.query.metric}} {{db.query.pod}}",
60   "uiStateJSON": {}
61 }