diff --git a/kibana3.json b/kibana3.json
new file mode 100644
index 0000000000000..4fa149045921f
--- /dev/null
+++ b/kibana3.json
@@ -0,0 +1 @@
+{"_index":".kibana","_type":"index-pattern","_id":"logstash-*","_score":1,"_source":{"title":"logstash-*","timeFieldName":"@timestamp","fields":"[{\"name\":\"referer\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"agent\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:image:width\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"xss.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"headings.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"meta.user.lastname\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.article:tag.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"geo.dest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.twitter:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.article:section.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"utc_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.twitter:card\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"meta.char\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:image:height\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"host\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"machine.ram\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"links\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@tags.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"phpmemory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.twitter:card.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"ip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.article:modified_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:site_name.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"request.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.article:tag\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"agent.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"spaces\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:site.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"headings\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"relatedContent.og:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"request\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"index.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"extension\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"memory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"relatedContent.twitter:site\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"geo.coordinates\",\"type\":\"geo_point\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"meta.related\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"response.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@message.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"machine.os\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.article:section\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"xss\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"links.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"geo.srcdest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"extension.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"machine.os.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@tags\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"host.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:type.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"spaces.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:image:height.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:site_name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"@message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"bytes\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"response\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"meta.user.firstname\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:image:width.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.article:published_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false}]"}}
diff --git a/kibana4.json b/kibana4.json
new file mode 100644
index 0000000000000..09239ffa6b8f4
--- /dev/null
+++ b/kibana4.json
@@ -0,0 +1,8 @@
+{"_index":".kibana","_type":"index-pattern","_id":"logstash-*","_score":1,"_source":{"title":"logstash-*","timeFieldName":"@timestamp","fields":"[{\"name\":\"referer\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"agent\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:image:width\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"xss.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"headings.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"meta.user.lastname\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.article:tag.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"geo.dest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.twitter:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.article:section.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"utc_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.twitter:card\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"meta.char\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:image:height\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"host\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"machine.ram\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"links\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@tags.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"phpmemory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.twitter:card.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"ip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.article:modified_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:site_name.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"request.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.article:tag\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"agent.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"spaces\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:site.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"headings\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"relatedContent.og:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"request\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"index.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"extension\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"memory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"relatedContent.twitter:site\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"geo.coordinates\",\"type\":\"geo_point\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"meta.related\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"response.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@message.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"machine.os\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.article:section\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"xss\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"links.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"geo.srcdest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"extension.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"machine.os.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@tags\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"host.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:type.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"spaces.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:image:height.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:site_name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"@message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"bytes\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"response\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"meta.user.firstname\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:image:width.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.article:published_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false}]"}}
+{"_index":".kibana","_type":"visualization","_id":"Visualization-TileMap","_score":1,"_source":{"title":"Visualization TileMap","visState":"{\"title\":\"New Visualization\",\"type\":\"tile_map\",\"params\":{\"mapType\":\"Scaled Circle Markers\",\"isDesaturated\":true,\"addTooltip\":true,\"heatMaxZoom\":16,\"heatMinOpacity\":0.1,\"heatRadius\":25,\"heatBlur\":15,\"heatNormalizeData\":true,\"wms\":{\"enabled\":false,\"url\":\"https://basemap.nationalmap.gov/arcgis/services/USGSTopo/MapServer/WMSServer\",\"options\":{\"version\":\"1.3.0\",\"layers\":\"0\",\"format\":\"image/png\",\"transparent\":true,\"attribution\":\"Maps provided by USGS\",\"styles\":\"\"}}},\"aggs\":[{\"id\":\"1\",\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"type\":\"geohash_grid\",\"schema\":\"segment\",\"params\":{\"field\":\"geo.coordinates\",\"autoPrecision\":true,\"precision\":2}}],\"listeners\":{}}","uiStateJSON":"{}","description":"","version":1,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"index\":\"logstash-*\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}"}}}
+{"_index":".kibana","_type":"visualization","_id":"Visualization漢字-LineChart","_score":1,"_source":{"title":"Visualization漢字 LineChart","visState":"{\"title\":\"New Visualization\",\"type\":\"line\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"showCircles\":true,\"smoothLines\":false,\"interpolate\":\"linear\",\"scale\":\"linear\",\"drawLinesBetweenPoints\":true,\"radiusRatio\":9,\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false,\"yAxis\":{}},\"aggs\":[{\"id\":\"1\",\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"type\":\"terms\",\"schema\":\"split\",\"params\":{\"field\":\"extension.raw\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\",\"row\":false}}],\"listeners\":{}}","uiStateJSON":"{}","description":"","version":1,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"index\":\"logstash-*\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}"}}}
+{"_index":".kibana","_type":"visualization","_id":"Visualization漢字-AreaChart","_score":1,"_source":{"title":"Visualization漢字 AreaChart","visState":"{\"title\":\"New Visualization\",\"type\":\"area\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"smoothLines\":false,\"scale\":\"linear\",\"interpolate\":\"linear\",\"mode\":\"stacked\",\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false,\"yAxis\":{}},\"aggs\":[{\"id\":\"1\",\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"customInterval\":\"2h\",\"min_doc_count\":1,\"extended_bounds\":{}}}],\"listeners\":{}}","uiStateJSON":"{}","description":"","version":1,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"index\":\"logstash-*\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}"}}}
+{"_index":".kibana","_type":"visualization","_id":"Visualization☺-VerticalBarChart","_score":1,"_source":{"title":"Visualization☺ VerticalBarChart","visState":"{\"title\":\"New Visualization\",\"type\":\"histogram\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"scale\":\"linear\",\"mode\":\"stacked\",\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false,\"yAxis\":{}},\"aggs\":[{\"id\":\"1\",\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"customInterval\":\"2h\",\"min_doc_count\":1,\"extended_bounds\":{}}}],\"listeners\":{}}","uiStateJSON":"{}","description":"","version":1,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"index\":\"logstash-*\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}"}}}
+{"_index":".kibana","_type":"visualization","_id":"Visualization☺漢字-DataTable","_score":1,"_source":{"title":"Visualization☺漢字 DataTable","visState":"{\"title\":\"New Visualization\",\"type\":\"table\",\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMeticsAtAllLevels\":false},\"aggs\":[{\"id\":\"1\",\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"type\":\"histogram\",\"schema\":\"bucket\",\"params\":{\"field\":\"bytes\",\"interval\":2000,\"extended_bounds\":{}}}],\"listeners\":{}}","uiStateJSON":"{}","description":"","version":1,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"index\":\"logstash-*\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}"}}}
+{"_index":".kibana","_type":"visualization","_id":"Visualization-PieChart","_score":1,"_source":{"title":"Visualization PieChart","visState":"{\"title\":\"New Visualization\",\"type\":\"pie\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"isDonut\":false},\"aggs\":[{\"id\":\"1\",\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"type\":\"histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"memory\",\"interval\":40000,\"extended_bounds\":{}}}],\"listeners\":{}}","uiStateJSON":"{}","description":"","version":1,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"index\":\"logstash-*\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}"}}}
+{"_index":".kibana","_type":"visualization","_id":"Visualization-MetricChart","_score":1,"_source":{"title":"Visualization MetricChart","visState":"{\"title\":\"New Visualization\",\"type\":\"metric\",\"params\":{\"handleNoResults\":true,\"fontSize\":60},\"aggs\":[{\"id\":\"1\",\"type\":\"percentile_ranks\",\"schema\":\"metric\",\"params\":{\"field\":\"memory\",\"values\":[99]}}],\"listeners\":{}}","uiStateJSON":"{}","description":"","version":1,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"index\":\"logstash-*\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}"}}}
diff --git a/mapping_kibana3.json b/mapping_kibana3.json
new file mode 100644
index 0000000000000..24d56a64663c5
--- /dev/null
+++ b/mapping_kibana3.json
@@ -0,0 +1 @@
+{".kibana":{"mappings":{"index-pattern":{"properties":{"fieldFormatMap":{"type":"text"},"fields":{"type":"text"},"intervalName":{"type":"text"},"notExpandable":{"type":"boolean"},"timeFieldName":{"type":"text"},"title":{"type":"text"}}},"server":{"properties":{"uuid":{"type":"keyword"}}},"config":{"properties":{"buildNum":{"type":"keyword"},"dateFormat:tz":{"type":"text"},"defaultIndex":{"type":"text"}}}}}}
diff --git a/mapping_kibana4.json b/mapping_kibana4.json
new file mode 100644
index 0000000000000..ff55e2b8221c4
--- /dev/null
+++ b/mapping_kibana4.json
@@ -0,0 +1 @@
+{".kibana":{"mappings":{"config":{"properties":{"buildNum":{"type":"keyword"}}},"index-pattern":{"properties":{"fields":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"timeFieldName":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"title":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"search":{"properties":{"columns":{"type":"text"},"description":{"type":"text"},"hits":{"type":"integer"},"kibanaSavedObjectMeta":{"properties":{"searchSourceJSON":{"type":"text"}}},"sort":{"type":"text"},"title":{"type":"text"},"version":{"type":"integer"}}},"visualization":{"properties":{"description":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"kibanaSavedObjectMeta":{"properties":{"searchSourceJSON":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"title":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"uiStateJSON":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"version":{"type":"integer"},"visState":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"server":{"properties":{"uuid":{"type":"keyword"}}},"dashboard":{"properties":{"description":{"type":"text"},"hits":{"type":"integer"},"kibanaSavedObjectMeta":{"properties":{"searchSourceJSON":{"type":"text"}}},"optionsJSON":{"type":"text"},"panelsJSON":{"type":"text"},"timeFrom":{"type":"text"},"timeRestore":{"type":"boolean"},"timeTo":{"type":"text"},"title":{"type":"text"},"uiStateJSON":{"type":"text"},"version":{"type":"integer"}}}}}}
diff --git a/package.json b/package.json
index 70417f63d7446..1541980e8dea6 100644
--- a/package.json
+++ b/package.json
@@ -151,6 +151,7 @@
"auto-release-sinon": "1.0.3",
"babel-eslint": "4.1.8",
"chokidar": "1.4.3",
+ "elasticdump": "2.1.1",
"eslint": "1.10.3",
"eslint-plugin-mocha": "1.1.0",
"expect.js": "0.3.1",
@@ -185,6 +186,7 @@
"ncp": "2.0.0",
"nock": "2.10.0",
"npm": "2.11.0",
+ "optimist": "0.6.1",
"portscanner": "1.0.0",
"simple-git": "1.8.0",
"sinon": "1.17.2",
diff --git a/src/plugins/kibana/public/settings/sections/objects/_objects.html b/src/plugins/kibana/public/settings/sections/objects/_objects.html
index 550ef9aec945f..e7a65a74723e7 100644
--- a/src/plugins/kibana/public/settings/sections/objects/_objects.html
+++ b/src/plugins/kibana/public/settings/sections/objects/_objects.html
@@ -46,7 +46,8 @@
Edit Saved Objects
@@ -54,7 +55,8 @@ Edit Saved Objects
@@ -64,7 +66,8 @@ Edit Saved Objects
+ type="checkbox"
+ data-test-subj="checkbox-{{ item.title }}" >
diff --git a/src/plugins/kibana/public/settings/sections/objects/_view.html b/src/plugins/kibana/public/settings/sections/objects/_view.html
index b8ce631383970..8d0c41d75ed16 100644
--- a/src/plugins/kibana/public/settings/sections/objects/_view.html
+++ b/src/plugins/kibana/public/settings/sections/objects/_view.html
@@ -33,4 +33,4 @@
Proceed with caution
-
\ No newline at end of file
+
diff --git a/test/fixtures/scenario_manager.js b/test/fixtures/scenario_manager.js
index a1822a349749e..99c48712b4375 100644
--- a/test/fixtures/scenario_manager.js
+++ b/test/fixtures/scenario_manager.js
@@ -140,4 +140,54 @@ ScenarioManager.prototype.loadIfEmpty = function (id) {
});
};
+
+/**
+* Add fields to the config doc (like setting timezone and defaultIndex)
+* @return {Promise} A promise that is resolved when elasticsearch has a response
+*/
+ScenarioManager.prototype.updateConfigDoc = function (docMap) {
+ // first we need to get the config doc's id so we can use it in our _update call
+ var self = this;
+ var configId;
+ var docMapString = JSON.stringify(docMap);
+
+ return this.client.search({
+ index: '.kibana',
+ type: 'config'
+ })
+ .then(function (response) {
+ if (response.errors) {
+ throw new Error(
+ 'get config failed\n' +
+ response.items
+ .map(i => i[Object.keys(i)[0]].error)
+ .filter(Boolean)
+ .map(err => ' ' + JSON.stringify(err))
+ .join('\n')
+ );
+ } else {
+ configId = response.hits.hits[0]._id;
+ console.log('config._id =' + configId);
+ }
+ })
+ // now that we have the id, we can update
+ // return scenarioManager.updateConfigDoc({'dateFormat:tz':'UTC', 'defaultIndex':'logstash-*'});
+ .then(function (response) {
+ console.log('updating config with ' + docMapString);
+ return self.client.update({
+ index: '.kibana',
+ type: 'config',
+ id: configId,
+ body: {
+ 'doc':
+ docMap
+ }
+ });
+ })
+ .catch(function (err) {
+ throw err;
+ });
+};
+
+
module.exports = ScenarioManager;
diff --git a/test/fixtures/scenarios/visualizations/kibanaVis.JSON b/test/fixtures/scenarios/visualizations/kibanaVis.JSON
new file mode 100644
index 0000000000000..ed331f0f257e2
--- /dev/null
+++ b/test/fixtures/scenarios/visualizations/kibanaVis.JSON
@@ -0,0 +1,10 @@
+{"_index":".kibana","_type":"index-pattern","_id":"logstash-*","_score":1,"_source":{"title":"logstash-*","timeFieldName":"@timestamp","fields":"[{\"name\":\"referer\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"agent\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:image:width\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"xss.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"headings.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"meta.user.lastname\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.article:tag.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"geo.dest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.twitter:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.article:section.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"utc_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.twitter:card\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"meta.char\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:image:height\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"host\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"machine.ram\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"links\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@tags.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"phpmemory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.twitter:card.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"ip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.article:modified_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:site_name.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"request.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.article:tag\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"agent.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"spaces\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:site.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"headings\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"relatedContent.og:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"request\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"index.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"extension\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"memory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"relatedContent.twitter:site\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"geo.coordinates\",\"type\":\"geo_point\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"meta.related\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"response.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@message.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"machine.os\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.article:section\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"xss\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"links.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"geo.srcdest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"extension.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"machine.os.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@tags\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"host.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:type.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"spaces.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:image:height.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:site_name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"@message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"bytes\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"response\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"meta.user.firstname\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:image:width.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.article:published_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false}]"}}
+{"_index":".kibana","_type":"config","_id":"5.0.0-snapshot","_score":1,"_source":{"buildNum":8467,"dateFormat:tz":"UTC","defaultIndex":"logstash-*"}}
+{"_index":".kibana","_type":"server","_id":"LeeD-ASUS-5601","_score":1,"_source":{"uuid":"bbc03c47-0d22-4e44-9736-f909893954cc"}}
+{"_index":".kibana","_type":"visualization","_id":"Visualization-VerticalBarChart","_score":1,"_source":{"title":"Visualization VerticalBarChart","visState":"{\"title\":\"New Visualization\",\"type\":\"histogram\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"scale\":\"linear\",\"mode\":\"stacked\",\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false,\"yAxis\":{}},\"aggs\":[{\"id\":\"1\",\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"customInterval\":\"2h\",\"min_doc_count\":1,\"extended_bounds\":{}}}],\"listeners\":{}}","uiStateJSON":"{}","description":"","version":1,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"index\":\"logstash-*\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}"}}}
+{"_index":".kibana","_type":"visualization","_id":"Visualization-TileMap","_score":1,"_source":{"title":"Visualization TileMap","visState":"{\"title\":\"New Visualization\",\"type\":\"tile_map\",\"params\":{\"mapType\":\"Scaled Circle Markers\",\"isDesaturated\":true,\"addTooltip\":true,\"heatMaxZoom\":16,\"heatMinOpacity\":0.1,\"heatRadius\":25,\"heatBlur\":15,\"heatNormalizeData\":true,\"wms\":{\"enabled\":false,\"url\":\"https://basemap.nationalmap.gov/arcgis/services/USGSTopo/MapServer/WMSServer\",\"options\":{\"version\":\"1.3.0\",\"layers\":\"0\",\"format\":\"image/png\",\"transparent\":true,\"attribution\":\"Maps provided by USGS\",\"styles\":\"\"}}},\"aggs\":[{\"id\":\"1\",\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"type\":\"geohash_grid\",\"schema\":\"segment\",\"params\":{\"field\":\"geo.coordinates\",\"autoPrecision\":true,\"precision\":2}}],\"listeners\":{}}","uiStateJSON":"{}","description":"","version":1,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"index\":\"logstash-*\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}"}}}
+{"_index":".kibana","_type":"visualization","_id":"Visualization-PieChart","_score":1,"_source":{"title":"Visualization PieChart","visState":"{\"title\":\"New Visualization\",\"type\":\"pie\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"isDonut\":false},\"aggs\":[{\"id\":\"1\",\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"type\":\"histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"memory\",\"interval\":40000,\"extended_bounds\":{}}}],\"listeners\":{}}","uiStateJSON":"{}","description":"","version":1,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"index\":\"logstash-*\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}"}}}
+{"_index":".kibana","_type":"visualization","_id":"Visualization-MetricChart","_score":1,"_source":{"title":"Visualization MetricChart","visState":"{\"title\":\"New Visualization\",\"type\":\"metric\",\"params\":{\"handleNoResults\":true,\"fontSize\":60},\"aggs\":[{\"id\":\"1\",\"type\":\"percentile_ranks\",\"schema\":\"metric\",\"params\":{\"field\":\"memory\",\"values\":[99]}}],\"listeners\":{}}","uiStateJSON":"{}","description":"","version":1,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"index\":\"logstash-*\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}"}}}
+{"_index":".kibana","_type":"visualization","_id":"Visualization-LineChart","_score":1,"_source":{"title":"Visualization LineChart","visState":"{\"title\":\"New Visualization\",\"type\":\"line\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"showCircles\":true,\"smoothLines\":false,\"interpolate\":\"linear\",\"scale\":\"linear\",\"drawLinesBetweenPoints\":true,\"radiusRatio\":9,\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false,\"yAxis\":{}},\"aggs\":[{\"id\":\"1\",\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"type\":\"terms\",\"schema\":\"split\",\"params\":{\"field\":\"extension.raw\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\",\"row\":false}}],\"listeners\":{}}","uiStateJSON":"{}","description":"","version":1,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"index\":\"logstash-*\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}"}}}
+{"_index":".kibana","_type":"visualization","_id":"Visualization-DataTable","_score":1,"_source":{"title":"Visualization DataTable","visState":"{\"title\":\"New Visualization\",\"type\":\"table\",\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMeticsAtAllLevels\":false},\"aggs\":[{\"id\":\"1\",\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"type\":\"histogram\",\"schema\":\"bucket\",\"params\":{\"field\":\"bytes\",\"interval\":2000,\"extended_bounds\":{}}}],\"listeners\":{}}","uiStateJSON":"{}","description":"","version":1,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"index\":\"logstash-*\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}"}}}
+{"_index":".kibana","_type":"visualization","_id":"Visualization-AreaChart","_score":1,"_source":{"title":"Visualization AreaChart","visState":"{\"title\":\"New Visualization\",\"type\":\"area\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"smoothLines\":false,\"scale\":\"linear\",\"interpolate\":\"linear\",\"mode\":\"stacked\",\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false,\"yAxis\":{}},\"aggs\":[{\"id\":\"1\",\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"customInterval\":\"2h\",\"min_doc_count\":1,\"extended_bounds\":{}}}],\"listeners\":{}}","uiStateJSON":"{}","description":"","version":1,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"index\":\"logstash-*\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}"}}}
diff --git a/test/fixtures/scenarios/visualizations/mapping-kibanaVis.JSON b/test/fixtures/scenarios/visualizations/mapping-kibanaVis.JSON
new file mode 100644
index 0000000000000..e5147233d4eae
--- /dev/null
+++ b/test/fixtures/scenarios/visualizations/mapping-kibanaVis.JSON
@@ -0,0 +1 @@
+{".kibana":{"mappings":{"config":{"properties":{"buildNum":{"type":"keyword"},"defaultIndex":{"type":"text"}}},"index-pattern":{"properties":{"fieldFormatMap":{"type":"text"},"fields":{"type":"text"},"intervalName":{"type":"text"},"notExpandable":{"type":"boolean"},"timeFieldName":{"type":"text"},"title":{"type":"text"}}},"server":{"properties":{"uuid":{"type":"keyword"}}}}}}
diff --git a/test/functional/apps/console/_console.js b/test/functional/apps/console/_console.js
index c214e3d3971d9..d1cc4c4ae96da 100644
--- a/test/functional/apps/console/_console.js
+++ b/test/functional/apps/console/_console.js
@@ -2,8 +2,6 @@ import {
bdd,
scenarioManager,
common,
- // settingsPage,
- // headerPage,
consolePage
} from '../../../support';
diff --git a/test/functional/apps/console/index.js b/test/functional/apps/console/index.js
index 057a57e52cfae..7e48a17b7baf5 100644
--- a/test/functional/apps/console/index.js
+++ b/test/functional/apps/console/index.js
@@ -8,10 +8,6 @@ import { bdd, remote, scenarioManager, defaultTimeout } from '../../../support';
return remote.setWindowSize(1200,800);
});
- bdd.after(function unloadMakelogs() {
- return scenarioManager.unload('logstashFunctional');
- });
-
require('./_console');
});
}());
diff --git a/test/functional/apps/dashboard/_dashboard.js b/test/functional/apps/dashboard/_dashboard.js
new file mode 100644
index 0000000000000..d8590b8494bbb
--- /dev/null
+++ b/test/functional/apps/dashboard/_dashboard.js
@@ -0,0 +1,138 @@
+import {
+ bdd,
+ common,
+ dashboardPage,
+ headerPage,
+ scenarioManager
+} from '../../../support';
+
+(function () {
+ var expect = require('expect.js');
+
+ (function () {
+ bdd.describe('discover tab', function describeIndexTests() {
+
+ bdd.before(function () {
+
+ var fromTime = '2015-09-19 06:31:44.000';
+ var toTime = '2015-09-23 18:31:44.000';
+
+ common.debug('Starting dashboard before method');
+ common.debug('navigateToApp dashboard');
+ return scenarioManager.unload('emptyKibana')
+ .then(function () {
+ return common.try(function () {
+ return scenarioManager.updateConfigDoc({'dateFormat:tz':'UTC', 'defaultIndex':'logstash-*'});
+ });
+ })
+ // and load a set of makelogs data
+ .then(function loadkibana4() {
+ common.debug('load kibana index with visualizations');
+ return common.elasticLoad('kibana4.json','.kibana');
+ })
+ .then(function () {
+ return scenarioManager.loadIfEmpty('logstashFunctional');
+ })
+ .then(function () {
+ return common.navigateToApp('dashboard');
+ })
+ .catch(common.handleError(this));
+ });
+
+
+ bdd.describe('add visualizations to dashboard', function dashboardTest() {
+ var visualizations = ['Visualization漢字 AreaChart',
+ 'Visualization☺漢字 DataTable',
+ 'Visualization漢字 LineChart',
+ 'Visualization PieChart',
+ 'Visualization TileMap',
+ 'Visualization☺ VerticalBarChart',
+ 'Visualization MetricChart'
+ ];
+
+
+ bdd.it('should be able to add visualizations to dashboard', function addVisualizations() {
+
+ function addVisualizations(arr) {
+ return arr.reduce(function (promise, vizName) {
+ return promise
+ .then(function () {
+ return dashboardPage.addVisualization(vizName);
+ });
+ }, Promise.resolve());
+ }
+
+ return addVisualizations(visualizations)
+ .then(function () {
+ console.log('all done');
+ });
+
+ });
+
+ bdd.it('set the timepicker time to that which contains our test data', function setTimepicker() {
+ var fromTime = '2015-09-19 06:31:44.000';
+ var toTime = '2015-09-23 18:31:44.000';
+ var testSubName = 'Dashboard Test 1';
+
+ // .then(function () {
+ common.debug('Set absolute time range from \"' + fromTime + '\" to \"' + toTime + '\"');
+ return headerPage.setAbsoluteRange(fromTime, toTime)
+ .then(function sleep() {
+ return common.sleep(4000);
+ })
+ .then(function takeScreenshot() {
+ common.debug('Take screenshot');
+ common.saveScreenshot('./screenshot-' + testSubName + '.png');
+ })
+ .catch(common.handleError(this));
+ });
+
+ bdd.it('should save and load dashboard', function saveAndLoadDashboard() {
+ var testSubName = 'Dashboard Test 1';
+// save time on the dashboard?
+ return dashboardPage.saveDashboard(testSubName)
+ // click New Dashboard just to clear the one we just created
+ .then(function () {
+ return dashboardPage.clickNewDashboard();
+ })
+ .then(function () {
+ return dashboardPage.loadSavedDashboard(testSubName);
+ })
+ .catch(common.handleError(this));
+ });
+
+ bdd.it('should have all the expected visualizations', function checkVisualizations() {
+ return common.tryForTime(10000, function () {
+ return dashboardPage.getPanelTitles()
+ .then(function (panelTitles) {
+ common.log('visualization titles = ' + panelTitles);
+ expect(panelTitles).to.eql(visualizations);
+ });
+ })
+ .catch(common.handleError(this));
+ });
+
+ bdd.it('should have all the expected initial sizes', function checkVisualizationSizes() {
+ var visObjects = [ { dataCol: '1', dataRow: '1', dataSizeX: '3', dataSizeY: '2', title: 'Visualization漢字 AreaChart' },
+ { dataCol: '4', dataRow: '1', dataSizeX: '3', dataSizeY: '2', title: 'Visualization☺漢字 DataTable' },
+ { dataCol: '7', dataRow: '1', dataSizeX: '3', dataSizeY: '2', title: 'Visualization漢字 LineChart' },
+ { dataCol: '10', dataRow: '1', dataSizeX: '3', dataSizeY: '2', title: 'Visualization PieChart' },
+ { dataCol: '1', dataRow: '3', dataSizeX: '3', dataSizeY: '2', title: 'Visualization TileMap' },
+ { dataCol: '4', dataRow: '3', dataSizeX: '3', dataSizeY: '2', title: 'Visualization☺ VerticalBarChart' },
+ { dataCol: '7', dataRow: '3', dataSizeX: '3', dataSizeY: '2', title: 'Visualization MetricChart' }
+ ];
+ return common.tryForTime(10000, function () {
+ return dashboardPage.getPanelData()
+ .then(function (panelTitles) {
+ common.log('visualization titles = ' + panelTitles);
+ expect(panelTitles).to.eql(visObjects);
+ });
+ })
+ .catch(common.handleError(this));
+ });
+
+ });
+
+ });
+ }());
+}());
diff --git a/test/functional/apps/dashboard/index.js b/test/functional/apps/dashboard/index.js
new file mode 100644
index 0000000000000..813e03d669820
--- /dev/null
+++ b/test/functional/apps/dashboard/index.js
@@ -0,0 +1,13 @@
+import { bdd, remote, scenarioManager, defaultTimeout } from '../../../support';
+
+(function () {
+ bdd.describe('dashboard app', function () {
+ this.timeout = defaultTimeout;
+
+ bdd.before(function () {
+ return remote.setWindowSize(1200,800);
+ });
+
+ require('./_dashboard');
+ });
+}());
diff --git a/test/functional/apps/discover/_collapse_expand.js b/test/functional/apps/discover/_collapse_expand.js
index 9630f924467d8..e6e3a27e6aa87 100644
--- a/test/functional/apps/discover/_collapse_expand.js
+++ b/test/functional/apps/discover/_collapse_expand.js
@@ -18,19 +18,16 @@ import {
var fromTime = '2015-09-19 06:31:44.000';
var toTime = '2015-09-23 18:31:44.000';
- // start each test with an empty kibana index
- return scenarioManager.reload('emptyKibana')
- // and load a set of makelogs data
- .then(function loadIfEmptyMakelogs() {
- return scenarioManager.loadIfEmpty('logstashFunctional');
- })
+ common.debug('scenarioManager.unload(emptyKibana)');
+ return scenarioManager.unload('emptyKibana')
.then(function () {
- common.debug('navigateTo');
- return settingsPage.navigateTo();
+ return common.try(function () {
+ return scenarioManager.updateConfigDoc({'dateFormat:tz':'UTC', 'defaultIndex':'logstash-*'});
+ });
})
.then(function () {
- common.debug('createIndexPattern');
- return settingsPage.createIndexPattern();
+ common.debug('load kibana index with logstash-* pattern');
+ return common.elasticLoad('kibana3.json','.kibana');
})
.then(function () {
common.debug('discover');
diff --git a/test/functional/apps/discover/_discover.js b/test/functional/apps/discover/_discover.js
index 27d57abffa06b..ecab8eba76b6b 100644
--- a/test/functional/apps/discover/_discover.js
+++ b/test/functional/apps/discover/_discover.js
@@ -3,7 +3,6 @@ import {
scenarioManager,
common,
discoverPage,
- settingsPage,
headerPage,
} from '../../../support';
@@ -16,19 +15,16 @@ import {
var fromTime = '2015-09-19 06:31:44.000';
var toTime = '2015-09-23 18:31:44.000';
- // start each test with an empty kibana index
- return scenarioManager.reload('emptyKibana')
- // and load a set of makelogs data
- .then(function loadIfEmptyMakelogs() {
- return scenarioManager.loadIfEmpty('logstashFunctional');
- })
- .then(function (navigateTo) {
- common.debug('navigateTo');
- return settingsPage.navigateTo();
+ common.debug('scenarioManager.unload(emptyKibana)');
+ return scenarioManager.unload('emptyKibana')
+ .then(function () {
+ return common.try(function () {
+ return scenarioManager.updateConfigDoc({'dateFormat:tz':'UTC', 'defaultIndex':'logstash-*'});
+ });
})
.then(function () {
- common.debug('createIndexPattern');
- return settingsPage.createIndexPattern();
+ common.debug('load kibana index with logstash-* pattern');
+ return common.elasticLoad('kibana3.json','.kibana');
})
.then(function () {
common.debug('discover');
diff --git a/test/functional/apps/discover/_field_data.js b/test/functional/apps/discover/_field_data.js
index 2fe40577106f1..87cc8a57d9782 100644
--- a/test/functional/apps/discover/_field_data.js
+++ b/test/functional/apps/discover/_field_data.js
@@ -3,8 +3,7 @@ import {
common,
discoverPage,
headerPage,
- scenarioManager,
- settingsPage
+ scenarioManager
} from '../../../support';
(function () {
@@ -17,21 +16,25 @@ import {
var toTime = '2015-09-23 18:31:44.000';
// start each test with an empty kibana index
- return scenarioManager.reload('emptyKibana')
- // and load a set of makelogs data
- .then(function loadIfEmptyMakelogs() {
- return scenarioManager.loadIfEmpty('logstashFunctional');
+ common.debug('scenarioManager.unload(emptyKibana)');
+ return scenarioManager.unload('emptyKibana')
+ .then(function () {
+ return common.try(function () {
+ return scenarioManager.updateConfigDoc({'dateFormat:tz':'UTC', 'defaultIndex':'logstash-*'});
+ });
})
- .then(function (navigateTo) {
- common.debug('navigateTo');
- return settingsPage.navigateTo();
+ .then(function () {
+ common.debug('load kibana index with logstash-* pattern');
+ return common.elasticLoad('kibana3.json','.kibana');
})
+ // we're navigating to another page to re-hash the url so we don't get
+ // a toast about failing to find the query from the previous test
.then(function () {
- common.debug('createIndexPattern');
- return settingsPage.createIndexPattern();
+ common.debug('navigateTo settings');
+ return common.navigateToApp('settings');
})
.then(function () {
- common.debug('discover');
+ common.debug('navigateTo discover');
return common.navigateToApp('discover');
})
.then(function () {
@@ -253,6 +256,12 @@ import {
.then(function () {
return headerPage.clickToastOK();
})
+ .then(function () {
+ return headerPage.waitForToastMessageGone();
+ })
+ .then(function () {
+ return discoverPage.query('*');
+ })
.catch(common.handleError(this));
});
diff --git a/test/functional/apps/discover/_shared_links.js b/test/functional/apps/discover/_shared_links.js
index b9f73003f042c..65805f1c90668 100644
--- a/test/functional/apps/discover/_shared_links.js
+++ b/test/functional/apps/discover/_shared_links.js
@@ -1,4 +1,4 @@
-import { bdd, common, discoverPage, headerPage, settingsPage, scenarioManager } from '../../../support';
+import { bdd, common, discoverPage, headerPage, scenarioManager } from '../../../support';
(function () {
var expect = require('expect.js');
@@ -19,18 +19,16 @@ import { bdd, common, discoverPage, headerPage, settingsPage, scenarioManager }
var toTime = '2015-09-23 18:31:44.000';
// start each test with an empty kibana index
- return scenarioManager.reload('emptyKibana')
- // and load a set of makelogs data
- .then(function loadIfEmptyMakelogs() {
- return scenarioManager.loadIfEmpty('logstashFunctional');
- })
- .then(function (navigateTo) {
- common.debug('navigateTo');
- return settingsPage.navigateTo();
+ common.debug('scenarioManager.unload(emptyKibana)');
+ return scenarioManager.unload('emptyKibana')
+ .then(function () {
+ return common.try(function () {
+ return scenarioManager.updateConfigDoc({'dateFormat:tz':'UTC', 'defaultIndex':'logstash-*'});
+ });
})
.then(function () {
- common.debug('createIndexPattern');
- return settingsPage.createIndexPattern();
+ common.debug('load kibana index with logstash-* pattern');
+ return common.elasticLoad('kibana3.json','.kibana');
})
.then(function () {
common.debug('discover');
@@ -64,23 +62,29 @@ import { bdd, common, discoverPage, headerPage, settingsPage, scenarioManager }
});
- bdd.it('should show the correct formatted URL', function () {
- var expectedUrl = baseUrl
- + '/app/kibana?_t=1453775307251#'
- + '/discover?_g=(refreshInterval:(display:Off,pause:!f,value:0),time'
- + ':(from:\'2015-09-19T06:31:44.000Z\',mode:absolute,to:\'2015-09'
- + '-23T18:31:44.000Z\'))&_a=(columns:!(_source),index:\'logstash-'
- + '*\',interval:auto,query:(query_string:(analyze_wildcard:!t,query'
- + ':\'*\')),sort:!(\'@timestamp\',desc))';
- return discoverPage.getSharedUrl()
- .then(function (actualUrl) {
- // strip the timestamp out of each URL
- expect(actualUrl.replace(/_t=\d{13}/,'_t=TIMESTAMP'))
-
- .to.be(expectedUrl.replace(/_t=\d{13}/,'_t=TIMESTAMP'));
- })
- .catch(common.handleError(this));
- });
+ // bdd.it('should show the correct formatted URL', function () {
+ // var expectedUrl = baseUrl
+ // + '/app/kibana?_t=1453775307251#'
+ // + '/discover?_g=(refreshInterval:(display:Off,pause:!f,value:0),time'
+ // + ':(from:\'2015-09-19T06:31:44.000Z\',mode:absolute,to:\'2015-09'
+ // + '-23T18:31:44.000Z\'))&_a=(columns:!(_source),index:\'logstash-'
+ // + '*\',interval:auto,query:(query_string:(analyze_wildcard:!t,query'
+ // + ':\'*\')),sort:!(\'@timestamp\',desc))';
+ // return common.try(function () {
+ // return discoverPage.getSharedUrl()
+ // .then(function () {
+ // //After hiding the time picker, we need to wait for
+ // //the refresh button to hide before clicking the share button
+ // return common.sleep(1000);
+ // })
+ // .then(function (actualUrl) {
+ // // strip the timestamp out of each URL
+ // expect(actualUrl.replace(/_t=\d{13}/,'_t=TIMESTAMP'))
+ // .to.be(expectedUrl.replace(/_t=\d{13}/,'_t=TIMESTAMP'));
+ // });
+ // })
+ // .catch(common.handleError(this));
+ // });
bdd.it('should show toast message for copy to clipboard', function () {
return discoverPage.clickCopyToClipboard()
diff --git a/test/functional/apps/discover/index.js b/test/functional/apps/discover/index.js
index 2ff0de8695205..f719a3b1bce49 100644
--- a/test/functional/apps/discover/index.js
+++ b/test/functional/apps/discover/index.js
@@ -5,11 +5,8 @@ import { bdd, remote, scenarioManager, defaultTimeout } from '../../../support';
this.timeout = defaultTimeout;
bdd.before(function () {
- return remote.setWindowSize(1200,800);
- });
-
- bdd.after(function unloadMakelogs() {
- return scenarioManager.unload('logstashFunctional');
+ remote.setWindowSize(1200,800);
+ return scenarioManager.loadIfEmpty('logstashFunctional');
});
require('./_discover');
diff --git a/test/functional/apps/settings/_about.js b/test/functional/apps/settings/_about.js
new file mode 100644
index 0000000000000..f3f92e245dc69
--- /dev/null
+++ b/test/functional/apps/settings/_about.js
@@ -0,0 +1,38 @@
+define(function (require) {
+ var Common = require('../../../support/pages/common');
+ var SettingsPage = require('../../../support/pages/settings_page');
+ var expect = require('intern/dojo/node!expect.js');
+
+ return function (bdd, scenarioManager) {
+ bdd.describe('creating and deleting default index', function describeIndexTests() {
+ var common;
+ var settingsPage;
+
+ bdd.before(function () {
+ common = new Common(this.remote);
+ settingsPage = new SettingsPage(this.remote);
+
+ return settingsPage.navigateTo();
+ });
+
+ bdd.describe('log Version, Build, Commit SHA, Server name', function logAboutInfo() {
+
+ bdd.it('should allow setting advanced settings', function () {
+ return settingsPage.clickAboutTab()
+ .then(function getVersion() {
+ common.log('calling getVersion');
+ return settingsPage.getVersion();
+ })
+ .then(function GetAdvancedSetting() {
+ return settingsPage.getAdvancedSettings('dateFormat:tz');
+ })
+ .then(function (advancedSetting) {
+ expect(advancedSetting).to.be('America/Phoenix');
+ })
+ .catch(common.handleError(this));
+ });
+
+ });
+ });
+ };
+});
diff --git a/test/functional/apps/settings/index.js b/test/functional/apps/settings/index.js
index c8b0c8c2ca77b..b546eeebfac5a 100644
--- a/test/functional/apps/settings/index.js
+++ b/test/functional/apps/settings/index.js
@@ -14,10 +14,7 @@ import { bdd, defaultTimeout, scenarioManager } from '../../../support';
});
bdd.after(function () {
- return scenarioManager.unload('makelogs')
- .then(function () {
- scenarioManager.unload('emptyKibana');
- });
+ return scenarioManager.unload('makelogs');
});
require('./_initial_state');
diff --git a/test/functional/apps/visualize/_area_chart.js b/test/functional/apps/visualize/_area_chart.js
index 5c2a6d6bc8658..e54f31d92d45f 100644
--- a/test/functional/apps/visualize/_area_chart.js
+++ b/test/functional/apps/visualize/_area_chart.js
@@ -16,29 +16,8 @@ import {
var fromTime = '2015-09-19 06:31:44.000';
var toTime = '2015-09-23 18:31:44.000';
- return scenarioManager.reload('emptyKibana')
- .then(function () {
- common.debug('navigateTo');
- return settingsPage.navigateTo();
- })
- .then(function () {
- common.debug('createIndexPattern');
- return settingsPage.createIndexPattern();
- })
- .then(function () {
- return settingsPage.clickAdvancedTab();
- })
- .then(function GetAdvancedSetting() {
- common.debug('check for required UTC timezone');
- return settingsPage.getAdvancedSettings('dateFormat:tz');
- })
- .then(function (advancedSetting) {
- expect(advancedSetting).to.be('UTC');
- })
- .then(function () {
- common.debug('navigateToApp visualize');
- return common.navigateToApp('visualize');
- })
+ common.debug('navigateToApp visualize');
+ return common.navigateToApp('visualize')
.then(function () {
common.debug('clickAreaChart');
return visualizePage.clickAreaChart();
@@ -86,7 +65,7 @@ import {
bdd.describe('area charts', function indexPatternCreation() {
var testSubName = 'AreaChart';
- var vizName1 = 'Visualization ' + testSubName;
+ var vizName1 = 'Visualization漢字 ' + testSubName;
bdd.it('should save and load', function pageHeader() {
return visualizePage.saveVisualization(vizName1)
@@ -94,9 +73,9 @@ import {
common.debug('Saved viz message = ' + message);
expect(message).to.be('Visualization Editor: Saved Visualization \"' + vizName1 + '\"');
})
- .then(function testVisualizeWaitForToastMessageGone() {
- return visualizePage.waitForToastMessageGone();
- })
+ // .then(function testVisualizeWaitForToastMessageGone() {
+ // return visualizePage.waitForToastMessageGone();
+ // })
.then(function loadSavedVisualization() {
return visualizePage.loadSavedVisualization(vizName1);
})
@@ -194,7 +173,30 @@ import {
.catch(common.handleError(this));
});
+ bdd.it('should edit and show correct JSON', function pageHeader() {
+ var expectedBody = { title: 'Visualization漢字 AreaChart',
+ visState: '{"title":"Visualization漢字 AreaChart","type":"area","params":{"shareYAxis":true,'
+ + '"addTooltip":true,"addLegend":true,"smoothLines":false,"scale":"linear",'
+ + '"interpolate":"linear","mode":"stacked","times":[],"addTimeMarker":false,'
+ + '"defaultYExtents":false,"setYExtents":false,"yAxis":{}},"aggs":[{"id":"1",'
+ + '"type":"count","schema":"metric","params":{}},{"id":"2","type":"date_histogram",'
+ + '"schema":"segment","params":{"field":"@timestamp","interval":"auto",'
+ + '"customInterval":"2h","min_doc_count":1,"extended_bounds":{}}}],"listeners":{}}',
+ uiStateJSON: '{}',
+ description: '',
+ version: 1,
+ kibanaSavedObjectMeta: { searchSourceJSON: '{"index":"logstash-*","query":'
+ + '{"query_string":{"query":"*","analyze_wildcard":true}},"filter":[]}' }
+ };
+
+ return common.getKibanaObject('visualization', vizName1)
+ .then(function (kObject) {
+ common.debug('kObject = ' + kObject);
+ expect(kObject).to.eql(expectedBody);
+ });
+
+ });
});
});
diff --git a/test/functional/apps/visualize/_chart_types.js b/test/functional/apps/visualize/_chart_types.js
index 147566a94d14e..b589838ee1543 100644
--- a/test/functional/apps/visualize/_chart_types.js
+++ b/test/functional/apps/visualize/_chart_types.js
@@ -12,19 +12,8 @@ import {
(function () {
bdd.describe('visualize app', function describeIndexTests() {
bdd.before(function () {
- return scenarioManager.reload('emptyKibana')
- .then(function () {
- common.debug('navigateTo');
- return settingsPage.navigateTo();
- })
- .then(function () {
- common.debug('createIndexPattern');
- return settingsPage.createIndexPattern();
- })
- .then(function () {
- common.debug('navigateToApp visualize');
- return common.navigateToApp('visualize');
- })
+ common.debug('navigateToApp visualize');
+ return common.navigateToApp('visualize')
.catch(common.handleError(this));
});
diff --git a/test/functional/apps/visualize/_data_table.js b/test/functional/apps/visualize/_data_table.js
index fe7c982634226..d9d3c308661a1 100644
--- a/test/functional/apps/visualize/_data_table.js
+++ b/test/functional/apps/visualize/_data_table.js
@@ -16,29 +16,9 @@ import {
var toTime = '2015-09-23 18:31:44.000';
bdd.before(function () {
- return scenarioManager.reload('emptyKibana')
- .then(function () {
- common.debug('navigateTo');
- return settingsPage.navigateTo();
- })
- .then(function () {
- common.debug('createIndexPattern');
- return settingsPage.createIndexPattern();
- })
- .then(function () {
- return settingsPage.clickAdvancedTab();
- })
- .then(function GetAdvancedSetting() {
- common.debug('check for required UTC timezone');
- return settingsPage.getAdvancedSettings('dateFormat:tz');
- })
- .then(function (advancedSetting) {
- expect(advancedSetting).to.be('UTC');
- })
- .then(function () {
- common.debug('navigateToApp visualize');
- return common.navigateToApp('visualize');
- })
+ common.debug('navigateToApp visualize');
+ return common.navigateToApp('visualize')
+ // })
.then(function () {
common.debug('clickDataTable');
return visualizePage.clickDataTable();
@@ -79,7 +59,7 @@ import {
bdd.describe('data table', function indexPatternCreation() {
var testSubName = 'DataTable';
- var vizName1 = 'Visualization ' + testSubName;
+ var vizName1 = 'Visualization☺漢字 ' + testSubName;
bdd.it('should be able to save and load', function pageHeader() {
return visualizePage.saveVisualization(vizName1)
diff --git a/test/functional/apps/visualize/_line_chart.js b/test/functional/apps/visualize/_line_chart.js
index 3c036fb59517d..63fe2c5e21623 100644
--- a/test/functional/apps/visualize/_line_chart.js
+++ b/test/functional/apps/visualize/_line_chart.js
@@ -16,29 +16,8 @@ import {
var fromTime = '2015-09-19 06:31:44.000';
var toTime = '2015-09-23 18:31:44.000';
- return scenarioManager.reload('emptyKibana')
- .then(function () {
- common.debug('navigateTo');
- return settingsPage.navigateTo();
- })
- .then(function () {
- common.debug('createIndexPattern');
- return settingsPage.createIndexPattern();
- })
- .then(function () {
- return settingsPage.clickAdvancedTab();
- })
- .then(function GetAdvancedSetting() {
- common.debug('check for required UTC timezone');
- return settingsPage.getAdvancedSettings('dateFormat:tz');
- })
- .then(function (advancedSetting) {
- expect(advancedSetting).to.be('UTC');
- })
- .then(function () {
- common.debug('navigateToApp visualize');
- return common.navigateToApp('visualize');
- })
+ common.debug('navigateToApp visualize');
+ return common.navigateToApp('visualize')
.then(function () {
common.debug('clickLineChart');
return visualizePage.clickLineChart();
@@ -77,7 +56,7 @@ import {
bdd.describe('line charts', function indexPatternCreation() {
var testSubName = 'LineChart';
- var vizName1 = 'Visualization ' + testSubName;
+ var vizName1 = 'Visualization漢字 ' + testSubName;
bdd.it('should be able to save and load', function pageHeader() {
diff --git a/test/functional/apps/visualize/_metric_chart.js b/test/functional/apps/visualize/_metric_chart.js
index 3260bb1133326..0c65d25843c13 100644
--- a/test/functional/apps/visualize/_metric_chart.js
+++ b/test/functional/apps/visualize/_metric_chart.js
@@ -21,29 +21,8 @@ import {
common.debug('Start of test' + testSubName + 'Visualization');
var vizName1 = 'Visualization ' + testSubName;
- return scenarioManager.reload('emptyKibana')
- .then(function () {
- common.debug('navigateTo');
- return settingsPage.navigateTo();
- })
- .then(function () {
- common.debug('createIndexPattern');
- return settingsPage.createIndexPattern();
- })
- .then(function () {
- return settingsPage.clickAdvancedTab();
- })
- .then(function GetAdvancedSetting() {
- common.debug('check for required UTC timezone');
- return settingsPage.getAdvancedSettings('dateFormat:tz');
- })
- .then(function (advancedSetting) {
- expect(advancedSetting).to.be('UTC');
- })
- .then(function () {
- common.debug('navigateToApp visualize');
- return common.navigateToApp('visualize');
- })
+ common.debug('navigateToApp visualize');
+ return common.navigateToApp('visualize')
.then(function () {
common.debug('clickMetric');
return visualizePage.clickMetric();
@@ -274,7 +253,8 @@ import {
.catch(common.handleError(this));
});
- bdd.it('should show Percentile Ranks', function pageHeader() {
+ bdd.it('should show Percentile Ranks, take screenshot', function pageHeader() {
+ var testSubName = 'MetricChart';
var percentileRankBytes = [ '2.036%', 'Percentile rank 99 of "memory"'];
common.debug('Aggregation = Percentile Ranks');
return visualizePage.selectAggregation('Percentile Ranks')
@@ -297,6 +277,37 @@ import {
});
});
})
+ .then(function takeScreenshot() {
+ common.debug('Take screenshot');
+ common.saveScreenshot('./screenshot-' + testSubName + '.png');
+ })
+ .catch(common.handleError(this));
+ });
+
+ bdd.it('should save and load', function pageHeader() {
+ var testSubName = 'MetricChart';
+ common.debug('Start of test' + testSubName + 'Visualization');
+ var vizName1 = 'Visualization ' + testSubName;
+ var remote = this.remote;
+
+ return visualizePage.saveVisualization(vizName1)
+ .then(function (message) {
+ common.debug('Saved viz message = ' + message);
+ expect(message).to.be('Visualization Editor: Saved Visualization \"' + vizName1 + '\"');
+ })
+ .then(function testVisualizeWaitForToastMessageGone() {
+ return visualizePage.waitForToastMessageGone();
+ })
+ .then(function () {
+ return visualizePage.loadSavedVisualization(vizName1);
+ })
+ .then(function waitForVisualization() {
+ return visualizePage.waitForVisualization();
+ })
+ // sleep a bit before trying to get the pie chart data below
+ .then(function sleep() {
+ return common.sleep(2000);
+ })
.catch(common.handleError(this));
});
diff --git a/test/functional/apps/visualize/_pie_chart.js b/test/functional/apps/visualize/_pie_chart.js
index dec21f618d996..aa17a7966c8e1 100644
--- a/test/functional/apps/visualize/_pie_chart.js
+++ b/test/functional/apps/visualize/_pie_chart.js
@@ -16,29 +16,8 @@ import {
var fromTime = '2015-09-19 06:31:44.000';
var toTime = '2015-09-23 18:31:44.000';
- return scenarioManager.reload('emptyKibana')
- .then(function () {
- common.debug('navigateTo');
- return settingsPage.navigateTo();
- })
- .then(function () {
- common.debug('createIndexPattern');
- return settingsPage.createIndexPattern();
- })
- .then(function () {
- return settingsPage.clickAdvancedTab();
- })
- .then(function GetAdvancedSetting() {
- common.debug('check for required UTC timezone');
- return settingsPage.getAdvancedSettings('dateFormat:tz');
- })
- .then(function (advancedSetting) {
- expect(advancedSetting).to.be('UTC');
- })
- .then(function () {
- common.debug('navigateToApp visualize');
- return common.navigateToApp('visualize');
- })
+ common.debug('navigateToApp visualize');
+ return common.navigateToApp('visualize')
.then(function () {
common.debug('clickPieChart');
return visualizePage.clickPieChart();
diff --git a/test/functional/apps/visualize/_tile_map.js b/test/functional/apps/visualize/_tile_map.js
index 76d8fc5ed9513..32bc6e33b25f3 100644
--- a/test/functional/apps/visualize/_tile_map.js
+++ b/test/functional/apps/visualize/_tile_map.js
@@ -17,29 +17,8 @@ import {
bdd.before(function () {
- return scenarioManager.reload('emptyKibana')
- .then(function () {
- common.debug('navigateTo');
- return settingsPage.navigateTo();
- })
- .then(function () {
- common.debug('createIndexPattern');
- return settingsPage.createIndexPattern();
- })
- .then(function () {
- return settingsPage.clickAdvancedTab();
- })
- .then(function GetAdvancedSetting() {
- common.debug('check for required UTC timezone');
- return settingsPage.getAdvancedSettings('dateFormat:tz');
- })
- .then(function (advancedSetting) {
- expect(advancedSetting).to.be('UTC');
- })
- .then(function () {
- common.debug('navigateToApp visualize');
- return common.navigateToApp('visualize');
- })
+ common.debug('navigateToApp visualize');
+ return common.navigateToApp('visualize')
.then(function () {
common.debug('clickTileMap');
return visualizePage.clickTileMap();
diff --git a/test/functional/apps/visualize/_vertical_bar_chart.js b/test/functional/apps/visualize/_vertical_bar_chart.js
index 048c80cff5c77..bba803b5d0702 100644
--- a/test/functional/apps/visualize/_vertical_bar_chart.js
+++ b/test/functional/apps/visualize/_vertical_bar_chart.js
@@ -16,29 +16,8 @@ import {
var toTime = '2015-09-23 18:31:44.000';
bdd.before(function () {
- return scenarioManager.reload('emptyKibana')
- .then(function () {
- common.debug('navigateTo');
- return settingsPage.navigateTo();
- })
- .then(function () {
- common.debug('createIndexPattern');
- return settingsPage.createIndexPattern();
- })
- .then(function () {
- return settingsPage.clickAdvancedTab();
- })
- .then(function GetAdvancedSetting() {
- common.debug('check for required UTC timezone');
- return settingsPage.getAdvancedSettings('dateFormat:tz');
- })
- .then(function (advancedSetting) {
- expect(advancedSetting).to.be('UTC');
- })
- .then(function () {
- common.debug('navigateToApp visualize');
- return common.navigateToApp('visualize');
- })
+ common.debug('navigateToApp visualize');
+ return common.navigateToApp('visualize')
.then(function () {
common.debug('clickVerticalBarChart');
return visualizePage.clickVerticalBarChart();
@@ -76,7 +55,7 @@ import {
bdd.describe('vertical bar chart', function indexPatternCreation() {
var testSubName = 'VerticalBarChart';
- var vizName1 = 'Visualization ' + testSubName;
+ var vizName1 = 'Visualization☺ ' + testSubName;
bdd.it('should save and load', function pageHeader() {
diff --git a/test/functional/apps/visualize/index.js b/test/functional/apps/visualize/index.js
index 250744ea05842..fb1f20f9d3099 100644
--- a/test/functional/apps/visualize/index.js
+++ b/test/functional/apps/visualize/index.js
@@ -2,19 +2,29 @@ import { bdd, remote, common, defaultTimeout, scenarioManager } from '../../../s
(function () {
bdd.describe('visualize app', function () {
+
this.timeout = defaultTimeout;
bdd.before(function () {
var self = this;
+ common.debug('Starting visualize before method');
remote.setWindowSize(1200,800);
// load a set of makelogs data
- common.debug('loadIfEmpty logstashFunctional ' + self.timeout);
- return scenarioManager.loadIfEmpty('logstashFunctional');
- });
-
-
- bdd.after(function unloadMakelogs() {
- return scenarioManager.unload('logstashFunctional');
+ common.debug('scenarioManager.unload(emptyKibana)');
+ return scenarioManager.unload('emptyKibana')
+ .then(function () {
+ return common.try(function () {
+ return scenarioManager.updateConfigDoc({'dateFormat:tz':'UTC', 'defaultIndex':'logstash-*'});
+ });
+ })
+ .then(function () {
+ common.debug('load kibana index with logstash-* pattern');
+ return common.elasticLoad('kibana3.json','.kibana');
+ })
+ .then(function () {
+ common.debug('loadIfEmpty logstashFunctional ' + self.timeout);
+ return scenarioManager.loadIfEmpty('logstashFunctional');
+ });
});
require('./_chart_types');
diff --git a/test/functional/index.js b/test/functional/index.js
index 85caa6baac0bc..4801310f767f7 100644
--- a/test/functional/index.js
+++ b/test/functional/index.js
@@ -20,6 +20,7 @@ define(function (require) {
require([
'intern/dojo/node!../support/index',
+ 'intern/dojo/node!./apps/dashboard',
'intern/dojo/node!./apps/discover',
'intern/dojo/node!./status_page',
'intern/dojo/node!./apps/settings',
diff --git a/test/server_config.js b/test/server_config.js
index 35bf5fefa7386..090a43e4e3ee3 100644
--- a/test/server_config.js
+++ b/test/server_config.js
@@ -12,13 +12,13 @@ module.exports = {
kibana: {
protocol: process.env.TEST_UI_KIBANA_PROTOCOL || 'http',
hostname: process.env.TEST_UI_KIBANA_HOSTNAME || 'localhost',
- port: parseInt(process.env.TEST_UI_KIBANA_PORT, 10) || 5620,
+ port: parseInt(process.env.TEST_UI_KIBANA_PORT, 10) || 5601,
auth: shield.kibanaUser.username + ':' + shield.kibanaUser.password
},
elasticsearch: {
protocol: process.env.TEST_UI_ES_PROTOCOL || 'http',
hostname: process.env.TEST_UI_ES_HOSTNAME || 'localhost',
- port: parseInt(process.env.TEST_UI_ES_PORT, 10) || 9220,
+ port: parseInt(process.env.TEST_UI_ES_PORT, 10) || 9200,
auth: shield.admin.username + ':' + shield.admin.password
}
},
diff --git a/test/support/index.js b/test/support/index.js
index d044231ba3d47..ff9a4a38980fe 100644
--- a/test/support/index.js
+++ b/test/support/index.js
@@ -5,6 +5,7 @@ import DiscoverPage from './pages/discover_page';
import SettingsPage from './pages/settings_page';
import HeaderPage from './pages/header_page';
import VisualizePage from './pages/visualize_page';
+import DashboardPage from './pages/dashboard_page';
import ShieldPage from './pages/shield_page';
import ConsolePage from './pages/console_page';
@@ -24,6 +25,7 @@ defineDelayedExport('discoverPage', () => new DiscoverPage());
defineDelayedExport('headerPage', () => new HeaderPage());
defineDelayedExport('settingsPage', () => new SettingsPage());
defineDelayedExport('visualizePage', () => new VisualizePage());
+defineDelayedExport('dashboardPage', () => new DashboardPage());
defineDelayedExport('shieldPage', () => new ShieldPage());
defineDelayedExport('consolePage', () => new ConsolePage());
diff --git a/test/support/pages/common.js b/test/support/pages/common.js
index 169b190059a6a..71ea0113b01b8 100644
--- a/test/support/pages/common.js
+++ b/test/support/pages/common.js
@@ -11,6 +11,13 @@ export default (function () {
var format = require('url').format;
var util = require('util');
var path = require('path');
+ var url = require('url');
+ var resolve = require('path').resolve;
+ var __dirname = path.resolve(path.dirname());
+ var __pwd = path.resolve('.');
+ var bin = resolve(__dirname, '../../node_modules/.bin/elasticdump');
+ var Elasticdump = require('elasticdump').elasticdump;
+ var kIndex = '.kibana';
function injectTimestampQuery(func, url) {
var formatted = modifyQueryString(url, function (parsed) {
@@ -61,8 +68,9 @@ export default (function () {
var self = this;
// navUrl includes user:password@ for use with Shield
// appUrl excludes user:password@ to match what getCurrentUrl returns
- var navUrl = getUrl(config.servers.kibana, config.apps[appName]);
+ //var navUrl = getUrl(config.servers.kibana, config.apps[appName]);
var appUrl = getUrl.noAuth(config.servers.kibana, config.apps[appName]);
+ var navUrl = appUrl;
self.debug('navigating to ' + appName + ' url: ' + navUrl);
var doNavigation = function (url) {
@@ -70,6 +78,9 @@ export default (function () {
// since we're using hash URLs, always reload first to force re-render
self.debug('navigate to: ' + url);
return self.remote.get(url)
+ .then(function () {
+ return self.sleep(1000);
+ })
.then(function () {
self.debug('returned from get, calling refresh');
return self.remote.refresh();
@@ -279,7 +290,105 @@ export default (function () {
return this.remote
.setFindTimeout(defaultFindTimeout)
.findDisplayedByCssSelector(testSubjSelector(selector));
- }
+ },
+
+
+ /////////////////// WORKS BUT UGLY /////////////////////////
+ getKibanaObject: function getKibanaObject(type, objName) {
+ var self = this;
+ var esUrl = url.format(config.servers.elasticsearch);
+ var kObject;
+ return this.remote.get(esUrl + '/.kibana/' + type + '/_search?q=title:' + objName)
+ .then(function () {
+ return self.remote
+ .findByCssSelector('body > pre')
+ .getVisibleText();
+ })
+ .then(function (pageBody) {
+ var obj1 = JSON.parse(pageBody);
+ kObject = obj1.hits.hits[0]._source;
+ self.debug('kObject.title = ' + kObject.title);
+ return self.remote.goBack();
+ })
+ .then(function () {
+ return kObject;
+ });
+ },
+
+ /*
+ ** This function is basically copied from
+ ** https://github.com/taskrabbit/elasticsearch-dump/blob/master/bin/elasticdump
+ ** and allows calling elasticdump for importing or exporting data from Elasticsearch
+ */
+ elasticdumpModule: function elasticdumpModule(myinput, myoutput, index, mytype) {
+ var self = this;
+
+ var options = {
+ limit: 100,
+ offset: 0,
+ debug: false,
+ type: mytype,
+ delete: false,
+ all: false,
+ maxSockets: null,
+ input: myinput,
+ 'input-index': null,
+ output: myoutput,
+ 'output-index': index,
+ inputTransport: null,
+ outputTransport: null,
+ searchBody: null,
+ sourceOnly: false,
+ jsonLines: false,
+ format: '',
+ 'ignore-errors': false,
+ scrollTime: '10m',
+ timeout: null,
+ skip: null,
+ toLog: null,
+ };
+ self.debug(options);
+ var dumper = new Elasticdump(options.input, options.output, options);
+
+ dumper.on('log', function (message) { self.debug(message); });
+ dumper.on('debug', function (message) { self.debug(message); });
+ dumper.on('error', function (error) { self.debug('error', 'Error Emitted => ' + (error.message || JSON.stringify(error))); });
+
+ var promise = new Promise(function (resolve, reject) {
+ dumper.dump(function (error, totalWrites) {
+ if (error) {
+ self.debug('THERE WAS AN ERROR :-(');
+ reject(Error(error));
+ } else {
+ resolve ('elasticdumpModule success');
+ }
+ });
+ });
+ return promise;
+ },
+
+ elasticDump: function elasticDump(index, file) {
+ var self = this;
+ self.debug('Dumping mapping from ' + url.format(config.servers.elasticsearch) + '/' + index + ' to (mapping_' + file + ')');
+ return this.elasticdumpModule(url.format(config.servers.elasticsearch), 'mapping_' + file, index, 'mapping')
+ .then(function () {
+ self.debug('Dumping data from ' + url.format(config.servers.elasticsearch) + '/' + index + ' to (' + file + ')');
+ return self.elasticdumpModule(url.format(config.servers.elasticsearch), file,index, 'data');
+ });
+ },
+
+ elasticLoad: function elasticLoad(file, index) {
+ // TODO: should we have a flag to delete the index first?
+ // or use scenarioManager.unload(index) ?
+ var self = this;
+ self.debug('Loading mapping (mapping_' + file + ') into ' + url.format(config.servers.elasticsearch) + '/' + index);
+ return this.elasticdumpModule('mapping_' + file, url.format(config.servers.elasticsearch), index, 'mapping')
+ .then(function () {
+ self.debug('Loading data (' + file + ')');
+ return self.elasticdumpModule(file, url.format(config.servers.elasticsearch), index, 'data');
+ });
+ },
+
};
return Common;
diff --git a/test/support/pages/dashboard_page.js b/test/support/pages/dashboard_page.js
new file mode 100644
index 0000000000000..88b8cb8f9a127
--- /dev/null
+++ b/test/support/pages/dashboard_page.js
@@ -0,0 +1,200 @@
+import { remote, common, defaultFindTimeout } from '../';
+
+export default (function () {
+ var thisTime;
+
+ function DashboardPage() {
+ this.remote = remote;
+ thisTime = this.remote.setFindTimeout(defaultFindTimeout);
+ }
+
+ DashboardPage.prototype = {
+ constructor: DashboardPage,
+
+ clickNewDashboard: function clickNewDashboard() {
+ return thisTime
+ .findByCssSelector('button.ng-scope[aria-label="New Dashboard"]')
+ .click();
+ },
+
+ clickAddVisualization: function clickAddVisualization() {
+ return thisTime
+ .findByCssSelector('button.ng-scope[aria-label="Add a panel to the dashboard"]')
+ .click();
+ },
+
+ filterVizNames: function filterVizNames(vizName) {
+ return thisTime
+ .findByCssSelector('input[placeholder="Visualizations Filter..."]')
+ .click()
+ .pressKeys(vizName);
+ },
+
+ clickVizNameLink: function clickVizNameLink(vizName) {
+ return thisTime
+ .findByLinkText(vizName)
+ .click();
+ },
+
+ closeAddVizualizationPanel: function closeAddVizualizationPanel() {
+ common.debug('-------------close panel');
+ return thisTime
+ .findByCssSelector('i.fa fa-chevron-up')
+ .click();
+ },
+
+ addVisualization: function addVisualization(vizName) {
+ var self = this;
+ return this.clickAddVisualization()
+ .then(function () {
+ common.debug('filter visualization (' + vizName + ')');
+ return self.filterVizNames(vizName);
+ })
+ // this second wait is usually enough to avoid the
+ // 'stale element reference: element is not attached to the page document'
+ // on the next step
+ .then(function () {
+ return common.sleep(1000);
+ })
+ .then(function () {
+ // but wrap in a try loop since it can still happen
+ return common.try(function () {
+ common.debug('click visualization (' + vizName + ')');
+ return self.clickVizNameLink(vizName);
+ });
+ })
+ // this second click of 'Add' collapses the Add Visualization pane
+ .then(function () {
+ return self.clickAddVisualization();
+ });
+ },
+
+ saveDashboard: function saveDashboard(dashName) {
+ var self = this;
+ return thisTime
+ .findByCssSelector('button.ng-scope[aria-label="Save Dashboard"]')
+ .click()
+ .then(function () {
+ return common.sleep(1000);
+ })
+ .then(function () {
+ common.debug('saveButton button clicked');
+ return thisTime
+ .findById('dashboardTitle')
+ .type(dashName);
+ })
+ // click save button
+ .then(function () {
+ return thisTime
+ .findByCssSelector('.btn-primary')
+ .click();
+ })
+ // verify that green message at the top of the page.
+ // it's only there for about 5 seconds
+ .then(function () {
+ return thisTime
+ .findByCssSelector('kbn-truncated.toast-message.ng-isolate-scope')
+ .getVisibleText();
+ });
+ },
+
+ clickDashboardByLinkText: function clickDashboardByLinkText(dashName) {
+ return thisTime
+ .findByLinkText(dashName)
+ .click();
+ },
+
+ // use the search filter box to narrow the results down to a single
+ // entry, or at least to a single page of results
+ loadSavedDashboard: function loadSavedDashboard(dashName) {
+ var self = this;
+ return thisTime
+ .findByCssSelector('button.ng-scope[aria-label="Load Saved Dashboard"]')
+ .click()
+ .then(function filterDashboard() {
+ common.debug('Load Saved Dashboard button clicked');
+ return self.remote
+ .findByCssSelector('input[name="filter"]')
+ .click()
+ .type(dashName.replace('-',' '));
+ })
+ .then(function () {
+ return common.sleep(1000);
+ })
+ .then(function clickDashboardByLinkedText() {
+ return self
+ .clickDashboardByLinkText(dashName);
+ });
+ },
+
+
+ getPanelTitles: function getPanelTitles() {
+ common.debug('in getPanelTitles');
+ return thisTime
+ .findAllByCssSelector('span.panel-title')
+ .then(function (titleObjects) {
+
+ function getTitles(chart) {
+ return chart.getAttribute('title');
+ }
+
+ var getTitlePromises = titleObjects.map(getTitles);
+ return Promise.all(getTitlePromises);
+ });
+ },
+
+ getPanelData: function getPanelData() {
+ common.debug('in getPanelData');
+ return thisTime
+ .findAllByCssSelector('li.gs-w')
+ .then(function (titleObjects) {
+
+ function getTitles(chart) {
+ var obj = {};
+ return chart.getAttribute('data-col')
+ .then(function (theData) {
+ obj = {dataCol:theData};
+ return chart;
+ })
+ .then(function (chart) {
+ return chart.getAttribute('data-row')
+ .then(function (theData) {
+ obj.dataRow = theData;
+ return chart;
+ });
+ })
+ .then(function (chart) {
+ return chart.getAttribute('data-sizex')
+ .then(function (theData) {
+ obj.dataSizeX = theData;
+ return chart;
+ });
+ })
+ .then(function (chart) {
+ return chart.getAttribute('data-sizey')
+ .then(function (theData) {
+ obj.dataSizeY = theData;
+ return chart;
+ });
+ })
+ .then(function (chart) {
+ return chart.findByCssSelector('span.panel-title')
+ .then(function (titleElement) {
+ return titleElement.getAttribute('title');
+ })
+ .then(function (theData) {
+ obj.title = theData;
+ return obj;
+ });
+ });
+ }
+
+ var getTitlePromises = titleObjects.map(getTitles);
+ return Promise.all(getTitlePromises);
+ });
+ }
+
+ };
+
+ return DashboardPage;
+}());
diff --git a/test/support/pages/header_page.js b/test/support/pages/header_page.js
index 9d60396bbdd7f..74fc62c7e4ea0 100644
--- a/test/support/pages/header_page.js
+++ b/test/support/pages/header_page.js
@@ -25,22 +25,22 @@ export default (function () {
clickDiscover: function () {
common.debug('click Discover tab');
- this.clickSelector('a[href*=\'discover\']');
+ return this.clickSelector('a[href*=\'discover\']');
},
clickVisualize: function () {
common.debug('click Visualize tab');
- this.clickSelector('a[href*=\'visualize\']');
+ return this.clickSelector('a[href*=\'visualize\']');
},
clickDashboard: function () {
common.debug('click Dashboard tab');
- this.clickSelector('a[href*=\'dashboard\']');
+ return this.clickSelector('a[href*=\'dashboard\']');
},
clickSettings: function () {
common.debug('click Settings tab');
- this.clickSelector('a[href*=\'settings\']');
+ return this.clickSelector('a[href*=\'settings\']');
},
clickTimepicker: function clickTimepicker() {
@@ -129,7 +129,7 @@ export default (function () {
return this.remote
.setFindTimeout(defaultFindTimeout * 10)
.findByCssSelector('.spinner.ng-hide');
- }
+ },
};
diff --git a/test/support/pages/settings_page.js b/test/support/pages/settings_page.js
index 5ac4b080d0e3e..69689a47d7fae 100644
--- a/test/support/pages/settings_page.js
+++ b/test/support/pages/settings_page.js
@@ -1,5 +1,5 @@
import Bluebird from 'bluebird';
-import { common, remote, defaultFindTimeout } from '../';
+import { common, remote, headerPage, defaultTimeout, defaultFindTimeout } from '../';
export default (function () {
function SettingsPage() {
@@ -26,6 +26,11 @@ export default (function () {
return common.findTestSubject('settingsNav advanced').click();
},
+ clickObjectsTab: function () {
+ common.debug('in clickObjectsTab');
+ return common.findTestSubject('settingsNav objects').click();
+ },
+
setAdvancedSettings: function setAdvancedSettings(propertyName, propertyValue) {
var self = this;
return common.findTestSubject('advancedSetting&' + propertyName + ' editButton')
@@ -332,7 +337,131 @@ export default (function () {
.then(function () {
return alertText;
});
+ },
+
+ /*
+ ** DON'T USE these export methods! We don't have a way to handle the
+ ** open/save browser dialog box yet.
+ */
+ exportDashboard: function exportDashboard(objName) {
+ return this.exportObject('dashboards', objName);
+ },
+
+ exportSearch: function exportSearch(objName) {
+ return this.exportObject('searches', objName);
+ },
+
+ exportVisualization: function exportVisualization(objName) {
+ return this.exportObject('visualizations', objName);
+ },
+
+ exportObject: function exportObject(objectType, objName) {
+ var self = this;
+ return headerPage.clickSettings()
+ .then(function () {
+ return self.clickObjectsTab();
+ })
+ .then(function selectObjectTypeTab() {
+ common.debug('selectObjectTypeTab ' + objectType);
+ return self.remote
+ // .setFindTimeout(defaultTimeout)
+ .setFindTimeout(30000)
+ .findByCssSelector('[title="' + objectType + '"]')
+ .click();
+ })
+ // check the checkbox next to the object name
+ .then(function checkBoxForObject() {
+ return self.remote
+ .findByCssSelector('[data-test-subj="checkbox-' + objName + '"]')
+ .click();
+ })
+ .then(function exportIt() {
+ return self.remote
+ .setFindTimeout(defaultTimeout)
+ .findByCssSelector('[aria-label="Export"]')
+ .click();
+ });
+ // TODO: Handle open/save dialog
+ },
+
+
+ editDashboard: function editDashboard(objName) {
+ return this.editObject('dashboards', objName);
+ },
+
+ editSearch: function editSearch(objName) {
+ return this.editObject('searches', objName);
+ },
+
+ editVisualization: function editVisualization(objName) {
+ return this.editObject('visualizations', objName);
+ },
+
+ editObject: function editObject(objectType, objName) {
+ var self = this;
+ return headerPage.clickSettings()
+ .then(function () {
+ return self.clickObjectsTab();
+ })
+ .then(function selectObjectTypeTab() {
+ common.debug('selectObjectTypeTab ' + objectType);
+ return self.remote
+ .setFindTimeout(defaultTimeout)
+ .findByCssSelector('[title="' + objectType + '"]')
+ .click();
+ })
+ // click the edit pencil next to the object name
+ .then(function checkBoxForObject() {
+ return self.remote
+ .findByCssSelector('[data-test-subj="edit-' + objName + '"]')
+ .click();
+ })
+ .then(function () {
+ return self.remote
+ .findByCssSelector('[data-test-subj="kibanaSavedObjectMeta.searchSourceJSON"]')
+ .getVisibleText();
+ });
+ },
+
+ editObjectx: function editObject(objectType, objName) {
+ var self = this;
+ return headerPage.clickSettings()
+ .then(function () {
+ return self.clickObjectsTab();
+ })
+ .then(function selectObjectTypeTab() {
+ common.debug('selectObjectTypeTab ' + objectType);
+ return self.remote
+ .setFindTimeout(defaultTimeout)
+ .findByCssSelector('[title="' + objectType + '"]')
+ .click();
+ })
+ // click the edit pencil next to the object name
+ .then(function checkBoxForObject() {
+ return self.remote
+ .findByCssSelector('[data-test-subj="edit-' + objName + '"]')
+ .click();
+ })
+ .then(function () {
+ return self.remote
+ .findAllByCssSelector('[data-test-subj]');
+ })
+ .then(function (chartTypes) {
+
+ function getChartType(chart) {
+ return chart.getVisibleText();
+ // .then(function (chartString) {
+ // return chart.click();
+ // });
+ }
+
+ var getChartTypesPromises = chartTypes.map(getChartType);
+ return Promise.all(getChartTypesPromises);
+ });
}
+
+
+
};
return SettingsPage;
diff --git a/test/support/pages/visualize_page.js b/test/support/pages/visualize_page.js
index 4e47f2d79497e..da46ef6cbdbac 100644
--- a/test/support/pages/visualize_page.js
+++ b/test/support/pages/visualize_page.js
@@ -425,7 +425,6 @@ export default (function () {
var chartData = [];
var tempArray = [];
var chartSections = 0;
- var chartMap = {};
var height = 0;
var yAxisLabel = 0;
var yAxisHeight = 0;
diff --git a/test/support/run_elasticdump.js b/test/support/run_elasticdump.js
new file mode 100644
index 0000000000000..28fe5015f16cf
--- /dev/null
+++ b/test/support/run_elasticdump.js
@@ -0,0 +1,27 @@
+define(function (require) {
+
+ const config = require('intern').config;
+ const execFileSync = require('intern/dojo/node!child_process').execFileSync;
+ const resolve = require('intern/dojo/node!path').resolve;
+ const _ = require('intern/dojo/node!lodash');
+ const url = require('intern/dojo/node!url');
+ const path = require('intern/dojo/node!path');
+
+ // npm install --save-dev elasticdump
+ var __dirname = path.resolve(path.dirname());
+ const bin = resolve(__dirname, '../../node_modules/.bin/elasticdump');
+ const esUrl = 'http://localhost:9200'; //url.format(config.servers.elasticsearch);
+ const kIndex = '.kibana';
+
+
+ function run() {
+ return execFileSync(bin, [
+ // '--input=http://localhost:9200/.kibana',
+ // '--output='
+
+ '--input=' + esUrl + '/' + kIndex + '',
+ '--output=$' // write output to stdout
+ ]).toString('utf8');
+ }
+
+});