Fixed queryCtrl to use suggest API

This commit is contained in:
utkarshcmu 2015-10-29 11:13:38 -07:00
parent 0dc0e03c4c
commit 2a8904f844

View File

@ -48,13 +48,13 @@ function (angular, _, kbn) {
}; };
$scope.suggestTagKeys = function(query, callback) { $scope.suggestTagKeys = function(query, callback) {
$scope.datasource.metricFindQuery('tag_names(' + $scope.target.metric + ')') $scope.datasource.metricFindQuery('suggest_tagk(' + query + ')')
.then($scope.getTextValues) .then($scope.getTextValues)
.then(callback); .then(callback);
}; };
$scope.suggestTagValues = function(query, callback) { $scope.suggestTagValues = function(query, callback) {
$scope.datasource.metricFindQuery('tag_values(' + $scope.target.metric + ',' + $scope.target.currentTagKey + ')') $scope.datasource.metricFindQuery('suggest_tagv(' + query + ')')
.then($scope.getTextValues) .then($scope.getTextValues)
.then(callback); .then(callback);
}; };