You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by jp...@apache.org on 2015/12/15 16:06:13 UTC

nifi git commit: NIFI-1119: - Addressing race condition that caused the revision to be checked before the flow was loaded.

Repository: nifi
Updated Branches:
  refs/heads/master 17be1c2d9 -> c75b5cfce


NIFI-1119: - Addressing race condition that caused the revision to be checked before the flow was loaded.

Signed-off-by: jpercivall <jo...@yahoo.com>


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

Branch: refs/heads/master
Commit: c75b5cfcea7719550841cad08fba726d718b8ce8
Parents: 17be1c2
Author: Matt Gilman <ma...@gmail.com>
Authored: Tue Dec 15 09:11:15 2015 -0500
Committer: jpercivall <jo...@yahoo.com>
Committed: Tue Dec 15 10:05:44 2015 -0500

----------------------------------------------------------------------
 .../nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js   | 2 +-
 .../nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js | 9 +++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/c75b5cfc/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
index 78dd8a6..428ddf2 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
@@ -978,7 +978,7 @@ nf.Canvas = (function () {
                 // get the process group to refresh everything
                 var processGroupXhr = reloadProcessGroup(nf.Canvas.getGroupId());
                 var statusXhr = reloadFlowStatus();
-                var settingsXhr = nf.Settings.loadSettings();
+                var settingsXhr = nf.Settings.loadSettings(false); // don't reload the status as we want to wait for deferreds to complete
                 $.when(processGroupXhr, statusXhr, settingsXhr).done(function (processGroupResult) {
                     // adjust breadcrumbs if necessary
                     var title = $('#data-flow-title-container');

http://git-wip-us.apache.org/repos/asf/nifi/blob/c75b5cfc/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js
index 42a4bbc..f6ff3ea 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js
@@ -1646,7 +1646,7 @@ nf.Settings = (function () {
         /**
          * Loads the settings.
          */
-        loadSettings: function () {
+        loadSettings: function (reloadStatus) {
             var settings = $.ajax({
                 type: 'GET',
                 url: config.urls.controllerConfig,
@@ -1680,7 +1680,12 @@ nf.Settings = (function () {
             var reportingTasks = loadReportingTasks();
 
             // return a deferred for all parts of the settings
-            return $.when(settings, controllerServices, reportingTasks).done(nf.Canvas.reloadStatus).fail(nf.Common.handleAjaxError);
+            return $.when(settings, controllerServices, reportingTasks).done(function () {
+                // always reload the status, unless the flag is specifically set to false
+                if (reloadStatus !== false) {
+                    nf.Canvas.reloadStatus();
+                }
+            }).fail(nf.Common.handleAjaxError);
         },
         
         /**