ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akovale...@apache.org
Subject ambari git commit: AMBARI-14071. Improve Config groups js code (akovalenko)
Date Wed, 25 Nov 2015 17:21:21 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 498fa8d24 -> 50555f390


AMBARI-14071. Improve Config groups js code (akovalenko)


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

Branch: refs/heads/branch-2.1
Commit: 50555f390faa1bb232d1d57b2011227a04757e8d
Parents: 498fa8d
Author: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Authored: Wed Nov 25 18:11:22 2015 +0200
Committer: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Committed: Wed Nov 25 18:12:43 2015 +0200

----------------------------------------------------------------------
 .../main/service/manage_config_groups_controller.js            | 2 +-
 .../app/mixins/main/service/configs/config_overridable.js      | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/50555f39/ambari-web/app/controllers/main/service/manage_config_groups_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/manage_config_groups_controller.js b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js
index 0981e77..c208df7 100644
--- a/ambari-web/app/controllers/main/service/manage_config_groups_controller.js
+++ b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js
@@ -693,7 +693,7 @@ App.ManageConfigGroupsController = Em.Controller.extend(App.ConfigOverridable,
{
           parentConfigGroup: defaultConfigGroup,
           service: Em.Object.create({id: self.get('serviceName')}),
           hosts: [],
-          configSiteTags: [],
+          desiredConfigs: [],
           properties: []
         });
         if (duplicated) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/50555f39/ambari-web/app/mixins/main/service/configs/config_overridable.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/main/service/configs/config_overridable.js b/ambari-web/app/mixins/main/service/configs/config_overridable.js
index 3bf4410..ad9b962 100644
--- a/ambari-web/app/mixins/main/service/configs/config_overridable.js
+++ b/ambari-web/app/mixins/main/service/configs/config_overridable.js
@@ -275,7 +275,7 @@ App.ConfigOverridable = Em.Mixin.create({
    * @method updateConfigurationGroup
    */
   updateConfigurationGroup: function (configGroup, successCallback, errorCallback) {
-    var configSiteTags = configGroup.get('configSiteTags') || [];
+    var configSiteTags = configGroup.get('configSiteTags') || configGroup.get('desiredConfigs')
|| [];
     var putConfigGroup = {
       ConfigGroup: {
         group_name: configGroup.get('name'),
@@ -288,8 +288,8 @@ App.ConfigOverridable = Em.Mixin.create({
         }),
         desired_configs: configSiteTags.map(function (cst) {
           return {
-            type: cst.get('site'),
-            tag: cst.get('tag')
+            type: Em.get(cst, 'site') || Em.get(cst, 'type'),
+            tag: Em.get(cst, 'tag')
           };
         })
       }


Mime
View raw message