mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Add a space between arguments
This commit is contained in:
parent
32275cb009
commit
d57ffad5e1
@ -44,7 +44,7 @@ function (angular, _, kbn) {
|
||||
d.resolve({ data: [] });
|
||||
return d.promise;
|
||||
}
|
||||
return this.performTimeSeriesQuery(queries, start, end).then(handleKairosDBQueryResponseAlias,handleQueryError);
|
||||
return this.performTimeSeriesQuery(queries, start, end).then(handleKairosDBQueryResponseAlias, handleQueryError);
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
@ -56,8 +56,8 @@ function (angular, _, kbn) {
|
||||
metrics: queries
|
||||
};
|
||||
reqBody.cache_time = 0;
|
||||
convertToKairosTime(start,reqBody,'start');
|
||||
convertToKairosTime(end,reqBody,'end');
|
||||
convertToKairosTime(start, reqBody, 'start');
|
||||
convertToKairosTime(end, reqBody, 'end');
|
||||
var options = {
|
||||
method: 'POST',
|
||||
url: '/api/v1/datapoints/query',
|
||||
@ -86,10 +86,10 @@ function (angular, _, kbn) {
|
||||
|
||||
};
|
||||
|
||||
KairosDBDatasource.prototype.performTagSuggestQuery = function(metricname,range,type,keyValue) {
|
||||
KairosDBDatasource.prototype.performTagSuggestQuery = function(metricname, range, type, keyValue) {
|
||||
if (tagList && (metricname === tagList.metricName) && (range.from === tagList.range.from) &&
|
||||
(range.to === tagList.range.to)) {
|
||||
return getTagListFromResponse(tagList.results,type,keyValue);
|
||||
return getTagListFromResponse(tagList.results, type, keyValue);
|
||||
}
|
||||
tagList = {
|
||||
metricName:metricname,
|
||||
@ -98,8 +98,8 @@ function (angular, _, kbn) {
|
||||
var body = {
|
||||
metrics : [{name : metricname}]
|
||||
};
|
||||
convertToKairosTime(range.from,body,'start');
|
||||
convertToKairosTime(range.to,body,'end');
|
||||
convertToKairosTime(range.from, body, 'start');
|
||||
convertToKairosTime(range.to, body, 'end');
|
||||
var options = {
|
||||
url : this.url + '/api/v1/datapoints/query/tags',
|
||||
method : 'POST',
|
||||
@ -107,7 +107,7 @@ function (angular, _, kbn) {
|
||||
};
|
||||
return $http(options).then(function(results) {
|
||||
tagList.results = results;
|
||||
return getTagListFromResponse(results,type,keyValue);
|
||||
return getTagListFromResponse(results, type, keyValue);
|
||||
});
|
||||
|
||||
};
|
||||
@ -116,14 +116,14 @@ function (angular, _, kbn) {
|
||||
/// Formatting methods
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function getTagListFromResponse(results,type,keyValue) {
|
||||
function getTagListFromResponse(results, type, keyValue) {
|
||||
if (!results.data) {
|
||||
return [];
|
||||
}
|
||||
if (type === "key") {
|
||||
return _.keys(results.data.queries[0].results[0].tags);
|
||||
}
|
||||
else if (type === "value" && _.has(results.data.queries[0].results[0].tags,keyValue)) {
|
||||
else if (type === "value" && _.has(results.data.queries[0].results[0].tags, keyValue)) {
|
||||
return results.data.queries[0].results[0].tags[keyValue];
|
||||
}
|
||||
return [];
|
||||
@ -194,7 +194,7 @@ function (angular, _, kbn) {
|
||||
return output2;
|
||||
}
|
||||
|
||||
function convertTargetToQuery(options,target) {
|
||||
function convertTargetToQuery(options, target) {
|
||||
if (!target.metric || target.hide) {
|
||||
return null;
|
||||
}
|
||||
|
@ -72,12 +72,12 @@ function (angular, _) {
|
||||
};
|
||||
|
||||
$scope.suggestTagKeys = function(query, callback) {
|
||||
callback($scope.datasource.performTagSuggestQuery($scope.target.metric, $scope.rangeUnparsed, 'key',''));
|
||||
callback($scope.datasource.performTagSuggestQuery($scope.target.metric, $scope.rangeUnparsed, 'key', ''));
|
||||
};
|
||||
|
||||
$scope.suggestTagValues = function(query, callback) {
|
||||
callback($scope.datasource
|
||||
.performTagSuggestQuery($scope.target.metric,$scope.rangeUnparsed, 'value',$scope.target.currentTagKey));
|
||||
.performTagSuggestQuery($scope.target.metric, $scope.rangeUnparsed, 'value', $scope.target.currentTagKey));
|
||||
};
|
||||
|
||||
// Filter metric by tag
|
||||
@ -94,7 +94,7 @@ function (angular, _) {
|
||||
|
||||
$scope.validateFilterTag();
|
||||
if (!$scope.target.errors.tags) {
|
||||
if (!_.has($scope.target.tags,$scope.target.currentTagKey)) {
|
||||
if (!_.has($scope.target.tags, $scope.target.currentTagKey)) {
|
||||
$scope.target.tags[$scope.target.currentTagKey] = [];
|
||||
}
|
||||
$scope.target.tags[$scope.target.currentTagKey].push($scope.target.currentTagValue);
|
||||
|
Loading…
Reference in New Issue
Block a user