feat(editor): more work on editor components, extracing things and making reusable directives

This commit is contained in:
Torkel Ödegaard
2015-09-05 10:14:21 +02:00
parent 0d2e13549a
commit c48f24d269
8 changed files with 25 additions and 156 deletions

View File

@@ -190,12 +190,12 @@ function (angular, _, config, kbn, moment, ElasticQueryBuilder) {
metric = target.metrics[y];
seriesName = parentName;
if (metric.field) {
seriesName += ' ' + metric.field + ' ' + metric.type;
value = bucket['m' + y.toString()].value;
} else {
if (metric.type === 'count') {
seriesName += ' count';
value = bucket.doc_count;
} else {
seriesName += ' ' + metric.field + ' ' + metric.type;
value = bucket['m' + y.toString()].value;
}
var serie = series[seriesName] = series[seriesName] || {target: seriesName, datapoints: []};