Repository: ambari Updated Branches: refs/heads/trunk 31459c7d5 -> a3639e6e4
AMBARI-5123. Background Operations window does not appear after triggering Rolling Restart. (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a3639e6e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a3639e6e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a3639e6e Branch: refs/heads/trunk Commit: a3639e6e4322140700163536bfda31534568518a Parents: 31459c7 Author: Oleg Nechiporenko <[email protected]> Authored: Tue Mar 18 13:19:38 2014 +0200 Committer: Oleg Nechiporenko <[email protected]> Committed: Tue Mar 18 13:19:38 2014 +0200 ---------------------------------------------------------------------- ambari-web/app/utils/batch_scheduled_requests.js | 6 +++--- ambari-web/app/views/common/table_view.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/a3639e6e/ambari-web/app/utils/batch_scheduled_requests.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/utils/batch_scheduled_requests.js b/ambari-web/app/utils/batch_scheduled_requests.js index dda134b..c4401c0 100644 --- a/ambari-web/app/utils/batch_scheduled_requests.js +++ b/ambari-web/app/utils/batch_scheduled_requests.js @@ -23,8 +23,8 @@ var App = require('app'); */ var defaultSuccessCallback = function(data, ajaxOptions, params) { App.router.get('applicationController').dataLoading().done(function(initValue) { + params.query && params.query.set('status', 'SUCCESS'); if (initValue) { - params.query && params.query.set('status', 'SUCCESS'); App.router.get('backgroundOperationsController').showPopup(); } }); @@ -270,9 +270,9 @@ module.exports = { var batchSize = this.get('innerView.batchSize'); var waitTime = this.get('innerView.interBatchWaitTimeSeconds'); var tolerateSize = this.get('innerView.tolerateSize'); - self._doPostBatchRollingRestartRequest(restartComponents, batchSize, waitTime, tolerateSize, function() { + self._doPostBatchRollingRestartRequest(restartComponents, batchSize, waitTime, tolerateSize, function(data, ajaxOptions, params) { dialog.hide(); - defaultSuccessCallback(); + defaultSuccessCallback(data, ajaxOptions, params); }); }, updateButtons : function() { http://git-wip-us.apache.org/repos/asf/ambari/blob/a3639e6e/ambari-web/app/views/common/table_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/table_view.js b/ambari-web/app/views/common/table_view.js index 002478b..ffb73f7 100644 --- a/ambari-web/app/views/common/table_view.js +++ b/ambari-web/app/views/common/table_view.js @@ -248,10 +248,10 @@ App.TableView = Em.View.extend(App.UserPref, { var filteredContentLength = this.get('filteredContent.length'); if (property == 'displayLength') { this.set('startIndex', Math.min(1, filteredContentLength)); - } else if (this.get('startIndex') > filteredContentLength) { - this.set('startIndex', Math.floor((filteredContentLength - 1) / displayLength) * displayLength + 1); } else if (!filteredContentLength) { this.set('startIndex', 0); + } else if (this.get('startIndex') > filteredContentLength) { + this.set('startIndex', Math.floor((filteredContentLength - 1) / displayLength) * displayLength + 1); } else if (!this.get('startIndex')) { this.set('startIndex', 1); }
