ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject git commit: AMBARI-5921. Enable Security Wizard: Unnecessary popup after clicking on done button of last step of the wizard. (jaimin)
Date Thu, 29 May 2014 17:30:49 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 949ecd21b -> 3618ecbf7


AMBARI-5921. Enable Security Wizard: Unnecessary popup after clicking on done button of last
step of the wizard. (jaimin)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3618ecbf
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3618ecbf
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3618ecbf

Branch: refs/heads/trunk
Commit: 3618ecbf7837b360b99e59a9c356bf2cac01596f
Parents: 949ecd2
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Thu May 29 10:30:09 2014 -0700
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Thu May 29 10:30:30 2014 -0700

----------------------------------------------------------------------
 ambari-web/app/controllers/main/admin/security.js | 8 ++++++--
 ambari-web/app/routes/add_security.js             | 2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3618ecbf/ambari-web/app/controllers/main/admin/security.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/security.js b/ambari-web/app/controllers/main/admin/security.js
index 6db3671..a958088 100644
--- a/ambari-web/app/controllers/main/admin/security.js
+++ b/ambari-web/app/controllers/main/admin/security.js
@@ -252,9 +252,13 @@ App.MainAdminSecurityController = Em.Controller.extend({
     }
   },
 
-  errorCallback: function () {
+  errorCallback: function (jqXHR) {
     this.set('dataIsLoaded', true);
-    this.showSecurityErrorPopup();
+    // Show the error popup if the API call received a response from the server.
+    // jqXHR.status will be empty when browser cancels the request. Refer to AMBARI-5921
for more info
+    if (!!jqXHR.status) {
+      this.showSecurityErrorPopup();
+    }
   },
 
   getSecurityStatusFromServerSuccessCallback: function (data) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/3618ecbf/ambari-web/app/routes/add_security.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/add_security.js b/ambari-web/app/routes/add_security.js
index c2b526e..8c7af03 100644
--- a/ambari-web/app/routes/add_security.js
+++ b/ambari-web/app/routes/add_security.js
@@ -230,8 +230,8 @@ module.exports = App.WizardRoute.extend({
       var controller = router.get('mainAdminSecurityAddStep4Controller');
       if (!controller.get('isSubmitDisabled')) {
         $(context.currentTarget).parents("#modal").find(".close").trigger('click');
+        location.reload();
       }
-      location.reload();
     }
   }),
 


Mime
View raw message