You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by jo...@apache.org on 2015/07/27 04:36:35 UTC

[4/9] nifi git commit: NIFI-777: - Ensuring the account request form is shown. (cherry picked from commit a19390cdecfd85f1b165f95cb4901b9366e627a0)

NIFI-777:
- Ensuring the account request form is shown.
(cherry picked from commit a19390cdecfd85f1b165f95cb4901b9366e627a0)


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/8d0b1ef1
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/8d0b1ef1
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/8d0b1ef1

Branch: refs/heads/master
Commit: 8d0b1ef1f590f67ad81a3e0972ef2496ce26c5bd
Parents: 106d5db
Author: Matt Gilman <ma...@gmail.com>
Authored: Mon Jul 20 09:46:58 2015 -0400
Committer: joewitt <jo...@apache.org>
Committed: Thu Jul 23 09:32:17 2015 -0700

----------------------------------------------------------------------
 .../nifi-web-ui/src/main/webapp/js/nf/nf-common.js  | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/8d0b1ef1/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js
index 110d383..e08ad9e 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js
@@ -184,6 +184,16 @@ nf.Common = {
      * @argument {string} error     The error
      */
     handleAjaxError: function (xhr, status, error) {
+        // show the account registration page if necessary
+        if (xhr.status === 401 && $('#registration-pane').length) {
+            // show the registration pane
+            $('#registration-pane').show();
+
+            // close the canvas
+            nf.Common.closeCanvas();
+            return;
+        }
+        
         // if an error occurs while the splash screen is visible close the canvas show the error message
         if ($('#splash').is(':visible')) {
             $('#message-title').text('An unexpected error has occurred');
@@ -207,12 +217,6 @@ nf.Common = {
                 dialogContent: nf.Common.escapeHtml(xhr.responseText),
                 overlayBackground: false
             });
-        } else if (xhr.status === 401 && $('#registration-pane').length) {
-            // show the registration pane
-            $('#registration-pane').show();
-
-            // close the canvas
-            nf.Common.closeCanvas();
         } else {
             if (xhr.status < 99 || xhr.status === 12007 || xhr.status === 12029) {
                 var content = 'Please ensure the application is running and check the logs for any errors.';