Commit d57ffad5 by Masaori Koshiba

Add a space between arguments

parent 32275cb0
...@@ -44,7 +44,7 @@ function (angular, _, kbn) { ...@@ -44,7 +44,7 @@ function (angular, _, kbn) {
d.resolve({ data: [] }); d.resolve({ data: [] });
return d.promise; 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) { ...@@ -56,8 +56,8 @@ function (angular, _, kbn) {
metrics: queries metrics: queries
}; };
reqBody.cache_time = 0; reqBody.cache_time = 0;
convertToKairosTime(start,reqBody,'start'); convertToKairosTime(start, reqBody, 'start');
convertToKairosTime(end,reqBody,'end'); convertToKairosTime(end, reqBody, 'end');
var options = { var options = {
method: 'POST', method: 'POST',
url: '/api/v1/datapoints/query', url: '/api/v1/datapoints/query',
...@@ -86,10 +86,10 @@ function (angular, _, kbn) { ...@@ -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) && if (tagList && (metricname === tagList.metricName) && (range.from === tagList.range.from) &&
(range.to === tagList.range.to)) { (range.to === tagList.range.to)) {
return getTagListFromResponse(tagList.results,type,keyValue); return getTagListFromResponse(tagList.results, type, keyValue);
} }
tagList = { tagList = {
metricName:metricname, metricName:metricname,
...@@ -98,8 +98,8 @@ function (angular, _, kbn) { ...@@ -98,8 +98,8 @@ function (angular, _, kbn) {
var body = { var body = {
metrics : [{name : metricname}] metrics : [{name : metricname}]
}; };
convertToKairosTime(range.from,body,'start'); convertToKairosTime(range.from, body, 'start');
convertToKairosTime(range.to,body,'end'); convertToKairosTime(range.to, body, 'end');
var options = { var options = {
url : this.url + '/api/v1/datapoints/query/tags', url : this.url + '/api/v1/datapoints/query/tags',
method : 'POST', method : 'POST',
...@@ -107,7 +107,7 @@ function (angular, _, kbn) { ...@@ -107,7 +107,7 @@ function (angular, _, kbn) {
}; };
return $http(options).then(function(results) { return $http(options).then(function(results) {
tagList.results = results; tagList.results = results;
return getTagListFromResponse(results,type,keyValue); return getTagListFromResponse(results, type, keyValue);
}); });
}; };
...@@ -116,14 +116,14 @@ function (angular, _, kbn) { ...@@ -116,14 +116,14 @@ function (angular, _, kbn) {
/// Formatting methods /// Formatting methods
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
function getTagListFromResponse(results,type,keyValue) { function getTagListFromResponse(results, type, keyValue) {
if (!results.data) { if (!results.data) {
return []; return [];
} }
if (type === "key") { if (type === "key") {
return _.keys(results.data.queries[0].results[0].tags); 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 results.data.queries[0].results[0].tags[keyValue];
} }
return []; return [];
...@@ -194,7 +194,7 @@ function (angular, _, kbn) { ...@@ -194,7 +194,7 @@ function (angular, _, kbn) {
return output2; return output2;
} }
function convertTargetToQuery(options,target) { function convertTargetToQuery(options, target) {
if (!target.metric || target.hide) { if (!target.metric || target.hide) {
return null; return null;
} }
......
...@@ -72,12 +72,12 @@ function (angular, _) { ...@@ -72,12 +72,12 @@ function (angular, _) {
}; };
$scope.suggestTagKeys = function(query, callback) { $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) { $scope.suggestTagValues = function(query, callback) {
callback($scope.datasource 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 // Filter metric by tag
...@@ -94,7 +94,7 @@ function (angular, _) { ...@@ -94,7 +94,7 @@ function (angular, _) {
$scope.validateFilterTag(); $scope.validateFilterTag();
if (!$scope.target.errors.tags) { 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] = [];
} }
$scope.target.tags[$scope.target.currentTagKey].push($scope.target.currentTagValue); $scope.target.tags[$scope.target.currentTagKey].push($scope.target.currentTagValue);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment