浏览代码

AMBARI-6313. Add Host wizard: Browser Refresh is not handled gracefully. (jaimin)

Jaimin Jetly 11 年之前
父节点
当前提交
b3e1f7cfbb
共有 2 个文件被更改,包括 7 次插入3 次删除
  1. 2 2
      ambari-web/app/controllers/main/host/add_controller.js
  2. 5 1
      ambari-web/app/views/main/host/add_view.js

+ 2 - 2
ambari-web/app/controllers/main/host/add_controller.js

@@ -346,11 +346,11 @@ App.AddHostController = App.WizardController.extend({
         this.loadServices();
         this.loadMasterComponentHosts();
         this.loadSlaveComponentHosts();
-        this.load('hosts',true);
+        this.load('hosts');
       case '2':
         this.loadServices();
       case '1':
-        this.load('hosts',true);
+        this.load('hosts');
         this.load('installOptions');
         this.load('cluster');
     }

+ 5 - 1
ambari-web/app/views/main/host/add_view.js

@@ -58,7 +58,11 @@ App.AddHostView = Em.View.extend({
   },
 
   willInsertElement: function () {
-    this.loadHosts();
+    if (this.get('controller').getDBProperty('hosts')) {
+      this.set('isLoaded', true);
+    } else {
+      this.loadHosts();
+    }
   },
 
   loadHosts: function () {