From 453c6aa5828ada729e9f0e29014a73ab4fd3335a Mon Sep 17 00:00:00 2001 From: Chris Goller Date: Wed, 5 Apr 2017 23:19:15 -0500 Subject: [PATCH] Update influxql.js to use lodash in case of null tags --- ui/src/utils/influxql.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/src/utils/influxql.js b/ui/src/utils/influxql.js index a5e2630f8..96f62c166 100644 --- a/ui/src/utils/influxql.js +++ b/ui/src/utils/influxql.js @@ -1,3 +1,6 @@ + +import _ from 'lodash' + export default function buildInfluxQLQuery(timeBounds, config) { const {groupBy, tags, areTagsAccepted} = config const {upper, lower} = timeBounds @@ -54,7 +57,7 @@ function _buildWhereClause({lower, upper, tags, areTagsAccepted}) { // If a tag key has more than one value, * e.g. cpu=cpu1, cpu=cpu2, combine // them with OR instead of AND for the final query. - const tagClauses = Object.keys(tags).map((k) => { + const tagClauses = _.keys(tags).map((k) => { const operator = areTagsAccepted ? '=' : '!=' if (tags[k].length > 1) {