ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject ambari git commit: AMBARI-15271. Precision in grafana set to minutes by default. (Prajwal Rao via yusaku)
Date Wed, 02 Mar 2016 21:48:01 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk eb166d6f5 -> cea5d2cdb


AMBARI-15271. Precision in grafana set to minutes by default. (Prajwal Rao via yusaku)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cea5d2cd
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cea5d2cd
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cea5d2cd

Branch: refs/heads/trunk
Commit: cea5d2cdb9ff652c91e9e96bb2668592c69a2f5a
Parents: eb166d6
Author: Yusaku Sako <yusaku@hortonworks.com>
Authored: Wed Mar 2 13:47:26 2016 -0800
Committer: Yusaku Sako <yusaku@hortonworks.com>
Committed: Wed Mar 2 13:47:26 2016 -0800

----------------------------------------------------------------------
 .../ambari-metrics-grafana/ambari-metrics/datasource.js          | 4 ++--
 .../ambari-metrics-grafana/ambari-metrics/queryCtrl.js           | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/cea5d2cd/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js b/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js
index 43de3dd..6553008 100644
--- a/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js
+++ b/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js
@@ -126,7 +126,7 @@ define([
 
           };
           var getHostAppIdData = function(target) {
-            var precision = target.shouldAddPrecision ? '&precision=' + target.precision
: '';
+            var precision = target.shouldAddPrecision && target.precision !== ''
? '&precision=' + target.precision : '';
             var rate = target.shouldComputeRate ? '._rate._' : '._';
             target.aggregator = target.precision !== "seconds" ? target.aggregator : '';
             return backendSrv.get(self.url + '/ws/v1/timeline/metrics?metricNames=' + target.metric
+ rate +
@@ -141,7 +141,7 @@ define([
 
           var getServiceAppIdData = function(target) {
             var tHost = (_.isEmpty(templateSrv.variables)) ? templatedHost : target.templatedHost;
-            var precision = target.shouldAddPrecision ? '&precision=' + target.precision
: '';
+            var precision = target.shouldAddPrecision && target.precision !== ''
? '&precision=' + target.precision : '';
             var rate = target.shouldComputeRate ? '._rate._' : '._';
             return backendSrv.get(self.url + '/ws/v1/timeline/metrics?metricNames=' + target.metric
+ rate
               + target.aggregator + '&hostname=' + tHost + '&appId=' + target.app
+ '&startTime=' + from +

http://git-wip-us.apache.org/repos/asf/ambari/blob/cea5d2cd/ambari-metrics/ambari-metrics-grafana/ambari-metrics/queryCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-grafana/ambari-metrics/queryCtrl.js b/ambari-metrics/ambari-metrics-grafana/ambari-metrics/queryCtrl.js
index 97b76b9..e59459f 100644
--- a/ambari-metrics/ambari-metrics-grafana/ambari-metrics/queryCtrl.js
+++ b/ambari-metrics/ambari-metrics-grafana/ambari-metrics/queryCtrl.js
@@ -39,7 +39,6 @@ define([
             $scope.target.precision = '';
           }
 
-          $scope.target.precision = $scope.precisions[1];
           
           $scope.$watch('target.precision', function() {
             if ($scope.target.precision !== "seconds") {


Mime
View raw message