ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiw...@apache.org
Subject ambari git commit: AMBARI-11773. Widgets: should allow add w/o selecting aggregation.(xiwang)
Date Mon, 08 Jun 2015 03:11:29 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 b9203ed3c -> 9d038ca94


AMBARI-11773. Widgets: should allow add w/o selecting aggregation.(xiwang)


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

Branch: refs/heads/branch-2.1
Commit: 9d038ca94acc3772aecec0bc2a67870483270115
Parents: b9203ed
Author: Xi Wang <xiwang@apache.org>
Authored: Sun Jun 7 16:35:07 2015 -0700
Committer: Xi Wang <xiwang@apache.org>
Committed: Sun Jun 7 20:11:03 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/9d038ca9/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 7d1a661..7216dde 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
@@ -234,6 +234,12 @@ App.AddMetricExpressionView = Em.View.extend({
           selectedMetric.hostComponentCriteria = self.get('currentSelectedComponent.hostComponentCriteria');
         }
         self.set('currentSelectedComponent.selectedMetric', selectedMetric);
+        if (self.get('currentSelectedComponent.selectedAggregation') == Em.I18n.t('dashboard.widgets.wizard.step2.aggregateFunction.scanOps'))
{
+          var aggregatorId = "#" + self.get('currentSelectedComponent.aggregatorId');
+          var defaultAggregator = self.get('parentView.AGGREGATE_FUNCTIONS')[0];
+          $(aggregatorId).val(1).trigger("chosen:updated");
+          self.set('currentSelectedComponent.selectedAggregation', defaultAggregator);
+        }
       }
     })
   }.property(),


Mime
View raw message