Browse Source

AMBARI-7610. EC2 : Hosts names not in sorted order in Hosts page even after sorting (onechiporenko)

Oleg Nechiporenko 10 years ago
parent
commit
013c7f1135
2 changed files with 8 additions and 1 deletions
  1. 8 0
      ambari-web/app/controllers/main/host.js
  2. 0 1
      ambari-web/app/mappers/hosts_mapper.js

+ 8 - 0
ambari-web/app/controllers/main/host.js

@@ -236,6 +236,14 @@ App.MainHostController = Em.ArrayController.extend({
         });
       }
     });
+    // sort by public_host_name by default
+    if (queryParams.length === 0) {
+      queryParams.push({
+        key: 'Hosts/public_host_name',
+        value: 'asc',
+        type: 'SORT'
+      });
+    }
     return queryParams;
   },
 

+ 0 - 1
ambari-web/app/mappers/hosts_mapper.js

@@ -110,7 +110,6 @@ App.hostsMapper = App.QuickDataMapper.create({
         return hostsWithFullInfo;
       }
 
-      hostsWithFullInfo = hostsWithFullInfo.sortProperty('public_host_name');
 
       App.Host.find().forEach(function (host) {
         if (!hostIds[host.get('hostName')]) {