ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject ambari git commit: AMBARI-17365 Add-host wizard on large clusters is painfully slow. (atkach)
Date Wed, 22 Jun 2016 16:02:43 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 13e1fe78f -> 32448be8f


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/32448be8
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/32448be8
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/32448be8

Branch: refs/heads/branch-2.4
Commit: 32448be8fe7c4ed2edf492f176c9c4a14fc9afce
Parents: 13e1fe7
Author: Andrii Tkach <atkach@apache.org>
Authored: Wed Jun 22 14:02:13 2016 +0300
Committer: Andrii Tkach <atkach@apache.org>
Committed: Wed Jun 22 18:55:28 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/32448be8/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 925d0ec..b45f46f 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -2532,6 +2532,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/32448be8/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/32448be8/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: [


Mime
View raw message