Browse Source

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.
Adrián López 9 years ago
parent
commit
e1b82e72eb
1 changed files with 2 additions and 1 deletions
  1. 2 1
      public/app/plugins/datasource/influxdb/influx_series.js

+ 2 - 1
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]
         };