ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject [2/2] ambari git commit: AMBARI-9797 Retry functionality does not work on Kerberize cluster page.(ababiichuk)
Date Wed, 25 Feb 2015 18:52:27 GMT
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/76cdfbf4
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/76cdfbf4
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/76cdfbf4

Branch: refs/heads/trunk
Commit: 76cdfbf4d5ba16512ef5ab85e1b937204ae1c435
Parents: f55736f
Author: aBabiichuk <ababiichuk@cybervisiontech.com>
Authored: Wed Feb 25 18:33:52 2015 +0200
Committer: aBabiichuk <ababiichuk@cybervisiontech.com>
Committed: Wed Feb 25 20:52:08 2015 +0200

----------------------------------------------------------------------
 .../mixins/wizard/wizardProgressPageController.js    | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/76cdfbf4/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) {


Mime
View raw message