You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2016/03/02 23:13:28 UTC

ambari git commit: AMBARI-15272. Grafana - clear query editor on component update. (Prajwal Rao via yusaku)

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 <yu...@hortonworks.com>
Authored: Wed Mar 2 14:13:07 2016 -0800
Committer: Yusaku Sako <yu...@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';