You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2017/02/17 22:06:35 UTC

[36/50] [abbrv] ambari git commit: AMBARI-20051. Hosts filter component list is not sorted so it is difficult to use (akovalenko)

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-12556
Commit: ce404d640e930b7326dc1857ac1ae6ce03b2884e
Parents: 18fc258
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Thu Feb 16 18:05:18 2017 +0200
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
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',