summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--utils/test/dashboard/dashboard/elastic2kibana/templates/qpi.json45
-rw-r--r--utils/test/dashboard/dashboard/mongo2elastic/format.py18
-rw-r--r--utils/test/dashboard/dashboard/mongo2elastic/main.py10
-rw-r--r--utils/test/dashboard/dashboard/qtip/__init__.py0
-rw-r--r--utils/test/dashboard/dashboard/qtip/testcases.yaml28
5 files changed, 99 insertions, 2 deletions
diff --git a/utils/test/dashboard/dashboard/elastic2kibana/templates/qpi.json b/utils/test/dashboard/dashboard/elastic2kibana/templates/qpi.json
new file mode 100644
index 000000000..a46f315ef
--- /dev/null
+++ b/utils/test/dashboard/dashboard/elastic2kibana/templates/qpi.json
@@ -0,0 +1,45 @@
+{% set aggs = aggs|default([]) -%}
+
+{
+ "title": "qpi",
+ "type": "line",
+ "listeners": {},
+ "params": {
+ "addLegend": true,
+ "shareYAxis": true,
+ "addTooltip": true,
+ "smoothLines": false,
+ "scale": "linear",
+ "interpolate": "linear",
+ "times": [],
+ "addTimeMarker": false,
+ "defaultYExtents": false,
+ "setYExtents": false,
+ "yAxis": {},
+ "mode": "stacked"
+ },
+ "aggs": [
+ {% for agg in aggs %}
+ {
+ "id": {{agg.id }},
+ "type": "avg",
+ "schema": "metric",
+ "params": {
+ "field": "{{agg.field}}"
+ }
+ },
+ {% endfor %}
+ {
+ "id": {{ aggs|length + 1 }},
+ "type": "date_histogram",
+ "schema": "segment",
+ "params": {
+ "field": "start_date",
+ "interval": "auto",
+ "customInterval": "2h",
+ "min_doc_count": 1,
+ "extended_bounds": {}
+ }
+ }
+ ]
+}
diff --git a/utils/test/dashboard/dashboard/mongo2elastic/format.py b/utils/test/dashboard/dashboard/mongo2elastic/format.py
index ef485bae0..0bbde1746 100644
--- a/utils/test/dashboard/dashboard/mongo2elastic/format.py
+++ b/utils/test/dashboard/dashboard/mongo2elastic/format.py
@@ -184,3 +184,21 @@ def format_vims(testcase):
}
}
return True
+
+
+def format_qpi(testcase):
+ """
+ Look for these and leave any of those:
+ details.index
+
+ If none are present, then return False
+ """
+ details = testcase['details']
+ if 'index' not in details:
+ return False
+
+ for key, value in details.items():
+ if key != 'index':
+ del details[key]
+
+ return True
diff --git a/utils/test/dashboard/dashboard/mongo2elastic/main.py b/utils/test/dashboard/dashboard/mongo2elastic/main.py
index a526d5319..303d82c6f 100644
--- a/utils/test/dashboard/dashboard/mongo2elastic/main.py
+++ b/utils/test/dashboard/dashboard/mongo2elastic/main.py
@@ -91,10 +91,16 @@ class DocumentVerification(object):
return self.skip
def _fix_date(self, date_string):
+ if date_string == 'None':
+ return None
if isinstance(date_string, dict):
return date_string['$date']
- else:
- return date_string[:-3].replace(' ', 'T') + 'Z'
+ if 'T' not in date_string:
+ date_string = date_string[:-3].replace(' ', 'T')
+ if not date_string.endswith('Z'):
+ date_string += 'Z'
+
+ return date_string
class DocumentPublisher(object):
diff --git a/utils/test/dashboard/dashboard/qtip/__init__.py b/utils/test/dashboard/dashboard/qtip/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/utils/test/dashboard/dashboard/qtip/__init__.py
diff --git a/utils/test/dashboard/dashboard/qtip/testcases.yaml b/utils/test/dashboard/dashboard/qtip/testcases.yaml
new file mode 100644
index 000000000..cd337cd73
--- /dev/null
+++ b/utils/test/dashboard/dashboard/qtip/testcases.yaml
@@ -0,0 +1,28 @@
+qtip:
+ -
+ name: compute_test_suite
+ format: qpi
+ test_family: compute
+ visualizations:
+ -
+ name: qpi
+ fields:
+ - field: details.index
+ -
+ name: network_test_suite
+ test_family: network
+ format: qpi
+ visualizations:
+ -
+ name: qpi
+ fields:
+ - field: details.index
+ -
+ name:storage_test_suite
+ format: qpi
+ test_family: storage
+ visualizations:
+ -
+ name: qpi
+ fields:
+ - field: details.index