Repository: ambari Updated Branches: refs/heads/trunk 212adff46 -> 013c7f113
AMBARI-7610. EC2 : Hosts names not in sorted order in Hosts page even after sorting (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/013c7f11 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/013c7f11 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/013c7f11 Branch: refs/heads/trunk Commit: 013c7f11357ec4fa20e2c044f4d432bcd1746b12 Parents: 212adff Author: Oleg Nechiporenko <[email protected]> Authored: Wed Nov 12 16:09:09 2014 +0200 Committer: Oleg Nechiporenko <[email protected]> Committed: Wed Nov 12 17:13:34 2014 +0200 ---------------------------------------------------------------------- ambari-web/app/controllers/main/host.js | 8 ++++++++ ambari-web/app/mappers/hosts_mapper.js | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/013c7f11/ambari-web/app/controllers/main/host.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/host.js b/ambari-web/app/controllers/main/host.js index 5da0939..b331c86 100644 --- a/ambari-web/app/controllers/main/host.js +++ b/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; }, http://git-wip-us.apache.org/repos/asf/ambari/blob/013c7f11/ambari-web/app/mappers/hosts_mapper.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/mappers/hosts_mapper.js b/ambari-web/app/mappers/hosts_mapper.js index 3c444c3..4aa1154 100644 --- a/ambari-web/app/mappers/hosts_mapper.js +++ b/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')]) {
