ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject ambari git commit: AMBARI-11761. Dropdowns should be reset after metric is added or selection is cancelled. (jaimin)
Date Sat, 06 Jun 2015 22:17:47 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 9dea997be -> cf6cb47c3


AMBARI-11761. Dropdowns should be reset after metric is added or selection is cancelled. (jaimin)


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

Branch: refs/heads/trunk
Commit: cf6cb47c3689204ba6390002196c08dba629649d
Parents: 9dea997
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Sat Jun 6 15:17:21 2015 -0700
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Sat Jun 6 15:17:27 2015 -0700

----------------------------------------------------------------------
 .../app/views/main/service/widgets/create/expression_view.js   | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/cf6cb47c/ambari-web/app/views/main/service/widgets/create/expression_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/widgets/create/expression_view.js b/ambari-web/app/views/main/service/widgets/create/expression_view.js
index dc1f493..7d1a661 100644
--- a/ambari-web/app/views/main/service/widgets/create/expression_view.js
+++ b/ambari-web/app/views/main/service/widgets/create/expression_view.js
@@ -292,6 +292,12 @@ App.AddMetricExpressionView = Em.View.extend({
    */
   cancel: function () {
     $(".service-level-dropdown").parent().removeClass('open');
+    var id =  "#" + this.get('currentSelectedComponent.id');
+    var aggregatorId = "#" + this.get('currentSelectedComponent.aggregatorId');
+    $(id).val('').trigger("chosen:updated");
+    $(aggregatorId).val('').trigger("chosen:updated");
+    this.set('currentSelectedComponent.selectedAggregation', Em.I18n.t('dashboard.widgets.wizard.step2.aggregateFunction.scanOps'));
+    this.set('currentSelectedComponent.selectedMetric', null);
   },
 
 


Mime
View raw message