feat(elasticsearch): added new templating all format and muli format named , also added automatic setting of correct all and multi format depending on data source, closes #2696

This commit is contained in:
Torkel Ödegaard
2015-09-22 14:29:41 +02:00
parent b37f9a7db0
commit f632b3b029
11 changed files with 74 additions and 20 deletions

View File

@@ -233,6 +233,9 @@ function (angular, _, moment, kbn, ElasticQueryBuilder, IndexPattern, ElasticRes
ElasticDatasource.prototype.metricFindQuery = function(query) {
query = templateSrv.replace(query);
query = angular.fromJson(query);
if (!query) {
return $q.when([]);
}
if (query.find === 'fields') {
return this.getFields(query);

View File

@@ -12,6 +12,7 @@
"annotations": "app/plugins/datasource/elasticsearch/partials/annotations.editor.html"
},
"defaultMatchFormat": "lucene",
"annotations": true,
"metrics": true
}

View File

@@ -11,6 +11,7 @@
"config": "app/plugins/datasource/graphite/partials/config.html"
},
"defaultMatchFormat": "glob",
"metrics": true,
"annotations": true
}

View File

@@ -11,6 +11,7 @@
"config": "app/plugins/datasource/influxdb/partials/config.html"
},
"defaultMatchFormat": "regex values",
"metrics": true,
"annotations": true
}

View File

@@ -11,6 +11,7 @@
"config": "app/plugins/datasource/influxdb_08/partials/config.html"
},
"defaultMatchFormat": "regex values",
"metrics": true,
"annotations": true
}