Bläddra i källkod

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

Aleksandr Kovalenko 11 år sedan
förälder
incheckning
84dc327677
1 ändrade filer med 3 tillägg och 1 borttagningar
  1. 3 1
      ambari-web/app/controllers/wizard/step7_controller.js

+ 3 - 1
ambari-web/app/controllers/wizard/step7_controller.js

@@ -141,7 +141,9 @@ 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');
+      var serviceGroups = this.get('selectedService.configGroups').sort(function (a, b) {
+        return a.isDefault || b.isDefault ? 1 : 0;
+      });
       this.set('configGroups', serviceGroups);
       this.set('selectedConfigGroup', serviceGroups.findProperty('isDefault'));
     }