ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject git commit: AMBARI-3864. JS Error in 'Add Host Wizard' if we proceed with failed registered hosts. (xiwang via yusaku)
Date Sat, 23 Nov 2013 01:05:48 GMT
Updated Branches:
  refs/heads/trunk 9f0359804 -> d727c0a15


AMBARI-3864. JS Error in 'Add Host Wizard' if we proceed with failed registered hosts. (xiwang
via yusaku)


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

Branch: refs/heads/trunk
Commit: d727c0a159a01c9007013f47e142b4b54ea4cdb6
Parents: 9f03598
Author: Yusaku Sako <yusaku@hortonworks.com>
Authored: Fri Nov 22 17:05:57 2013 -0800
Committer: Yusaku Sako <yusaku@hortonworks.com>
Committed: Fri Nov 22 17:06:18 2013 -0800

----------------------------------------------------------------------
 ambari-web/app/controllers/wizard.js | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/d727c0a1/ambari-web/app/controllers/wizard.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard.js b/ambari-web/app/controllers/wizard.js
index c22158e..48c1cb0 100644
--- a/ambari-web/app/controllers/wizard.js
+++ b/ambari-web/app/controllers/wizard.js
@@ -539,16 +539,17 @@ App.WizardController = Em.Controller.extend({
    */
   saveConfirmedHosts: function (stepController) {
     var hostInfo = {};
-
     stepController.get('content.hosts').forEach(function (_host) {
-      hostInfo[_host.name] = {
-        name: _host.name,
-        cpu: _host.cpu,
-        memory: _host.memory,
-        disk_info: _host.disk_info,
-        bootStatus: _host.bootStatus,
-        isInstalled: false
-      };
+      if (_host.bootStatus == 'REGISTERED') {
+        hostInfo[_host.name] = {
+          name: _host.name,
+          cpu: _host.cpu,
+          memory: _host.memory,
+          disk_info: _host.disk_info,
+          bootStatus: _host.bootStatus,
+          isInstalled: false
+        };
+      }
     });
     console.log('wizardController:saveConfirmedHosts: save hosts ', hostInfo);
     this.setDBProperty('hosts', hostInfo);


Mime
View raw message