Updated Branches:
  refs/heads/trunk 41013792f -> cbca25d63

AMBARI-3850. Config-groups should be sorted in manage config-groups dialog. 
(Mikhail Bayuk via srimanth)


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

Branch: refs/heads/trunk
Commit: cbca25d63c887cd8c86c3abb9ec04c046df9bc78
Parents: 4101379
Author: Srimanth Gunturi <[email protected]>
Authored: Mon Nov 25 10:52:39 2013 -0800
Committer: Srimanth Gunturi <[email protected]>
Committed: Mon Nov 25 10:52:54 2013 -0800

----------------------------------------------------------------------
 ambari-web/app/controllers/main/service/info/configs.js        | 6 ++++++
 .../main/service/manage_config_groups_controller.js            | 6 ++++++
 2 files changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/cbca25d6/ambari-web/app/controllers/main/service/info/configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/info/configs.js 
b/ambari-web/app/controllers/main/service/info/configs.js
index ef85afd..b37a1ff 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -323,6 +323,12 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend({
       selectedConfigGroup = defaultConfigGroup;
     }
     this.get('configGroups').push(defaultConfigGroup);
+    this.get('configGroups').sort(function(configGroup){
+      if(configGroup.isDefault){
+        return false;
+      }
+      return true;
+    });
     this.set('selectedConfigGroup', selectedConfigGroup);
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbca25d6/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 5f7221b..836ae35 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
@@ -106,6 +106,12 @@ App.ManageConfigGroupsController = Em.Controller.extend({
       defaultConfigGroup.set('childConfigGroups', configGroups);
       defaultConfigGroup.set('hosts', unusedHosts);
       this.set('configGroups', [defaultConfigGroup].concat(configGroups));
+      this.get('configGroups').sort(function(configGroup){
+        if(configGroup.isDefault){
+          return false;
+        }
+        return true;
+      });
       this.loadProperties(groupToTypeToTagMap);
       this.set('isLoaded', true);
     }

Reply via email to