From ab04840d828aa5216911f711577077561208569a Mon Sep 17 00:00:00 2001 From: drebs Date: Thu, 27 Apr 2017 20:06:09 +0200 Subject: [elastic] use multiple mustache templates --- elastic/templates/dashboard.mustache | 20 ++++++ .../visualization-searchSourceJSON.mustache | 23 +++++++ elastic/templates/visualization-visState.mustache | 78 ++++++++++++++++++++++ elastic/templates/visualization.mustache | 10 +++ 4 files changed, 131 insertions(+) create mode 100644 elastic/templates/dashboard.mustache create mode 100644 elastic/templates/visualization-searchSourceJSON.mustache create mode 100644 elastic/templates/visualization-visState.mustache create mode 100644 elastic/templates/visualization.mustache (limited to 'elastic/templates') diff --git a/elastic/templates/dashboard.mustache b/elastic/templates/dashboard.mustache new file mode 100644 index 0000000..e54a019 --- /dev/null +++ b/elastic/templates/dashboard.mustache @@ -0,0 +1,20 @@ +{ + "title": "Soledad-Benchmarks", + "hits": 0, + "description": "All Soledad benchmak tests run on Weasel", + "panelsJSON": {{{panels_json}}}, + "optionsJSON": "{\"darkTheme\":true}", + "uiStateJSON": "{}", + "version": 1, + "timeRestore": true, + "timeTo": "now", + "timeFrom": "now/y", + "refreshInterval": { + "display": "Off", + "pause": false, + "value": 0 + }, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[{\"query\":{\"query_string\":{\"analyze_wildcard\":true,\"query\":\"*\"}}}]}" + } +} diff --git a/elastic/templates/visualization-searchSourceJSON.mustache b/elastic/templates/visualization-searchSourceJSON.mustache new file mode 100644 index 0000000..b04be2c --- /dev/null +++ b/elastic/templates/visualization-searchSourceJSON.mustache @@ -0,0 +1,23 @@ +{ + "filter" : [], + "query" : { + "query_string" : { + "query" : "{{{query}}}", + "analyze_wildcard" : true + } + }, + "highlight" : { + "post_tags" : [ + "@/kibana-highlighted-field@" + ], + "pre_tags" : [ + "@kibana-highlighted-field@" + ], + "fragment_size" : 2147483647, + "fields" : { + "*" : {} + }, + "require_field_match" : false + }, + "index" : "benchmark*" +} diff --git a/elastic/templates/visualization-visState.mustache b/elastic/templates/visualization-visState.mustache new file mode 100644 index 0000000..9689f68 --- /dev/null +++ b/elastic/templates/visualization-visState.mustache @@ -0,0 +1,78 @@ +{ + "type" : "line", + "listeners" : {}, + "title" : "Soledad benchmark for {{{title}}}", + "params" : { + "legendPosition" : "right", + "defaultYExtents" : false, + "setYExtents" : false, + "drawLinesBetweenPoints" : true, + "interpolate" : "linear", + "addTimeMarker" : false, + "radiusRatio" : 9, + "showCircles" : true, + "scale" : "linear", + "addTooltip" : true, + "addLegend" : true, + "times" : [] + }, + "aggs" : [ + { + "type" : "avg", + "schema" : "metric", + "params" : { + "field" : "stats.median" + }, + "enabled" : true, + "id" : "1" + }, + { + "enabled" : true, + "id" : "2", + "params" : { + "order" : "asc", + "orderBy" : "custom", + "field" : "commit_id_and_date", + "size" : 1000, + "orderAgg" : { + "params" : { + "field" : "commit_info.time" + }, + "schema" : "orderAgg", + "type" : "min", + "enabled" : true, + "id" : "2-orderAgg" + } + }, + "schema" : "segment", + "type" : "terms" + }, + { + "enabled" : true, + "id" : "3", + "schema" : "metric", + "params" : { + "field" : "stats.mean" + }, + "type" : "avg" + }, + { + "id" : "4", + "enabled" : true, + "type" : "avg", + "schema" : "metric", + "params" : { + "field" : "stats.iqr" + } + }, + { + "type" : "avg", + "schema" : "metric", + "params" : { + "field" : "stats.stddev" + }, + "id" : "5", + "enabled" : true + } + ] +} diff --git a/elastic/templates/visualization.mustache b/elastic/templates/visualization.mustache new file mode 100644 index 0000000..8a9def1 --- /dev/null +++ b/elastic/templates/visualization.mustache @@ -0,0 +1,10 @@ +{ + "title" : "{{{title}}}", + "visState" : {{{visState}}}, + "uiStateJSON" : "{}", + "description" : "Soledad benchmark for {{{title}}}", + "version" : 1, + "kibanaSavedObjectMeta" : { + "searchSourceJSON": {{{searchSourceJSON}}} + } +} -- cgit v1.2.3