mirror of https://github.com/apache/nifi.git
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 <bbende@apache.org>
This commit is contained in:
parent
be83c0c5b2
commit
b304f70f3e
|
@ -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') {
|
||||
|
|
Loading…
Reference in New Issue