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-11364. Unable to build 'Expression2' in the Template Widget. (jaimin)
Date Mon, 25 May 2015 02:10:20 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 75a806cc6 -> 2f218e7ea


AMBARI-11364. Unable to build 'Expression2' in the Template Widget. (jaimin)


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

Branch: refs/heads/trunk
Commit: 2f218e7eadb1b7083835f2542f4fd599b4f85c2f
Parents: 75a806c
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Sun May 24 19:09:47 2015 -0700
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Sun May 24 19:09:47 2015 -0700

----------------------------------------------------------------------
 .../main/service/widgets/create/step2_controller.js           | 1 +
 .../app/views/main/service/widgets/create/expression_view.js  | 7 +++----
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/2f218e7e/ambari-web/app/controllers/main/service/widgets/create/step2_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/widgets/create/step2_controller.js b/ambari-web/app/controllers/main/service/widgets/create/step2_controller.js
index 0b53300..d1ad4e1 100644
--- a/ambari-web/app/controllers/main/service/widgets/create/step2_controller.js
+++ b/ambari-web/app/controllers/main/service/widgets/create/step2_controller.js
@@ -180,6 +180,7 @@ App.WidgetWizardStep2Controller = Em.Controller.extend({
       label: Em.I18n.t('dashboard.widgets.wizard.step2.dataSeries').format(id),
       isRemovable: !isDefault,
       expression: Em.Object.create({
+        id: id,
         data: [],
         isInvalid: false,
         isEmpty: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/2f218e7e/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 25caf6d..919e207 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
@@ -298,10 +298,9 @@ App.AddMetricExpressionView = Em.View.extend({
   componentMap: function () {
     var servicesMap = {};
     var result = [];
-    var components = [];
     var masterNames = App.StackServiceComponent.find().filterProperty('isMaster').mapProperty('componentName');
     var parentView = this.get('parentView');
-
+    var expressionId = "_" + parentView.get('expression.id');
     if (this.get('controller.filteredMetrics')) {
       this.get('controller.filteredMetrics').forEach(function (metric) {
         var service = servicesMap[metric.service_name];
@@ -352,8 +351,8 @@ App.AddMetricExpressionView = Em.View.extend({
           count: servicesMap[serviceName].components[componentId].count,
           metrics: servicesMap[serviceName].components[componentId].metrics.uniq().sort(),
           selected: false,
-          id: componentId,
-          aggregatorId: componentId + '_aggregator',
+          id: componentId + expressionId,
+          aggregatorId: componentId + expressionId + '_aggregator',
           serviceName: serviceName,
           showAggregateSelect: function () {
             return this.get('level') === 'COMPONENT';


Mime
View raw message