From e1b82e72ebe901801fec23064bdbd4576b04bd3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20L=C3=B3pez?= Date: Wed, 18 Jan 2017 16:02:40 +0100 Subject: [PATCH] Fix empty value tags and comma separated values (#7289) When a tag doesn't have a value it was showing a empty 'bubble'. If value has several values separated by commas, make a 'bubble' for each one. --- public/app/plugins/datasource/influxdb/influx_series.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/app/plugins/datasource/influxdb/influx_series.js b/public/app/plugins/datasource/influxdb/influx_series.js index c422bb87d00..6d35b020075 100644 --- a/public/app/plugins/datasource/influxdb/influx_series.js +++ b/public/app/plugins/datasource/influxdb/influx_series.js @@ -98,7 +98,8 @@ function (_, TableModel) { annotation: self.annotation, time: + new Date(value[timeCol]), title: value[titleCol], - tags: tagsCol.map(function(t) { return value[t]; }), + // Remove empty values, then split in different tags for comma separated values + tags: _.flatten(tagsCol.filter(function (t) { return value[t]; }).map(function(t) { return value[t].split(","); })), text: value[textCol] };