You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by bb...@apache.org on 2016/09/21 18:40:25 UTC

nifi git commit: NIFI-2785: - Ensure the URL is updated when uploading a template to ensure it's going to the appropriate Process Group.

Repository: nifi
Updated Branches:
  refs/heads/master be83c0c5b -> b304f70f3


NIFI-2785: - Ensure the URL is updated when uploading a template to ensure it's going to the appropriate Process Group.

This closes #1029.

Signed-off-by: Bryan Bende <bb...@apache.org>


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

Branch: refs/heads/master
Commit: b304f70f3ee3715dd744e03bc94c231853abf2b5
Parents: be83c0c
Author: Matt Gilman <ma...@gmail.com>
Authored: Mon Sep 19 13:23:00 2016 -0400
Committer: Bryan Bende <bb...@apache.org>
Committed: Wed Sep 21 14:40:10 2016 -0400

----------------------------------------------------------------------
 .../nf/canvas/controllers/nf-ng-canvas-operate-controller.js   | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/b304f70f/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-operate-controller.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-operate-controller.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-operate-controller.js
index dd4ae02..5832332 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-operate-controller.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-operate-controller.js
@@ -114,8 +114,12 @@ nf.ng.Canvas.OperateCtrl = function () {
                 init: function () {
                     // initialize the form
                     var templateForm = $('#template-upload-form').ajaxForm({
-                        url: '../nifi-api/process-groups/' + encodeURIComponent(nf.Canvas.getGroupId()) + '/templates/upload',
+                        url: '../nifi-api/process-groups/',
                         dataType: 'xml',
+                        beforeSubmit: function (formData, $form, options) {
+                            // ensure uploading to the current process group
+                            options.url += (encodeURIComponent(nf.Canvas.getGroupId()) + '/templates/upload');
+                        },
                         success: function (response, statusText, xhr, form) {
                             // see if the import was successful
                             if (response.documentElement.tagName === 'templateEntity') {