You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by da...@apache.org on 2015/06/27 02:30:11 UTC
[44/50] [abbrv] incubator-nifi git commit: NIFI-683: - Add explicit
handling of errors that occur during the initial page loading.
NIFI-683:
- Add explicit handling of errors that occur during the initial page loading.
Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/3a05a7da
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/3a05a7da
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/3a05a7da
Branch: refs/heads/NIFI-680
Commit: 3a05a7da721d70767ab3ad9a6827a10e2d318725
Parents: a896510
Author: Matt Gilman <ma...@gmail.com>
Authored: Tue Jun 23 16:15:33 2015 -0400
Committer: Matt Gilman <ma...@gmail.com>
Committed: Tue Jun 23 16:15:33 2015 -0400
----------------------------------------------------------------------
.../nifi-web-ui/src/main/webapp/js/nf/nf-common.js | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/3a05a7da/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 2a5273d..fa43b29 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,23 @@ nf.Common = {
* @argument {string} error The error
*/
handleAjaxError: function (xhr, status, error) {
+ // 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 unexcepted error has occurred');
+ if ($.trim(xhr.responseText) === '') {
+ $('#message-content').text('Please check the logs.');
+ } else {
+ $('#message-content').text(xhr.responseText);
+ }
+
+ // show the error pane
+ $('#message-pane').show();
+
+ // close the canvas
+ nf.Common.closeCanvas();
+ return;
+ }
+
// status code 400, 404, and 409 are expected response codes for common errors.
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
nf.Dialog.showOkDialog({