ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject ambari git commit: AMBARI-19701. Provide minimal call context from UI when making stack advisor calls. (rzang via yusaku)
Date Wed, 25 Jan 2017 18:53:55 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 8a4439e55 -> 4c9ebb590


AMBARI-19701. Provide minimal call context from UI when making stack advisor calls. (rzang
via yusaku)


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

Branch: refs/heads/branch-2.5
Commit: 4c9ebb590b2432878019c2fe0a52c0dd9b9f4db3
Parents: 8a4439e
Author: Yusaku Sako <yusaku@hortonworks.com>
Authored: Wed Jan 25 10:53:35 2017 -0800
Committer: Yusaku Sako <yusaku@hortonworks.com>
Committed: Wed Jan 25 10:53:35 2017 -0800

----------------------------------------------------------------------
 .../mixins/common/configs/enhanced_configs.js   | 21 +++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4c9ebb59/ambari-web/app/mixins/common/configs/enhanced_configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js b/ambari-web/app/mixins/common/configs/enhanced_configs.js
index aece4c2..4bdc25f 100644
--- a/ambari-web/app/mixins/common/configs/enhanced_configs.js
+++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js
@@ -194,7 +194,7 @@ App.EnhancedConfigsMixin = Em.Mixin.create(App.ConfigWithOverrideRecommendationP
       } else {
         delete recommendations.config_groups;
       }
-
+      this.setUserContext(dataToSend);
       if (stepConfigs.someProperty('serviceName', 'MISC')) {
         recommendations.blueprint.configurations = blueprintUtils.buildConfigsJSON(stepConfigs);
         dataToSend.recommendations = recommendations;
@@ -241,6 +241,25 @@ App.EnhancedConfigsMixin = Em.Mixin.create(App.ConfigWithOverrideRecommendationP
     });
   },
 
+  setUserContext: function(dataToSend) {
+    var controllerName = this.get('content.controllerName');
+    var changes = dataToSend.changed_configurations;
+    if (changes) {
+      dataToSend['user-context'] = {"operation" : "EditConfig"};
+    } else {
+      if (!controllerName) {
+        dataToSend['user-context'] = {"operation" : "RecommendAttribute"};
+      } else if (controllerName == 'addServiceController') {
+        dataToSend['user-context'] = {
+          "operation" : "AddService",
+          "operation_details" : (this.get('content.services')|| []).filterProperty('isSelected').filterProperty('isInstalled',
false).mapProperty('serviceName').join(',')
+        };
+      } else if (controllerName == 'installerController'){
+        dataToSend['user-context'] = {"operation" : "ClusterCreate"};
+      }
+    }
+  },
+
   /**
    * Defines if there is any changes made by user.
    * Check all properties except recommended properties from popup


Mime
View raw message