You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sr...@apache.org on 2013/11/20 00:07:08 UTC

git commit: AMBARI-3819. Adding hosts to a config-group erases tags and vice-versa. (srimanth)

Updated Branches:
  refs/heads/trunk 6050e5ea1 -> 15d4ebdef


AMBARI-3819. Adding hosts to a config-group erases tags and vice-versa. (srimanth)


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

Branch: refs/heads/trunk
Commit: 15d4ebdef0a54380a0eda1715c3557820a516be6
Parents: 6050e5e
Author: Srimanth Gunturi <sg...@hortonworks.com>
Authored: Tue Nov 19 14:42:53 2013 -0800
Committer: Srimanth Gunturi <sg...@hortonworks.com>
Committed: Tue Nov 19 14:43:15 2013 -0800

----------------------------------------------------------------------
 .../controllers/main/service/manage_config_groups_controller.js | 5 +++++
 ambari-web/app/utils/config.js                                  | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/15d4ebde/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 01284fb..532a404 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
@@ -84,7 +84,12 @@ App.ManageConfigGroupsController = Em.Controller.extend({
         });
         usedHosts = usedHosts.concat(newConfigGroup.get('hosts'));
         configGroups.push(newConfigGroup);
+        var newConfigGroupSiteTags = newConfigGroup.get('configSiteTags');
         configGroup.desired_configs.forEach(function (config) {
+          newConfigGroupSiteTags.push(App.ConfigSiteTag.create({
+            site: config.type,
+            tag: config.tag
+          }));
           if (!groupToTypeToTagMap[configGroup.group_name]) {
             groupToTypeToTagMap[configGroup.group_name] = {}
           }

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/15d4ebde/ambari-web/app/utils/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index 6ea360c..105eca7 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -1162,8 +1162,8 @@ App.config = Em.Object.create({
     });
     configGroup.get('configSiteTags').forEach(function(cst){
       putConfigGroup.ConfigGroup.desired_configs.push({
-        type: cst.type,
-        tag: cst.tag
+        type: cst.get('site'),
+        tag: cst.get('tag')
       });
     });