Updated Branches: refs/heads/trunk 26229f0e9 -> aa231d4e8
AMBARI-2732. After re-running host checks, the text is not updated at the top. (Aleksandr Kovalenko 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/aa231d4e Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/aa231d4e Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/aa231d4e Branch: refs/heads/trunk Commit: aa231d4e805459b3bb2f9a63622e3299400397f5 Parents: 26229f0 Author: Yusaku Sako <[email protected]> Authored: Tue Jul 30 15:02:13 2013 -0700 Committer: Yusaku Sako <[email protected]> Committed: Tue Jul 30 15:02:13 2013 -0700 ---------------------------------------------------------------------- .../app/controllers/wizard/step3_controller.js | 27 ++++++++++---------- .../wizard/step3_host_warnings_popup.hbs | 3 --- 2 files changed, 14 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/aa231d4e/ambari-web/app/controllers/wizard/step3_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/wizard/step3_controller.js b/ambari-web/app/controllers/wizard/step3_controller.js index 9c46802..50cf574 100644 --- a/ambari-web/app/controllers/wizard/step3_controller.js +++ b/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 */ - rerunChecks: function(){ + rerunChecks: function () { var self = this; 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); - setTimeout(function(){ - clearInterval(interval); - App.ajax.send({ - name: 'wizard.step3.rerun_checks', - sender: self, - success: 'rerunChecksSuccessCallback', - error: 'rerunChecksErrorCallback' - }); - }, this.get('warningsTimeInterval')); - }, rerunChecksSuccessCallback: function (data) { http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/aa231d4e/ambari-web/app/templates/wizard/step3_host_warnings_popup.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/wizard/step3_host_warnings_popup.hbs b/ambari-web/app/templates/wizard/step3_host_warnings_popup.hbs index 18fad63..59e2062 100644 --- a/ambari-web/app/templates/wizard/step3_host_warnings_popup.hbs +++ b/ambari-web/app/templates/wizard/step3_host_warnings_popup.hbs @@ -19,10 +19,7 @@ <div id="host-warnings"> <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.notice}}</span> </div> <div class="row-fluid"> <div class="span7">
