Updated Branches:
  refs/heads/trunk a1ae35eb5 -> 47b80c59f

AMBARI-3831. Add/Remove/Rename/Duplicate action changes not reflected in 
configs page (alexantonenko)


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

Branch: refs/heads/trunk
Commit: 47b80c59fe761f2fa7a3e6886708dd4a44d3f485
Parents: a1ae35e
Author: Alex Antonenko <hiv...@gmail.com>
Authored: Wed Nov 20 21:13:08 2013 +0200
Committer: Alex Antonenko <hiv...@gmail.com>
Committed: Wed Nov 20 21:20:49 2013 +0200

----------------------------------------------------------------------
 ambari-web/app/controllers/main/service/item.js | 21 ++++++++++++++++++++
 1 file changed, 21 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/47b80c59/ambari-web/app/controllers/main/service/item.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/item.js 
b/ambari-web/app/controllers/main/service/item.js
index 86b660e..5843eba 100644
--- a/ambari-web/app/controllers/main/service/item.js
+++ b/ambari-web/app/controllers/main/service/item.js
@@ -260,13 +260,34 @@ App.MainServiceItemController = Em.Controller.extend({
             }
           }
         };
+        this.updateConfigGroupOnServicePage();
         modifiedConfigGroups.forEach(function(cg) {
           App.config.updateConfigurationGroup(cg, finishFunction, 
finishFunction);
         });
       },
+      onSecondary: function () {
+        this.updateConfigGroupOnServicePage();
+        this.hide();
+      },
+      onClose: function () {
+        this.updateConfigGroupOnServicePage();
+        this.hide();
+      },
       subViewController: function(){
         return App.router.get('manageConfigGroupsController');
       }.property('App.router.manageConfigGroupsController'),
+      updateConfigGroupOnServicePage: function () {
+        var mainServiceInfoConfigsController = 
App.get('router.mainServiceInfoConfigsController');
+        var selectedConfigGroup = 
mainServiceInfoConfigsController.get('selectedConfigGroup');
+        var managedConfigGroups = this.get('subViewController.configGroups');
+        selectedConfigGroup = managedConfigGroups.findProperty('id', 
selectedConfigGroup.id);
+        if(selectedConfigGroup){
+          mainServiceInfoConfigsController.set('selectedConfigGroup', 
selectedConfigGroup);
+        }else{
+          mainServiceInfoConfigsController.set('selectedConfigGroup',  
managedConfigGroups.findProperty('isDefault', true));
+        }
+        
mainServiceInfoConfigsController.set('configGroups',this.get('subViewController.configGroups'));
+      },
       updateButtons: function(){
         var modified = this.get('subViewController.isHostsModified');
         this.set('enablePrimary', modified);

Reply via email to