mirror of https://github.com/apache/nifi.git
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 <markap14@hotmail.com>
This commit is contained in:
parent
6153fb6465
commit
674c9e4687
|
@ -152,12 +152,6 @@
|
||||||
* Show the modal.
|
* Show the modal.
|
||||||
*/
|
*/
|
||||||
show: function () {
|
show: function () {
|
||||||
if (nfCommon.canVersionFlows()) {
|
|
||||||
$('#import-process-group-link').show();
|
|
||||||
} else {
|
|
||||||
$('#import-process-group-link').hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.getElement().modal('show');
|
this.getElement().modal('show');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -211,7 +205,7 @@
|
||||||
* @argument {object} pt The point that the component was dropped.
|
* @argument {object} pt The point that the component was dropped.
|
||||||
*/
|
*/
|
||||||
dropHandler: function (pt) {
|
dropHandler: function (pt) {
|
||||||
this.promptForGroupName(pt);
|
this.promptForGroupName(pt, true);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -228,8 +222,9 @@
|
||||||
* Prompts the user to enter the name for the group.
|
* Prompts the user to enter the name for the group.
|
||||||
*
|
*
|
||||||
* @argument {object} pt The point that the group was dropped.
|
* @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;
|
var groupComponent = this;
|
||||||
return $.Deferred(function (deferred) {
|
return $.Deferred(function (deferred) {
|
||||||
var addGroup = function () {
|
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
|
// show the dialog
|
||||||
groupComponent.modal.storePt(pt);
|
groupComponent.modal.storePt(pt);
|
||||||
groupComponent.modal.show();
|
groupComponent.modal.show();
|
||||||
|
|
|
@ -1535,7 +1535,7 @@
|
||||||
var origin = nfCanvasUtils.getOrigin(selection);
|
var origin = nfCanvasUtils.getOrigin(selection);
|
||||||
|
|
||||||
var pt = {'x': origin.x, 'y': origin.y};
|
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);
|
var group = d3.select('#id-' + processGroup.id);
|
||||||
nfCanvasUtils.moveComponents(selection, group);
|
nfCanvasUtils.moveComponents(selection, group);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue