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/develop Commit: 3a05a7da721d70767ab3ad9a6827a10e2d318725 Parents: a896510 Author: Matt Gilman <matt.c.gil...@gmail.com> Authored: Tue Jun 23 16:15:33 2015 -0400 Committer: Matt Gilman <matt.c.gil...@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({