Browse Source

AMBARI-2732. After re-running host checks, the text is not updated at the top. (Aleksandr Kovalenko via yusaku)

Yusaku Sako 11 years ago
parent
commit
aa231d4e80

+ 14 - 13
ambari-web/app/controllers/wizard/step3_controller.js

@@ -604,22 +604,23 @@ App.WizardStep3Controller = Em.Controller.extend({
   /**
   /**
    * check warnings from server and put it in parsing
    * check warnings from server and put it in parsing
     */
     */
-  rerunChecks: function(){
+  rerunChecks: function () {
     var self = this;
     var self = this;
     var currentProgress = 0;
     var currentProgress = 0;
-    var interval = setInterval(function(){
-      self.set('checksUpdateProgress', Math.ceil((++currentProgress/60)*100))
+    var interval = setInterval(function () {
+      currentProgress += 100000 / self.get('warningsTimeInterval');
+      if (currentProgress < 100) {
+        self.set('checksUpdateProgress', currentProgress);
+      } else {
+        clearInterval(interval);
+        App.ajax.send({
+          name: 'wizard.step3.rerun_checks',
+          sender: self,
+          success: 'rerunChecksSuccessCallback',
+          error: 'rerunChecksErrorCallback'
+        });
+      }
     }, 1000);
     }, 1000);
-    setTimeout(function(){
-      clearInterval(interval);
-      App.ajax.send({
-        name: 'wizard.step3.rerun_checks',
-        sender: self,
-        success: 'rerunChecksSuccessCallback',
-        error: 'rerunChecksErrorCallback'
-      });
-    }, this.get('warningsTimeInterval'));
-
   },
   },
 
 
   rerunChecksSuccessCallback: function (data) {
   rerunChecksSuccessCallback: function (data) {

+ 0 - 3
ambari-web/app/templates/wizard/step3_host_warnings_popup.hbs

@@ -19,10 +19,7 @@
 
 
 <div id="host-warnings">
 <div id="host-warnings">
   <div class="notice">
   <div class="notice">
-    <!-- 
     <span>{{t installer.step3.hostWarningsPopup.checks}} <b>{{view.warningsNotice}}</b>.<br>{{t installer.step3.hostWarningsPopup.notice}}</span>
     <span>{{t installer.step3.hostWarningsPopup.checks}} <b>{{view.warningsNotice}}</b>.<br>{{t installer.step3.hostWarningsPopup.notice}}</span>
-    -->
-    <span>{{t installer.step3.hostWarningsPopup.notice}}</span>
   </div>
   </div>
   <div class="row-fluid">
   <div class="row-fluid">
     <div class="span7">
     <div class="span7">