You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2015/06/07 00:17:47 UTC

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

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 <ja...@hortonworks.com>
Authored: Sat Jun 6 15:17:21 2015 -0700
Committer: Jaimin Jetly <ja...@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);
   },