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-15272. Grafana - clear query editor on component update. (Prajwal Rao via yusaku)
Date Wed, 02 Mar 2016 22:13:28 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk cea5d2cdb -> 06747adfd


AMBARI-15272. Grafana - clear query editor on component update. (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/06747adf
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/06747adf
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/06747adf

Branch: refs/heads/trunk
Commit: 06747adfdfea80869b07cd097cb1926877b8df57
Parents: cea5d2c
Author: Yusaku Sako <yusaku@hortonworks.com>
Authored: Wed Mar 2 14:13:07 2016 -0800
Committer: Yusaku Sako <yusaku@hortonworks.com>
Committed: Wed Mar 2 14:13:07 2016 -0800

----------------------------------------------------------------------
 .../ambari-metrics-grafana/ambari-metrics/queryCtrl.js         | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/06747adf/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 e59459f..6c231dd 100644
--- a/ambari-metrics/ambari-metrics-grafana/ambari-metrics/queryCtrl.js
+++ b/ambari-metrics/ambari-metrics-grafana/ambari-metrics/queryCtrl.js
@@ -45,6 +45,12 @@ define([
               $scope.target.aggregator = 'avg';
             }
           });
+          $scope.$watch('target.app', function (newValue) {
+            if (newValue === '') {
+              $scope.target.metric = '';
+              $scope.target.hosts = '';
+            }
+          });
 
           if (!$scope.target.downsampleAggregator) {
             $scope.target.downsampleAggregator = 'avg';


Mime
View raw message