AMBARI-9797 Retry functionality does not work on Kerberize cluster page.(ababiichuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ac7c0bbb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ac7c0bbb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ac7c0bbb Branch: refs/heads/branch-2.0.0 Commit: ac7c0bbbe1c958fc7666a7aef01f2a5fdc1b3f34 Parents: 0f46862 Author: aBabiichuk <[email protected]> Authored: Wed Feb 25 18:33:52 2015 +0200 Committer: aBabiichuk <[email protected]> Committed: Wed Feb 25 20:53:04 2015 +0200 ---------------------------------------------------------------------- .../mixins/wizard/wizardProgressPageController.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/ac7c0bbb/ambari-web/app/mixins/wizard/wizardProgressPageController.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/mixins/wizard/wizardProgressPageController.js b/ambari-web/app/mixins/wizard/wizardProgressPageController.js index 6b7d9f0..a5933cb 100644 --- a/ambari-web/app/mixins/wizard/wizardProgressPageController.js +++ b/ambari-web/app/mixins/wizard/wizardProgressPageController.js @@ -63,6 +63,7 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create({ var requestIds = this.get('content.tasksRequestIds'); var currentRequestId = requestIds && requestIds[0][0]; if (!currentRequestId) { + this.set('isLoaded', false); this.submitRequest(); } else { self.set('currentPageRequestId', currentRequestId); @@ -123,6 +124,7 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create({ name: this.get('request.ajaxName'), data: this.get('request.ajaxData'), sender: this, + error: 'onSingleRequestError', success: 'submitRequestSuccess', kdcCancelHandler: 'failTaskOnKdcCheck' }); @@ -143,7 +145,9 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create({ }, failTaskOnKdcCheck: function() { - App.router.send('back'); + this.set('status', 'FAILED'); + this.set('isLoaded', true); + this.set('showRetry', true); }, doPollingForPageRequest: function () { @@ -350,6 +354,13 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create({ this.setTaskStatus(this.get('currentTaskId'), 'FAILED'); }, + onSingleRequestError: function (jqXHR, ajaxOptions, error, opt) { + App.ajax.defaultErrorHandler(jqXHR, opt.url, opt.method, jqXHR.status); + this.set('status', 'FAILED'); + this.set('isLoaded', true); + this.set('showRetry', true); + }, + onTaskCompleted: function () { this.setTaskStatus(this.get('currentTaskId'), 'COMPLETED'); }, @@ -384,6 +395,8 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create({ var hostNames = (Array.isArray(hostName)) ? hostName : [hostName]; var self = this; + this.set('showRetry', false); + this.checkInstalledComponents(componentName, hostNames).then(function (data) { var hostsWithComponents = data.items.mapProperty('HostRoles.host_name'); var result = hostNames.map(function(item) {
