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 3E194200B27 for ; Wed, 22 Jun 2016 18:08:50 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3C70A160A36; Wed, 22 Jun 2016 16:08:50 +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 87642160A24 for ; Wed, 22 Jun 2016 18:08:49 +0200 (CEST) Received: (qmail 97223 invoked by uid 500); 22 Jun 2016 16:08:48 -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 97214 invoked by uid 99); 22 Jun 2016 16:08:48 -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; Wed, 22 Jun 2016 16:08:48 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A08EFDFEDA; Wed, 22 Jun 2016 16:08:48 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: atkach@apache.org To: commits@ambari.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-17365 Add-host wizard on large clusters is painfully slow. (atkach) Date: Wed, 22 Jun 2016 16:08:48 +0000 (UTC) archived-at: Wed, 22 Jun 2016 16:08:50 -0000 Repository: ambari Updated Branches: refs/heads/trunk 2e14098c1 -> 584e627f6 AMBARI-17365 Add-host wizard on large clusters is painfully slow. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/584e627f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/584e627f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/584e627f Branch: refs/heads/trunk Commit: 584e627f682968ea7da802b71d9c8ec0561b0eb8 Parents: 2e14098 Author: Andrii Tkach Authored: Wed Jun 22 14:02:13 2016 +0300 Committer: Andrii Tkach Committed: Wed Jun 22 19:08:31 2016 +0300 ---------------------------------------------------------------------- ambari-web/app/utils/ajax/ajax.js | 4 ++++ ambari-web/app/views/main/host/add_view.js | 5 +---- ambari-web/test/views/main/host/add_view_test.js | 15 +++------------ 3 files changed, 8 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/584e627f/ambari-web/app/utils/ajax/ajax.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js index 89894ac..2b46431 100644 --- a/ambari-web/app/utils/ajax/ajax.js +++ b/ambari-web/app/utils/ajax/ajax.js @@ -2546,6 +2546,10 @@ var urls = { }; } }, + 'hosts.confirmed.minimal': { + 'real': '/clusters/{clusterName}/hosts?fields=host_components/HostRoles/state&minimal_response=true', + 'mock': '/data/hosts/HDP2/hosts.json' + }, 'host_components.all': { 'real': '/clusters/{clusterName}/host_components?fields=HostRoles/host_name&minimal_response=true', 'mock': '' http://git-wip-us.apache.org/repos/asf/ambari/blob/584e627f/ambari-web/app/views/main/host/add_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/host/add_view.js b/ambari-web/app/views/main/host/add_view.js index 2047f47..c2fa45d 100644 --- a/ambari-web/app/views/main/host/add_view.js +++ b/ambari-web/app/views/main/host/add_view.js @@ -38,7 +38,7 @@ App.AddHostView = Em.View.extend(App.WizardMenuMixin, { loadHosts: function () { App.ajax.send({ - name: 'hosts.confirmed', + name: 'hosts.confirmed.minimal', sender: this, data: {}, success: 'loadHostsSuccessCallback', @@ -52,9 +52,6 @@ App.AddHostView = Em.View.extend(App.WizardMenuMixin, { response.items.forEach(function (item) { installedHosts[item.Hosts.host_name] = { name: item.Hosts.host_name, - cpu: item.Hosts.cpu_count, - memory: item.Hosts.total_mem, - disk_info: item.Hosts.disk_info, bootStatus: "REGISTERED", isInstalled: true, hostComponents: item.host_components http://git-wip-us.apache.org/repos/asf/ambari/blob/584e627f/ambari-web/test/views/main/host/add_view_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/views/main/host/add_view_test.js b/ambari-web/test/views/main/host/add_view_test.js index 785eac4..0b5beb0 100644 --- a/ambari-web/test/views/main/host/add_view_test.js +++ b/ambari-web/test/views/main/host/add_view_test.js @@ -61,9 +61,9 @@ describe('App.AddHostView', function () { it("App.ajax.send should be called", function() { view.loadHosts(); - var args = testHelpers.filterAjaxRequests('name', 'hosts.confirmed'); + var args = testHelpers.filterAjaxRequests('name', 'hosts.confirmed.minimal'); expect(args[0][0]).to.eql({ - name: 'hosts.confirmed', + name: 'hosts.confirmed.minimal', sender: view, data: {}, success: 'loadHostsSuccessCallback', @@ -85,10 +85,7 @@ describe('App.AddHostView', function () { var response = {items: [ { Hosts: { - host_name: 'host1', - cpu_count: 1, - total_mem: 1024, - disk_info: {} + host_name: 'host1' }, host_components: [ { @@ -102,9 +99,6 @@ describe('App.AddHostView', function () { expect(view.get('controller').setDBProperty.calledWith('hosts', { host1: { name: 'host1', - cpu: 1, - memory: 1024, - disk_info: {}, bootStatus: "REGISTERED", isInstalled: true, hostComponents: [ @@ -117,9 +111,6 @@ describe('App.AddHostView', function () { expect(view.get('controller.content.hosts')).to.eql({ host1: { name: 'host1', - cpu: 1, - memory: 1024, - disk_info: {}, bootStatus: "REGISTERED", isInstalled: true, hostComponents: [