You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2017/06/08 15:28:33 UTC

ambari git commit: AMBARI-21044 Add service wizard unresponsive while adding HST via Ambari. (ababiichuk)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 d7d0d179d -> a65b52e58


AMBARI-21044 Add service wizard unresponsive while adding HST via Ambari. (ababiichuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a65b52e5
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a65b52e5
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a65b52e5

Branch: refs/heads/branch-2.5
Commit: a65b52e580e505583bda606639cbd1e9f95fc774
Parents: d7d0d17
Author: ababiichuk <ab...@hortonworks.com>
Authored: Thu Jun 8 18:32:49 2017 +0300
Committer: ababiichuk <ab...@hortonworks.com>
Committed: Thu Jun 8 18:33:59 2017 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/installer.js         | 15 ----
 .../journalNode/step1_controller.js             |  2 +-
 .../service/manage_config_groups_controller.js  | 89 ++++++++++++++++++--
 ambari-web/app/controllers/wizard.js            | 38 +--------
 .../wizard/step7/assign_master_controller.js    | 16 +++-
 .../mixins/wizard/assign_master_components.js   | 70 +++++++++++----
 .../app/mixins/wizard/wizardHostsLoading.js     |  6 +-
 ambari-web/app/routes/add_service_routes.js     |  1 +
 ambari-web/app/routes/installer.js              |  1 +
 ambari-web/app/utils/ajax/ajax.js               |  4 +
 .../common/assign_master_components_view.js     |  4 +
 .../app/views/main/service/reassign_view.js     |  4 -
 ambari-web/test/controllers/installer_test.js   | 12 ---
 .../main/service/add_controller_test.js         | 54 +-----------
 .../test/controllers/wizard/step5_test.js       | 86 +++++++++++++------
 ambari-web/test/controllers/wizard_test.js      | 30 +------
 .../resourceManager/wizard_view_test.js         | 18 +---
 17 files changed, 230 insertions(+), 220 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a65b52e5/ambari-web/app/controllers/installer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/installer.js b/ambari-web/app/controllers/installer.js
index b30f864..77d5a5c 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -203,24 +203,9 @@ App.InstallerController = App.WizardController.extend(App.UserPref, {
 
     for (var hostName in rawHosts) {
       var host = rawHosts[hostName];
-      var disksOverallCapacity = 0;
-      var diskFree = 0;
-      host.disk_info.forEach(function (disk) {
-        disksOverallCapacity += parseFloat(disk.size);
-        diskFree += parseFloat(disk.available);
-      });
       hosts.pushObject(Em.Object.create({
           id: host.name,
-          ip: host.ip,
-          osType: host.os_type,
-          osArch: host.os_arch,
           hostName: host.name,
-          publicHostName: host.name,
-          cpu: host.cpu,
-          memory: host.memory,
-          diskInfo: host.disk_info,
-          diskTotal: disksOverallCapacity / (1024 * 1024),
-          diskFree: diskFree / (1024 * 1024),
           hostComponents: host.hostComponents || []
         }
       ))

http://git-wip-us.apache.org/repos/asf/ambari/blob/a65b52e5/ambari-web/app/controllers/main/admin/highAvailability/journalNode/step1_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/journalNode/step1_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/journalNode/step1_controller.js
index e1252b7..8e434ed 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/journalNode/step1_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/journalNode/step1_controller.js
@@ -102,7 +102,7 @@ App.ManageJournalNodeWizardStep1Controller = Em.Controller.extend(App.BlueprintM
     self.get('addableComponents').forEach(function (componentName) {
       self.updateComponent(componentName);
     }, self);
-    self.set('isLoaded', true);
+    self.set('isRecommendationsLoaded', true);
   },
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/a65b52e5/ambari-web/app/controllers/main/service/manage_config_groups_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/manage_config_groups_controller.js b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js
index fac4972..b76383e 100644
--- a/ambari-web/app/controllers/main/service/manage_config_groups_controller.js
+++ b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js
@@ -289,15 +289,13 @@ App.ManageConfigGroupsController = Em.Controller.extend(App.ConfigOverridable, {
    */
   loadHosts: function() {
     this.set('isLoaded', false);
-    if (this.get('isInstaller')) {
-      var allHosts = this.get('isAddService') ? App.router.get('addServiceController').get('allHosts') : App.router.get('installerController').get('allHosts');
-      this.set('clusterHosts', allHosts);
-      this.loadConfigGroups(this.get('serviceName'));
-    }
-    else {
+    if (this.get('isInstaller') && !this.get('isAddService')) {
+      var hostNames = App.router.get('installerController').get('allHosts').mapProperty('hostName').join();
+      this.loadInstallerHostsFromServer(hostNames);
+    } else {
       this.loadHostsFromServer();
-      this.loadConfigGroups(this.get('serviceName'));
     }
+    this.loadConfigGroups(this.get('serviceName'));
   },
 
   /**
@@ -999,6 +997,83 @@ App.ManageConfigGroupsController = Em.Controller.extend(App.ConfigOverridable, {
         this.set('disablePrimary', !modified);
       }.observes('subViewController.isHostsModified')
     });
+  },
+
+  loadInstallerHostsFromServer: function (hostNames) {
+    return App.ajax.send({
+      name: 'hosts.info.install',
+      sender: this,
+      data: {
+        hostNames: hostNames
+      },
+      success: 'loadInstallerHostsSuccessCallback'
+    });
+  },
+
+  loadInstallerHostsSuccessCallback: function (data) {
+    var rawHosts = App.router.get('installerController.content.hosts'),
+      masterComponents = App.router.get('installerController.content.masterComponentHosts'),
+      slaveComponents = App.router.get('installerController.content.slaveComponentHosts'),
+      hosts = [];
+    masterComponents.forEach(function (component) {
+      var host = rawHosts[component.hostName];
+      if (host.hostComponents) {
+        host.hostComponents.push(Em.Object.create({
+          componentName: component.component,
+          displayName: component.display_name
+        }));
+      } else {
+        rawHosts[component.hostName].hostComponents = [
+          Em.Object.create({
+            componentName: component.component,
+            displayName: component.display_name
+          })
+        ]
+      }
+    });
+    slaveComponents.forEach(function (component) {
+      component.hosts.forEach(function (rawHost) {
+        var host = rawHosts[rawHost.hostName];
+        if (host.hostComponents) {
+          host.hostComponents.push(Em.Object.create({
+            componentName: component.componentName,
+            displayName: component.displayName
+          }));
+        } else {
+          rawHosts[rawHost.hostName].hostComponents = [
+            Em.Object.create({
+              componentName: component.componentName,
+              displayName: component.displayName
+            })
+          ]
+        }
+      });
+    });
+
+    data.items.forEach(function (host) {
+      var disksOverallCapacity = 0,
+        diskFree = 0;
+      host.Hosts.disk_info.forEach(function (disk) {
+        disksOverallCapacity += parseFloat(disk.size);
+        diskFree += parseFloat(disk.available);
+      });
+      hosts.pushObject(Em.Object.create({
+        id: host.Hosts.host_name,
+        ip: host.Hosts.ip,
+        osType: host.Hosts.os_type,
+        osArch: host.Hosts.os_arch,
+        hostName: host.Hosts.host_name,
+        publicHostName: host.Hosts.public_host_name,
+        cpu: host.Hosts.cpu_count,
+        memory: host.Hosts.total_mem.toFixed(2),
+        diskInfo: host.Hosts.disk_info,
+        diskTotal: disksOverallCapacity / (1024 * 1024),
+        diskFree: diskFree / (1024 * 1024),
+        hostComponents: (rawHosts[host.Hosts.host_name] && rawHosts[host.Hosts.host_name].hostComponents) || []
+      }));
+    });
+
+    this.set('clusterHosts', hosts);
   }
 
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/a65b52e5/ambari-web/app/controllers/wizard.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard.js b/ambari-web/app/controllers/wizard.js
index 0255abf..51e33d3 100644
--- a/ambari-web/app/controllers/wizard.js
+++ b/ambari-web/app/controllers/wizard.js
@@ -115,39 +115,21 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM
   allHosts: function () {
     var dbHosts = this.get('content.hosts');
     var hosts = [];
-    var hostComponents = [];
 
     for (var hostName in dbHosts) {
-      hostComponents = [];
-      var disksOverallCapacity = 0;
-      var diskFree = 0;
+      var hostComponents = [];
       dbHosts[hostName].hostComponents.forEach(function (componentName) {
         hostComponents.push(Em.Object.create({
           componentName: componentName,
           displayName: App.format.role(componentName, false)
         }));
       });
-      dbHosts[hostName].disk_info.forEach(function (disk) {
-        disksOverallCapacity += parseFloat(disk.size);
-        diskFree += parseFloat(disk.available);
-      });
 
       hosts.push(Em.Object.create({
         id: hostName,
         hostName: hostName,
-        publicHostName: hostName,
-        diskInfo: dbHosts[hostName].disk_info,
-        diskTotal: disksOverallCapacity / (1024 * 1024),
-        diskFree: diskFree / (1024 * 1024),
-        disksMounted: dbHosts[hostName].disk_info.length,
-        cpu: dbHosts[hostName].cpu,
-        memory: dbHosts[hostName].memory,
-        osType: dbHosts[hostName].osType ? dbHosts[hostName].osType: 0,
-        osArch: dbHosts[hostName].osArch ? dbHosts[hostName].osArch : 0,
-        ip: dbHosts[hostName].ip ? dbHosts[hostName].ip: 0,
-        hostComponents: hostComponents,
-        maintenanceState: dbHosts[hostName].maintenance_state
-      }))
+        hostComponents: hostComponents
+      }));
     }
     return hosts;
   }.property('content.hosts'),
@@ -770,13 +752,6 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM
       if (_host.bootStatus === 'REGISTERED') {
         hosts[_host.name] = {
           name: _host.name,
-          cpu: _host.cpu,
-          memory: _host.memory,
-          disk_info: _host.disk_info,
-          os_type: _host.os_type,
-          os_arch: _host.os_arch,
-          ip: _host.ip,
-          maintenance_state: _host.maintenance_state,
           bootStatus: _host.bootStatus,
           isInstalled: false,
           id: indx++
@@ -1276,13 +1251,6 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM
     response.items.forEach(function (item, indx) {
       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,
-        osType: item.Hosts.os_type,
-        osArch: item.Hosts.os_arch,
-        ip: item.Hosts.ip,
-        maintenance_state: item.Hosts.maintenance_state,
         bootStatus: "REGISTERED",
         isInstalled: true,
         hostComponents: item.host_components,

http://git-wip-us.apache.org/repos/asf/ambari/blob/a65b52e5/ambari-web/app/controllers/wizard/step7/assign_master_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step7/assign_master_controller.js b/ambari-web/app/controllers/wizard/step7/assign_master_controller.js
index b1e3397..9e6c6cc 100644
--- a/ambari-web/app/controllers/wizard/step7/assign_master_controller.js
+++ b/ambari-web/app/controllers/wizard/step7/assign_master_controller.js
@@ -303,6 +303,7 @@ App.AssignMasterOnStep7Controller = Em.Controller.extend(App.BlueprintMixin, App
 
       this.set("hosts", result);
       this.sortHosts(result);
+      this.set('isHostsLoaded', true);
     }
   },
 
@@ -594,5 +595,18 @@ App.AssignMasterOnStep7Controller = Em.Controller.extend(App.BlueprintMixin, App
    */
   onCancel: function() {
     this.get('popup').showWarningPopup();
-  }
+  },
+
+  getHosts: function () {
+    var result,
+      parentController = this.get('content.controllerName');
+    if (parentController) {
+      result = this._super();
+    } else {
+      result = this.get('hosts').mapProperty('host_name');
+    }
+    return result;
+  },
+
+  clearStepOnExit: Em.K
 });
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/a65b52e5/ambari-web/app/mixins/wizard/assign_master_components.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/wizard/assign_master_components.js b/ambari-web/app/mixins/wizard/assign_master_components.js
index cd0f877..5da9a13 100644
--- a/ambari-web/app/mixins/wizard/assign_master_components.js
+++ b/ambari-web/app/mixins/wizard/assign_master_components.js
@@ -247,10 +247,22 @@ App.AssignMasterComponents = Em.Mixin.create({
   selectedServicesMasters: [],
 
   /**
+   * Is hosts data loaded
+   * @type {bool}
+   */
+  isHostsLoaded: false,
+
+  /**
+   * Are recommendations loaded
+   * @type {bool}
+   */
+  isRecommendationsLoaded: false,
+
+  /**
    * Is data for current step loaded
    * @type {bool}
    */
-  isLoaded: false,
+  isLoaded: Em.computed.and('isHostsLoaded', 'isRecommendationsLoaded'),
 
   /**
    * Validation error messages which don't related with any master
@@ -338,7 +350,7 @@ App.AssignMasterComponents = Em.Mixin.create({
     }, this);
 
     return mapping.sortProperty('host_name');
-  }.property("selectedServicesMasters.@each.selectedHost", 'selectedServicesMasters.@each.isHostNameValid'),
+  }.property('selectedServicesMasters.@each.selectedHost', 'selectedServicesMasters.@each.isHostNameValid', 'isLoaded'),
 
   /**
    * Count of hosts without masters
@@ -518,7 +530,8 @@ App.AssignMasterComponents = Em.Mixin.create({
   clearStep: function () {
     this.setProperties({
       hosts: [],
-      isLoaded: false,
+      isHostsLoaded: false,
+      isRecommendationsLoaded: false,
       backFromNextStep: false,
       selectedServicesMasters: [],
       servicesMasters: []
@@ -529,6 +542,10 @@ App.AssignMasterComponents = Em.Mixin.create({
 
   },
 
+  clearStepOnExit: function () {
+    this.clearStep();
+  },
+
   /**
    * Load controller data (hosts, host components etc)
    * @method loadStep
@@ -557,7 +574,7 @@ App.AssignMasterComponents = Em.Mixin.create({
     self.get('addableComponents').forEach(function (componentName) {
       self.updateComponent(componentName);
     }, self);
-    self.set('isLoaded', true);
+    self.set('isRecommendationsLoaded', true);
     if (self.thereIsNoMasters() && !self.get('mastersToCreate').length) {
       App.router.send('next');
     }
@@ -609,25 +626,40 @@ App.AssignMasterComponents = Em.Mixin.create({
    * @method renderHostInfo
    */
   renderHostInfo: function () {
-    var hostInfo = this.get('content.hosts');
-    var result = [];
+    var isInstaller = (this.get('wizardController.name') === 'installerController' || this.get('content.controllerName') === 'installerController');
+    App.ajax.send({
+      name: isInstaller ? 'hosts.info.install' : 'hosts.high_availability.wizard',
+      sender: this,
+      data: {
+        hostNames: isInstaller ? this.getHosts().join() : null
+      },
+      success: 'loadWizardHostsSuccessCallback'
+    });
+  },
 
-    for (var index in hostInfo) {
-      var _host = hostInfo[index];
+  loadWizardHostsSuccessCallback: function (data) {
+    var hostInfo = this.get('content.hosts'),
+      result = [];
+    data.items.forEach(function (host) {
+      var hostName = host.Hosts.host_name,
+        _host = hostInfo[hostName],
+        cpu = host.Hosts.cpu_count,
+        memory = host.Hosts.total_mem.toFixed(2);
       if (_host.bootStatus === 'REGISTERED') {
         result.push(Em.Object.create({
-          host_name: _host.name,
-          cpu: _host.cpu,
-          memory: _host.memory,
-          disk_info: _host.disk_info,
-          maintenance_state: _host.maintenance_state,
+          host_name: hostName,
+          cpu: cpu,
+          memory: memory,
+          disk_info: host.Hosts.disk_info,
+          maintenance_state: host.Hosts.maintenance_state,
           isInstalled: _host.isInstalled,
-          host_info: Em.I18n.t('installer.step5.hostInfo').fmt(_host.name, numberUtils.bytesToSize(_host.memory, 1, 'parseFloat', 1024), _host.cpu)
+          host_info: Em.I18n.t('installer.step5.hostInfo').fmt(hostName, numberUtils.bytesToSize(memory, 1, 'parseFloat', 1024), cpu)
         }));
       }
-    }
-    this.set("hosts", result);
+    }, this);
+    this.set('hosts', result);
     this.sortHosts(this.get('hosts'));
+    this.set('isHostsLoaded', true);
   },
 
   /**
@@ -666,7 +698,7 @@ App.AssignMasterComponents = Em.Mixin.create({
       var installedServices = App.StackService.find().filterProperty('isInstalled').mapProperty('serviceName');
       var services = installedServices.concat(selectedServices).uniq();
 
-      var hostNames = self.get('hosts').mapProperty('host_name');
+      var hostNames = self.getHosts();
 
       var data = {
         stackVersionUrl: App.get('stackVersionURL'),
@@ -1257,5 +1289,9 @@ App.AssignMasterComponents = Em.Mixin.create({
         self.set('submitButtonClicked', false);
       }
     });
+  },
+
+  getHosts: function () {
+    return Em.keys(this.get('content.hosts'));
   }
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/a65b52e5/ambari-web/app/mixins/wizard/wizardHostsLoading.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/wizard/wizardHostsLoading.js b/ambari-web/app/mixins/wizard/wizardHostsLoading.js
index 93dab02..950b51e 100644
--- a/ambari-web/app/mixins/wizard/wizardHostsLoading.js
+++ b/ambari-web/app/mixins/wizard/wizardHostsLoading.js
@@ -55,12 +55,8 @@ App.WizardHostsLoading = Em.Mixin.create({
     data.items.forEach(function (item) {
       hosts[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,
-        maintenance_state: item.Hosts.maintenance_state
+        isInstalled: true
       };
     });
     App.db.setHosts(hosts);

http://git-wip-us.apache.org/repos/asf/ambari/blob/a65b52e5/ambari-web/app/routes/add_service_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/add_service_routes.js b/ambari-web/app/routes/add_service_routes.js
index 88e196a..13a1345 100644
--- a/ambari-web/app/routes/add_service_routes.js
+++ b/ambari-web/app/routes/add_service_routes.js
@@ -142,6 +142,7 @@ module.exports = App.WizardRoute.extend({
       controller.dataLoading().done(function () {
         controller.loadAllPriorSteps().done(function () {
           App.logger.logTimerIfMoreThan(consoleMsg.format(2));
+          wizardStep2Controller.set('wizardController', controller);
           controller.connectOutlet('wizardStep5', controller.get('content'));
         });
       });

http://git-wip-us.apache.org/repos/asf/ambari/blob/a65b52e5/ambari-web/app/routes/installer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/installer.js b/ambari-web/app/routes/installer.js
index b4aa799..10141e4 100644
--- a/ambari-web/app/routes/installer.js
+++ b/ambari-web/app/routes/installer.js
@@ -304,6 +304,7 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
       });
       controller.setCurrentStep('5');
       controller.loadAllPriorSteps().done(function () {
+        wizardStep5Controller.set('wizardController', controller);
         controller.connectOutlet('wizardStep5', controller.get('content'));
         console.timeEnd('step5 connectOutlets');
       });

http://git-wip-us.apache.org/repos/asf/ambari/blob/a65b52e5/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 7205820..eab94bb 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -2689,6 +2689,10 @@ var urls = {
     'real': '/clusters/{clusterName}/hosts?fields=Hosts/cpu_count,Hosts/disk_info,Hosts/total_mem,Hosts/ip,Hosts/os_type,Hosts/os_arch,Hosts/public_host_name,host_components&minimal_response=true',
     'mock': ''
   },
+  'hosts.info.install': {
+    'real': '/hosts?Hosts/host_name.in({hostNames})&fields=Hosts/cpu_count,Hosts/disk_info,Hosts/total_mem,Hosts/ip,Hosts/os_type,Hosts/os_arch,Hosts/public_host_name&minimal_response=true',
+    'mock': ''
+  },
   'hosts.host_components.pre_load': {
     real: '',
     mock: '/data/hosts/HDP2/hosts.json',

http://git-wip-us.apache.org/repos/asf/ambari/blob/a65b52e5/ambari-web/app/views/common/assign_master_components_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/assign_master_components_view.js b/ambari-web/app/views/common/assign_master_components_view.js
index 37054c3..9f9863e 100644
--- a/ambari-web/app/views/common/assign_master_components_view.js
+++ b/ambari-web/app/views/common/assign_master_components_view.js
@@ -51,6 +51,10 @@ App.AssignMasterComponentsView = Em.View.extend({
 
   didInsertElement: function () {
     this.get('controller').loadStep();
+  },
+
+  willDestroyElement: function () {
+    this.get('controller').clearStepOnExit();
   }
 });
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/a65b52e5/ambari-web/app/views/main/service/reassign_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/reassign_view.js b/ambari-web/app/views/main/service/reassign_view.js
index 4adbf11..b75cfe8 100644
--- a/ambari-web/app/views/main/service/reassign_view.js
+++ b/ambari-web/app/views/main/service/reassign_view.js
@@ -81,10 +81,6 @@ App.ReassignMasterView = Em.View.extend(App.WizardMenuMixin, {
     data.items.forEach(function (item) {
       hosts[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,
-        maintenance_state: item.Hosts.maintenance_state,
         bootStatus: "REGISTERED",
         isInstalled: true
       };

http://git-wip-us.apache.org/repos/asf/ambari/blob/a65b52e5/ambari-web/test/controllers/installer_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/installer_test.js b/ambari-web/test/controllers/installer_test.js
index 6f4b18d..3e1c622 100644
--- a/ambari-web/test/controllers/installer_test.js
+++ b/ambari-web/test/controllers/installer_test.js
@@ -736,10 +736,6 @@ describe('App.InstallerController', function () {
     it ('Should return hosts', function() {
       var hosts = {
         'h1': {
-          disk_info: Em.A([{
-            available: 1,
-            size: 10
-          }]),
           hostComponents: Em.A([])
         }
       };
@@ -765,14 +761,6 @@ describe('App.InstallerController', function () {
       var res = JSON.parse(JSON.stringify(installerController.get('allHosts')));
       expect(res).to.eql([
         {
-          "diskInfo": [
-            {
-              "available": 1,
-              "size": 10
-            }
-          ],
-          "diskTotal": 0.0000095367431640625,
-          "diskFree": 9.5367431640625e-7,
           "hostComponents": [
             {
               "componentName": "component",

http://git-wip-us.apache.org/repos/asf/ambari/blob/a65b52e5/ambari-web/test/controllers/main/service/add_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/service/add_controller_test.js b/ambari-web/test/controllers/main/service/add_controller_test.js
index ffde1f7..82e88a4 100644
--- a/ambari-web/test/controllers/main/service/add_controller_test.js
+++ b/ambari-web/test/controllers/main/service/add_controller_test.js
@@ -167,25 +167,7 @@ describe('App.AddServiceController', function() {
   describe('#loadHostsSuccessCallback', function () {
 
     it('should load hosts to local db and model', function () {
-      var diskInfo = [
-          {
-            available: '600000',
-            used: '400000',
-            percent: '40%',
-            size: '10000000',
-            type: 'ext4',
-            mountpoint: '/'
-          },
-          {
-            available: '500000',
-            used: '300000',
-            percent: '50%',
-            size: '6000000',
-            type: 'ext4',
-            mountpoint: '/'
-          }
-        ],
-        hostComponents = [
+      var hostComponents = [
           [
             {
               HostRoles: {
@@ -219,31 +201,13 @@ describe('App.AddServiceController', function() {
           items: [
             {
               Hosts: {
-                cpu_count: 1,
-                disk_info: [
-                  diskInfo[0]
-                ],
                 host_name: 'h0',
-                ip: '10.1.1.0',
-                os_arch: 'x86_64',
-                os_type: 'centos6',
-                total_mem: 4194304,
-                maintenance_state: 'ON'
               },
               host_components: hostComponents[0]
             },
             {
               Hosts: {
-                cpu_count: 2,
-                disk_info: [
-                  diskInfo[1]
-                ],
-                host_name: 'h1',
-                ip: '10.1.1.1',
-                os_arch: 'x86',
-                os_type: 'centos5',
-                total_mem: 3145728,
-                maintenance_state: 'OFF'
+                host_name: 'h1'
               },
               host_components: hostComponents[1]
             }
@@ -252,29 +216,15 @@ describe('App.AddServiceController', function() {
         expected = {
           h0: {
             name: 'h0',
-            cpu: 1,
-            memory: 4194304,
-            disk_info: [diskInfo[0]],
-            osType: 'centos6',
-            osArch: 'x86_64',
-            ip: '10.1.1.0',
             bootStatus: 'REGISTERED',
             isInstalled: true,
-            maintenance_state: 'ON',
             hostComponents: hostComponents[0],
             id: 0
           },
           h1: {
             name: 'h1',
-            cpu: 2,
-            memory: 3145728,
-            disk_info: [diskInfo[1]],
-            osType: 'centos5',
-            osArch: 'x86',
-            ip: '10.1.1.1',
             bootStatus: 'REGISTERED',
             isInstalled: true,
-            maintenance_state: 'OFF',
             hostComponents: hostComponents[1],
             id: 1
           }

http://git-wip-us.apache.org/repos/asf/ambari/blob/a65b52e5/ambari-web/test/controllers/wizard/step5_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/wizard/step5_test.js b/ambari-web/test/controllers/wizard/step5_test.js
index 821a709..9261e75 100644
--- a/ambari-web/test/controllers/wizard/step5_test.js
+++ b/ambari-web/test/controllers/wizard/step5_test.js
@@ -94,56 +94,86 @@ describe('App.WizardStep5Controller', function () {
 
   });
 
-  describe('#renderHostInfo', function () {
+  describe('#loadWizardHostsSuccessCallback', function () {
 
     var tests = Em.A([
       {
-        hosts: {
-          h1: {memory: 4, cpu: 1, name: 'host1', bootStatus: 'INIT'},
-          h2: {memory: 3, cpu: 1, name: 'host2', bootStatus: 'INIT'},
-          h3: {memory: 2, cpu: 1, name: 'host3', bootStatus: 'INIT'},
-          h4: {memory: 1, cpu: 1, name: 'host4', bootStatus: 'INIT'}
+        dbHosts: {
+          host1: {bootStatus: 'INIT'},
+          host2: {bootStatus: 'INIT'},
+          host3: {bootStatus: 'INIT'},
+          host4: {bootStatus: 'INIT'}
         },
+        hosts: [
+          {Hosts: {total_mem: 4, cpu_count: 1, host_name: 'host1', bootStatus: 'INIT'}},
+          {Hosts: {total_mem: 3, cpu_count: 1, host_name: 'host2', bootStatus: 'INIT'}},
+          {Hosts: {total_mem: 2, cpu_count: 1, host_name: 'host3', bootStatus: 'INIT'}},
+          {Hosts: {total_mem: 1, cpu_count: 1, host_name: 'host4', bootStatus: 'INIT'}}
+        ],
         m: 'no one host is REGISTERED',
         e: []
       },
       {
-        hosts: {
-          h1: {memory: 4, cpu: 1, name: 'host1', bootStatus: 'REGISTERED'},
-          h2: {memory: 3, cpu: 1, name: 'host2', bootStatus: 'REGISTERED'},
-          h3: {memory: 2, cpu: 1, name: 'host3', bootStatus: 'REGISTERED'},
-          h4: {memory: 1, cpu: 1, name: 'host4', bootStatus: 'REGISTERED'}
+        dbHosts: {
+          host1: {bootStatus: 'REGISTERED'},
+          host2: {bootStatus: 'REGISTERED'},
+          host3: {bootStatus: 'REGISTERED'},
+          host4: {bootStatus: 'REGISTERED'}
         },
+        hosts: [
+          {Hosts: {total_mem: 4, cpu_count: 1, host_name: 'host1', bootStatus: 'REGISTERED'}},
+          {Hosts: {total_mem: 3, cpu_count: 1, host_name: 'host2', bootStatus: 'REGISTERED'}},
+          {Hosts: {total_mem: 2, cpu_count: 1, host_name: 'host3', bootStatus: 'REGISTERED'}},
+          {Hosts: {total_mem: 1, cpu_count: 1, host_name: 'host4', bootStatus: 'REGISTERED'}}
+        ],
         m: 'all hosts are REGISTERED, memory',
         e: ['host1', 'host2', 'host3', 'host4']
       },
       {
-        hosts: {
-          h1: {memory: 1, cpu: 4, name: 'host1', bootStatus: 'REGISTERED'},
-          h2: {memory: 1, cpu: 3, name: 'host2', bootStatus: 'REGISTERED'},
-          h3: {memory: 1, cpu: 2, name: 'host3', bootStatus: 'REGISTERED'},
-          h4: {memory: 1, cpu: 1, name: 'host4', bootStatus: 'REGISTERED'}
+        dbHosts: {
+          host1: {bootStatus: 'REGISTERED'},
+          host2: {bootStatus: 'REGISTERED'},
+          host3: {bootStatus: 'REGISTERED'},
+          host4: {bootStatus: 'REGISTERED'}
         },
+        hosts: [
+          {Hosts: {total_mem: 1, cpu_count: 4, host_name: 'host1', bootStatus: 'REGISTERED'}},
+          {Hosts: {total_mem: 1, cpu_count: 3, host_name: 'host2', bootStatus: 'REGISTERED'}},
+          {Hosts: {total_mem: 1, cpu_count: 2, host_name: 'host3', bootStatus: 'REGISTERED'}},
+          {Hosts: {total_mem: 1, cpu_count: 1, host_name: 'host4', bootStatus: 'REGISTERED'}}
+        ],
         m: 'all hosts are REGISTERED, cpu',
         e: ['host1', 'host2', 'host3', 'host4']
       },
       {
-        hosts: {
-          h1: {memory: 1, cpu: 1, name: 'host4', bootStatus: 'REGISTERED'},
-          h2: {memory: 1, cpu: 1, name: 'host2', bootStatus: 'REGISTERED'},
-          h3: {memory: 1, cpu: 1, name: 'host3', bootStatus: 'REGISTERED'},
-          h4: {memory: 1, cpu: 1, name: 'host1', bootStatus: 'REGISTERED'}
+        dbHosts: {
+          host1: {bootStatus: 'REGISTERED'},
+          host2: {bootStatus: 'REGISTERED'},
+          host3: {bootStatus: 'REGISTERED'},
+          host4: {bootStatus: 'REGISTERED'}
         },
+        hosts: [
+          {Hosts: {total_mem: 1, cpu_count: 1, host_name: 'host4', bootStatus: 'REGISTERED'}},
+          {Hosts: {total_mem: 1, cpu_count: 1, host_name: 'host2', bootStatus: 'REGISTERED'}},
+          {Hosts: {total_mem: 1, cpu_count: 1, host_name: 'host3', bootStatus: 'REGISTERED'}},
+          {Hosts: {total_mem: 1, cpu_count: 1, host_name: 'host1', bootStatus: 'REGISTERED'}}
+        ],
         m: 'all hosts are REGISTERED, host_name',
         e: ['host1', 'host2', 'host3', 'host4']
       },
       {
-        hosts: {
-          h1: {memory: 2, cpu: 1, name: 'host1', bootStatus: 'REGISTERED'},
-          h2: {memory: 1, cpu: 2, name: 'host3', bootStatus: 'INIT'},
-          h3: {memory: 1, cpu: 1, name: 'host4', bootStatus: 'REGISTERED'},
-          h4: {memory: 1, cpu: 1, name: 'host2', bootStatus: 'INIT'}
+        dbHosts: {
+          host1: {bootStatus: 'REGISTERED'},
+          host2: {bootStatus: 'INIT'},
+          host3: {bootStatus: 'INIT'},
+          host4: {bootStatus: 'REGISTERED'}
         },
+        hosts: [
+          {Hosts: {total_mem: 2, cpu_count: 1, host_name: 'host1', bootStatus: 'REGISTERED'}},
+          {Hosts: {total_mem: 1, cpu_count: 2, host_name: 'host3', bootStatus: 'INIT'}},
+          {Hosts: {total_mem: 1, cpu_count: 1, host_name: 'host4', bootStatus: 'REGISTERED'}},
+          {Hosts: {total_mem: 1, cpu_count: 1, host_name: 'host2', bootStatus: 'INIT'}}
+        ],
         m: 'mix',
         e: ['host1', 'host4']
       }
@@ -151,8 +181,8 @@ describe('App.WizardStep5Controller', function () {
 
     tests.forEach(function (test) {
       it(test.m, function () {
-        controller.set('content', {hosts: test.hosts});
-        controller.renderHostInfo();
+        controller.set('content', {hosts: test.dbHosts});
+        controller.loadWizardHostsSuccessCallback({items: test.hosts});
         var r = controller.get('hosts');
         expect(Em.A(r).mapProperty('host_name')).to.eql(test.e);
       });

http://git-wip-us.apache.org/repos/asf/ambari/blob/a65b52e5/ambari-web/test/controllers/wizard_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/wizard_test.js b/ambari-web/test/controllers/wizard_test.js
index 922cc90..3298f70 100644
--- a/ambari-web/test/controllers/wizard_test.js
+++ b/ambari-web/test/controllers/wizard_test.js
@@ -1259,8 +1259,8 @@ describe('App.WizardController', function () {
 
     it('should return all hosts', function () {
       var hosts = {
-        'h1': {hostComponents: ['c1', 'c2'], disk_info: [{size: 2, available: 1}]},
-        'h2': {hostComponents: ['c3', 'c4'], disk_info: [{size: 2, available: 1}]}
+        'h1': {hostComponents: ['c1', 'c2']},
+        'h2': {hostComponents: ['c3', 'c4']}
       };
 
       var content = Em.Object.create({
@@ -1273,19 +1273,6 @@ describe('App.WizardController', function () {
         {
           "id": "h1",
           "hostName": "h1",
-          "publicHostName": "h1",
-          "diskInfo": [
-            {
-              "size": 2,
-              "available": 1
-            }
-          ],
-          "diskTotal": 0.0000019073486328125,
-          "diskFree": 9.5367431640625e-7,
-          "disksMounted": 1,
-          "osType": 0,
-          "osArch": 0,
-          "ip": 0,
           "hostComponents": [
             {
               "componentName": "c1",
@@ -1300,19 +1287,6 @@ describe('App.WizardController', function () {
         {
           "id": "h2",
           "hostName": "h2",
-          "publicHostName": "h2",
-          "diskInfo": [
-            {
-              "size": 2,
-              "available": 1
-            }
-          ],
-          "diskTotal": 0.0000019073486328125,
-          "diskFree": 9.5367431640625e-7,
-          "disksMounted": 1,
-          "osType": 0,
-          "osArch": 0,
-          "ip": 0,
           "hostComponents": [
             {
               "componentName": "c3",

http://git-wip-us.apache.org/repos/asf/ambari/blob/a65b52e5/ambari-web/test/views/main/admin/highAvailability/resourceManager/wizard_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/admin/highAvailability/resourceManager/wizard_view_test.js b/ambari-web/test/views/main/admin/highAvailability/resourceManager/wizard_view_test.js
index d30be42..9f3b6a6 100644
--- a/ambari-web/test/views/main/admin/highAvailability/resourceManager/wizard_view_test.js
+++ b/ambari-web/test/views/main/admin/highAvailability/resourceManager/wizard_view_test.js
@@ -85,11 +85,7 @@ describe('App.RMHighAvailabilityWizardView', function () {
       items: [
         {
           Hosts: {
-            host_name: 'host1',
-            cpu_count: 1,
-            total_mem: 1,
-            disk_info: {},
-            maintenance_state: 'OFF'
+            host_name: 'host1'
           }
         }
       ]
@@ -108,23 +104,15 @@ describe('App.RMHighAvailabilityWizardView', function () {
       expect(view.get('controller.content.hosts')).to.be.eql({
         "host1": {
           "name": "host1",
-          "cpu": 1,
-          "memory": 1,
-          "disk_info": {},
           "bootStatus": "REGISTERED",
-          "isInstalled": true,
-          "maintenance_state": "OFF"
+          "isInstalled": true
         }
       });
       expect(App.db.setHosts.calledWith({
         "host1": {
           "name": "host1",
-          "cpu": 1,
-          "memory": 1,
-          "disk_info": {},
           "bootStatus": "REGISTERED",
-          "isInstalled": true,
-          "maintenance_state": "OFF"
+          "isInstalled": true
         }
       })).to.be.true;
     });