Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D4D4910892 for ; Thu, 12 Dec 2013 16:01:00 +0000 (UTC) Received: (qmail 54259 invoked by uid 500); 12 Dec 2013 16:01:00 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 54199 invoked by uid 500); 12 Dec 2013 16:00:59 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 54189 invoked by uid 99); 12 Dec 2013 16:00:59 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Dec 2013 16:00:58 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id ABD8C89FAB6; Thu, 12 Dec 2013 16:00:58 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: akovalenko@apache.org To: commits@ambari.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: AMBARI-4023. In installer, default config-group ends up ordered last in the list of config-groups. (Denys Buzhor via akovalenko) Date: Thu, 12 Dec 2013 16:00:58 +0000 (UTC) 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 Authored: Thu Dec 12 18:00:08 2013 +0200 Committer: Aleksandr Kovalenko 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'));