Parcourir la source

When performing a metric find query, the InfluxDb9 datasource needs a query type in order to return results succesfully. This parameter is not available when called from the templateValuesSrv, which is causing an error

David Raifaizen il y a 10 ans
Parent
commit
2d016c5a3f
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      public/app/plugins/datasource/influxdb/datasource.js

+ 3 - 0
public/app/plugins/datasource/influxdb/datasource.js

@@ -105,6 +105,9 @@ function (angular, _, kbn, InfluxSeries, InfluxQueryBuilder) {
         case 'TAG_VALUES':
           var tagValues = _.flatten(series.values);
           return _.map(tagValues, function(tagValue) { return { text: tagValue, expandable: true }; });
+        default: // template values service does not pass in a a query type
+          var flattenedValues = _.flatten(series.values);
+          return _.map(flattenedValues, function(value) { return { text: value, expandable: true }; });
         }
       });
     };