You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ma...@apache.org on 2018/01/11 15:35:20 UTC
nifi git commit: NIFI-4754: - Only showing the import link in the new
Process Group dialog when initiating from the toolbar. This closes #2395.
Repository: nifi
Updated Branches:
refs/heads/master 6153fb646 -> 674c9e468
NIFI-4754:
- Only showing the import link in the new Process Group dialog when initiating from the toolbar.
This closes #2395.
Signed-off-by: Mark Payne <ma...@hotmail.com>
Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/674c9e46
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/674c9e46
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/674c9e46
Branch: refs/heads/master
Commit: 674c9e468785fd0c0f7b4cc68fa35f9707e36a71
Parents: 6153fb6
Author: Matt Gilman <ma...@gmail.com>
Authored: Wed Jan 10 15:30:05 2018 -0500
Committer: Mark Payne <ma...@hotmail.com>
Committed: Thu Jan 11 10:34:46 2018 -0500
----------------------------------------------------------------------
.../header/components/nf-ng-group-component.js | 17 +++++++++--------
.../src/main/webapp/js/nf/canvas/nf-actions.js | 2 +-
2 files changed, 10 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi/blob/674c9e46/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
----------------------------------------------------------------------
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 2ce8438..0458b87 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();
http://git-wip-us.apache.org/repos/asf/nifi/blob/674c9e46/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
----------------------------------------------------------------------
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 8a17291..64b0eab 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);
});