瀏覽代碼

AMBARI-14748. Unable to proceed Assign Slaves step (akovalenko)

Aleksandr Kovalenko 9 年之前
父節點
當前提交
277677746a
共有 1 個文件被更改,包括 7 次插入7 次删除
  1. 7 7
      ambari-web/app/controllers/wizard/step6_controller.js

+ 7 - 7
ambari-web/app/controllers/wizard/step6_controller.js

@@ -71,7 +71,7 @@ App.WizardStep6Controller = Em.Controller.extend(App.BlueprintMixin, {
    * Define state for submit button
    * @type {bool}
    */
-  submitDisabled: false,
+  submitDisabled: Em.computed.alias('validationInProgress'),
 
   /**
    * timer for validation request
@@ -562,13 +562,13 @@ App.WizardStep6Controller = Em.Controller.extend(App.BlueprintMixin, {
   callValidation: function (successCallback) {
     var self = this;
     clearTimeout(this.get('timer'));
-    this.set('timer', setTimeout(function() {
-      if (self.get('validationInProgress')) {
+    if (this.get('validationInProgress')) {
+      this.set('timer', setTimeout(function () {
         self.callValidation(successCallback);
-      } else {
-        self.callServerSideValidation(successCallback);
-      }
-    }, 700));
+      }, 700));
+    } else {
+      this.callServerSideValidation(successCallback);
+    }
   },
 
   /**