Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 78AB4200C2D for ; Fri, 17 Feb 2017 22:30:01 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 7738C160B80; Fri, 17 Feb 2017 21:30:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BF672160B57 for ; Fri, 17 Feb 2017 22:30:00 +0100 (CET) Received: (qmail 15026 invoked by uid 500); 17 Feb 2017 21:30:00 -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 14919 invoked by uid 99); 17 Feb 2017 21:29:59 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Feb 2017 21:29:59 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D00CCDFF38; Fri, 17 Feb 2017 21:29:59 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jonathanhurley@apache.org To: commits@ambari.apache.org Date: Fri, 17 Feb 2017 21:30:00 -0000 Message-Id: <60cc7af18ac84da1a6d4a015ec1608b2@git.apache.org> In-Reply-To: <4ac5eceb0b1240aaa1fd7974393db65a@git.apache.org> References: <4ac5eceb0b1240aaa1fd7974393db65a@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [02/15] ambari git commit: AMBARI-20051. Hosts filter component list is not sorted so it is difficult to use (akovalenko) archived-at: Fri, 17 Feb 2017 21:30:01 -0000 AMBARI-20051. Hosts filter component list is not sorted so it is difficult to use (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ce404d64 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ce404d64 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ce404d64 Branch: refs/heads/branch-feature-AMBARI-20053 Commit: ce404d640e930b7326dc1857ac1ae6ce03b2884e Parents: 18fc258 Author: Aleksandr Kovalenko Authored: Thu Feb 16 18:05:18 2017 +0200 Committer: Aleksandr Kovalenko Committed: Fri Feb 17 03:12:46 2017 +0200 ---------------------------------------------------------------------- ambari-web/app/views/main/host/combo_search_box.js | 1 + ambari-web/test/views/main/host/combo_search_box_test.js | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/ce404d64/ambari-web/app/views/main/host/combo_search_box.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/host/combo_search_box.js b/ambari-web/app/views/main/host/combo_search_box.js index 2f9900a..372c3f7 100644 --- a/ambari-web/app/views/main/host/combo_search_box.js +++ b/ambari-web/app/views/main/host/combo_search_box.js @@ -307,6 +307,7 @@ App.MainHostComboSearchBoxView = Em.View.extend({ App.router.get('mainHostController.labelValueMap')[displayName] = component.get('componentName'); } }); + hostComponentList = hostComponentList.sortProperty('label'); return hostComponentList; }, http://git-wip-us.apache.org/repos/asf/ambari/blob/ce404d64/ambari-web/test/views/main/host/combo_search_box_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/views/main/host/combo_search_box_test.js b/ambari-web/test/views/main/host/combo_search_box_test.js index c82167c..0775f66 100644 --- a/ambari-web/test/views/main/host/combo_search_box_test.js +++ b/ambari-web/test/views/main/host/combo_search_box_test.js @@ -663,11 +663,11 @@ describe('App.MainHostComboSearchBoxView', function () { App.router.get.restore(); }); - it("should return host-component list", function() { + it("should return sorted host-component list", function() { expect(view.getHostComponentList()).to.be.eql([ + {label: 'cc1', category: 'Component'}, {label: 'mc1', category: 'Component'}, - {label: 'sc1', category: 'Component'}, - {label: 'cc1', category: 'Component'} + {label: 'sc1', category: 'Component'} ]); expect(labelValueMap).to.be.eql({ mc1: 'MC1',