diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-group-component.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-group-component.js index 2ce843866e..0458b87ce1 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-group-component.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-group-component.js @@ -152,12 +152,6 @@ * Show the modal. */ show: function () { - if (nfCommon.canVersionFlows()) { - $('#import-process-group-link').show(); - } else { - $('#import-process-group-link').hide(); - } - this.getElement().modal('show'); }, @@ -211,7 +205,7 @@ * @argument {object} pt The point that the component was dropped. */ dropHandler: function (pt) { - this.promptForGroupName(pt); + this.promptForGroupName(pt, true); }, /** @@ -228,8 +222,9 @@ * Prompts the user to enter the name for the group. * * @argument {object} pt The point that the group was dropped. + * @argument {boolean} showImportLink Whether we should show the import link */ - promptForGroupName: function (pt) { + promptForGroupName: function (pt, showImportLink) { var groupComponent = this; return $.Deferred(function (deferred) { var addGroup = function () { @@ -286,6 +281,12 @@ } }]); + if (showImportLink === true && nfCommon.canVersionFlows()) { + $('#import-process-group-link').show(); + } else { + $('#import-process-group-link').hide(); + } + // show the dialog groupComponent.modal.storePt(pt); groupComponent.modal.show(); diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js index 8a17291392..64b0eaba26 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js @@ -1535,7 +1535,7 @@ var origin = nfCanvasUtils.getOrigin(selection); var pt = {'x': origin.x, 'y': origin.y}; - $.when(nfNgBridge.injector.get('groupComponent').promptForGroupName(pt)).done(function (processGroup) { + $.when(nfNgBridge.injector.get('groupComponent').promptForGroupName(pt, false)).done(function (processGroup) { var group = d3.select('#id-' + processGroup.id); nfCanvasUtils.moveComponents(selection, group); });