You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ak...@apache.org on 2013/12/12 17:00:58 UTC

git commit: AMBARI-4023. In installer, default config-group ends up ordered last in the list of config-groups. (Denys Buzhor via akovalenko)

Updated Branches:
  refs/heads/trunk 70ac9ea7e -> 06c22ff5a


AMBARI-4023. In installer, default config-group ends up ordered last in the list of config-groups. (Denys Buzhor via akovalenko)


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

Branch: refs/heads/trunk
Commit: 06c22ff5a995735a1b854b7f8891637135b18a6b
Parents: 70ac9ea
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Thu Dec 12 18:00:08 2013 +0200
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
Committed: Thu Dec 12 18:00:08 2013 +0200

----------------------------------------------------------------------
 ambari-web/app/controllers/wizard/step7_controller.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/06c22ff5/ambari-web/app/controllers/wizard/step7_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js
index 0cfa7e3..eff6e03 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -141,8 +141,12 @@ App.WizardStep7Controller = Em.Controller.extend({
 
   selectedServiceObserver: function () {
     if (App.supports.hostOverridesInstaller && this.get('selectedService') && (this.get('selectedService.serviceName') !== 'MISC')) {
-      var serviceGroups = this.get('selectedService.configGroups').sort(function (a, b) {
-        return a.isDefault || b.isDefault ? 1 : 0;
+      var serviceGroups = this.get('selectedService.configGroups');
+      serviceGroups.forEach(function (item, index, array) {
+        if (item.isDefault) {
+          array.unshift(item);
+          array.splice(index + 1, 1);
+        }
       });
       this.set('configGroups', serviceGroups);
       this.set('selectedConfigGroup', serviceGroups.findProperty('isDefault'));