From f237cac074f916557d07cb022995635bcbc7375b Mon Sep 17 00:00:00 2001 From: "Haneysmith, Nathan" Date: Tue, 7 Jul 2015 11:56:36 -0700 Subject: [PATCH] add double quotes around tags --- public/app/plugins/datasource/influxdb/queryBuilder.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/app/plugins/datasource/influxdb/queryBuilder.js b/public/app/plugins/datasource/influxdb/queryBuilder.js index ce76e545743..a167abb81d6 100644 --- a/public/app/plugins/datasource/influxdb/queryBuilder.js +++ b/public/app/plugins/datasource/influxdb/queryBuilder.js @@ -15,9 +15,9 @@ function (_) { } if (tag.value && tag.value[0] === '/' && tag.value[tag.value.length - 1] === '/') { - return str + tag.key + ' =~ ' + tag.value; + return str + '"' +tag.key + '"' + ' =~ ' + tag.value; } - return str + tag.key + " = '" + tag.value + "'"; + return str + '"' + tag.key + '"' + " = '" + tag.value + "'"; } var p = InfluxQueryBuilder.prototype; @@ -92,7 +92,7 @@ function (_) { query += ' GROUP BY time($interval)'; if (target.groupByTags && target.groupByTags.length > 0) { - query += ', ' + target.groupByTags.join(); + query += ', "' + target.groupByTags.join('", "') + '"'; } if (target.fill) {