add double quotes around tags

This commit is contained in:
Haneysmith, Nathan 2015-07-07 11:56:36 -07:00
parent f6ad386ba7
commit f237cac074

View File

@ -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) {