diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/modal/jquery.modal.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/modal/jquery.modal.js
index 03cca9669d..25fe57ff74 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/modal/jquery.modal.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/modal/jquery.modal.js
@@ -167,37 +167,37 @@
var dialog = $(this).addClass('dialog cancellable modal');
dialog.css('display', 'none');
- var nfDialog = {};
+ var nfDialogData = {};
if (isDefinedAndNotNull(dialog.data('nf-dialog'))) {
- nfDialog = dialog.data('nf-dialog');
+ nfDialogData = dialog.data('nf-dialog');
}
// ensure the options have been properly specified
if (isDefinedAndNotNull(options)) {
- $.extend(nfDialog, options);
+ $.extend(nfDialogData, options);
//persist data attribute
- dialog.data('nfDialog', nfDialog);
+ dialog.data('nfDialog', nfDialogData);
}
// determine if dialog needs a header
- if (!isDefinedAndNotNull(nfDialog.header) || nfDialog.header) {
+ if (!isDefinedAndNotNull(nfDialogData.header) || nfDialogData.header) {
var dialogHeaderText = $('');
var dialogHeader = $('
').prepend(dialogHeaderText);
// determine if the specified header text is null
- if (!isBlank(nfDialog.headerText)) {
- dialogHeaderText.text(nfDialog.headerText);
+ if (!isBlank(nfDialogData.headerText)) {
+ dialogHeaderText.text(nfDialogData.headerText);
}
dialog.prepend(dialogHeader);
}
// determine if dialog needs footer/buttons
- if (!isDefinedAndNotNull(nfDialog.footer) || nfDialog.footer) {
+ if (!isDefinedAndNotNull(nfDialogData.footer) || nfDialogData.footer) {
// add the buttons
- addButtons(dialog, nfDialog.buttons);
+ addButtons(dialog, nfDialogData.buttons);
}
});
},
@@ -210,17 +210,17 @@
setCloseHandler: function (handler) {
return this.each(function (index, dialog) {
- var nfDialog = {};
+ var nfDialogData = {};
if (isDefinedAndNotNull($(this).data('nf-dialog'))) {
- nfDialog = $(dialog).data('nf-dialog');
+ nfDialogData = $(dialog).data('nf-dialog');
}
- if (!isDefinedAndNotNull(nfDialog.handler)){
- nfDialog.handler = {};
+ if (!isDefinedAndNotNull(nfDialogData.handler)){
+ nfDialogData.handler = {};
}
- nfDialog.handler.close = handler;
+ nfDialogData.handler.close = handler;
//persist data attribute
- $(dialog).data('nfDialog', nfDialog);
+ $(dialog).data('nfDialog', nfDialogData);
});
},
@@ -232,17 +232,17 @@
setOpenHandler: function (handler) {
return this.each(function (index, dialog) {
- var nfDialog = {};
+ var nfDialogData = {};
if (isDefinedAndNotNull($(this).data('nf-dialog'))) {
- nfDialog = $(dialog).data('nf-dialog');
+ nfDialogData = $(dialog).data('nf-dialog');
}
- if (!isDefinedAndNotNull(nfDialog.handler)){
- nfDialog.handler = {};
+ if (!isDefinedAndNotNull(nfDialogData.handler)){
+ nfDialogData.handler = {};
}
- nfDialog.handler.open = handler;
+ nfDialogData.handler.open = handler;
//persist data attribute
- $(dialog).data('nfDialog', nfDialog);
+ $(dialog).data('nfDialog', nfDialogData);
});
},
@@ -254,17 +254,17 @@
setResizeHandler: function (handler) {
return this.each(function (index, dialog) {
- var nfDialog = {};
+ var nfDialogData = {};
if (isDefinedAndNotNull($(this).data('nf-dialog'))) {
- nfDialog = $(dialog).data('nf-dialog');
+ nfDialogData = $(dialog).data('nf-dialog');
}
- if (!isDefinedAndNotNull(nfDialog.handler)){
- nfDialog.handler = {};
+ if (!isDefinedAndNotNull(nfDialogData.handler)){
+ nfDialogData.handler = {};
}
- nfDialog.handler.resize = handler;
+ nfDialogData.handler.resize = handler;
//persist data attribute
- $(dialog).data('nfDialog', nfDialog);
+ $(dialog).data('nfDialog', nfDialogData);
});
},
@@ -318,147 +318,147 @@
var dialog = $(this);
var dialogContent = dialog.find('.dialog-content');
- var nfDialog = {};
+ var nfDialogData = {};
if (isDefinedAndNotNull(dialog.data('nf-dialog'))) {
- nfDialog = dialog.data('nf-dialog');
+ nfDialogData = dialog.data('nf-dialog');
}
//initialize responsive properties
- if (!isDefinedAndNotNull(nfDialog.responsive)) {
- nfDialog.responsive = {};
+ if (!isDefinedAndNotNull(nfDialogData.responsive)) {
+ nfDialogData.responsive = {};
- if (!isDefinedAndNotNull(nfDialog.responsive.x)) {
- nfDialog.responsive.x = true;
+ if (!isDefinedAndNotNull(nfDialogData.responsive.x)) {
+ nfDialogData.responsive.x = true;
}
- if (!isDefinedAndNotNull(nfDialog.responsive.y)) {
- nfDialog.responsive.y = true;
+ if (!isDefinedAndNotNull(nfDialogData.responsive.y)) {
+ nfDialogData.responsive.y = true;
}
} else {
- if (!isDefinedAndNotNull(nfDialog.responsive.x)) {
- nfDialog.responsive.x = true;
+ if (!isDefinedAndNotNull(nfDialogData.responsive.x)) {
+ nfDialogData.responsive.x = true;
} else {
- nfDialog.responsive.x = (nfDialog.responsive.x == "true" || nfDialog.responsive.x == true) ? true : false;
+ nfDialogData.responsive.x = (nfDialogData.responsive.x == "true" || nfDialogData.responsive.x == true) ? true : false;
}
- if (!isDefinedAndNotNull(nfDialog.responsive.y)) {
- nfDialog.responsive.y = true;
+ if (!isDefinedAndNotNull(nfDialogData.responsive.y)) {
+ nfDialogData.responsive.y = true;
} else {
- nfDialog.responsive.y = (nfDialog.responsive.y == "true" || nfDialog.responsive.y == true) ? true : false;
+ nfDialogData.responsive.y = (nfDialogData.responsive.y == "true" || nfDialogData.responsive.y == true) ? true : false;
}
}
- if (nfDialog.responsive.y || nfDialog.responsive.x) {
+ if (nfDialogData.responsive.y || nfDialogData.responsive.x) {
var fullscreenHeight;
var fullscreenWidth;
- if (isDefinedAndNotNull(nfDialog.responsive['fullscreen-height'])) {
- fullscreenHeight = parseInt(nfDialog.responsive['fullscreen-height'], 10);
+ if (isDefinedAndNotNull(nfDialogData.responsive['fullscreen-height'])) {
+ fullscreenHeight = parseInt(nfDialogData.responsive['fullscreen-height'], 10);
} else {
- nfDialog.responsive['fullscreen-height'] = dialog.height() + 'px';
+ nfDialogData.responsive['fullscreen-height'] = dialog.height() + 'px';
- fullscreenHeight = parseInt(nfDialog.responsive['fullscreen-height'], 10);
+ fullscreenHeight = parseInt(nfDialogData.responsive['fullscreen-height'], 10);
}
- if (isDefinedAndNotNull(nfDialog.responsive['fullscreen-width'])) {
- fullscreenWidth = parseInt(nfDialog.responsive['fullscreen-width'], 10);
+ if (isDefinedAndNotNull(nfDialogData.responsive['fullscreen-width'])) {
+ fullscreenWidth = parseInt(nfDialogData.responsive['fullscreen-width'], 10);
} else {
- nfDialog.responsive['fullscreen-width'] = dialog.width() + 'px';
+ nfDialogData.responsive['fullscreen-width'] = dialog.width() + 'px';
- fullscreenWidth = parseInt(nfDialog.responsive['fullscreen-width'], 10);
+ fullscreenWidth = parseInt(nfDialogData.responsive['fullscreen-width'], 10);
}
- if (!isDefinedAndNotNull(nfDialog.width)) {
- nfDialog.width = dialog.css('width');
+ if (!isDefinedAndNotNull(nfDialogData.width)) {
+ nfDialogData.width = dialog.css('width');
}
- if (!isDefinedAndNotNull(nfDialog['min-width'])) {
+ if (!isDefinedAndNotNull(nfDialogData['min-width'])) {
if (parseInt(dialog.css('min-width'), 10) > 0) {
- nfDialog['min-width'] = dialog.css('min-width');
+ nfDialogData['min-width'] = dialog.css('min-width');
} else {
- nfDialog['min-width'] = nfDialog.width;
+ nfDialogData['min-width'] = nfDialogData.width;
}
}
//min-width should always be set in terms of px
- if (nfDialog['min-width'].indexOf("%") > 0) {
- nfDialog['min-width'] = ($(window).width() * (parseInt(nfDialog['min-width'], 10) / 100)) + 'px';
+ if (nfDialogData['min-width'].indexOf("%") > 0) {
+ nfDialogData['min-width'] = ($(window).width() * (parseInt(nfDialogData['min-width'], 10) / 100)) + 'px';
}
- if (!isDefinedAndNotNull(nfDialog.height)) {
- nfDialog.height = dialog.css('height');
+ if (!isDefinedAndNotNull(nfDialogData.height)) {
+ nfDialogData.height = dialog.css('height');
}
- if (!isDefinedAndNotNull(nfDialog['min-height'])) {
+ if (!isDefinedAndNotNull(nfDialogData['min-height'])) {
if (parseInt(dialog.css('min-height'), 10) > 0) {
- nfDialog['min-height'] = dialog.css('min-height');
+ nfDialogData['min-height'] = dialog.css('min-height');
} else {
- nfDialog['min-height'] = nfDialog.height;
+ nfDialogData['min-height'] = nfDialogData.height;
}
}
//min-height should always be set in terms of px
- if (nfDialog['min-height'].indexOf("%") > 0) {
- nfDialog['min-height'] = ($(window).height() * (parseInt(nfDialog['min-height'], 10) / 100)) + 'px';
+ if (nfDialogData['min-height'].indexOf("%") > 0) {
+ nfDialogData['min-height'] = ($(window).height() * (parseInt(nfDialogData['min-height'], 10) / 100)) + 'px';
}
//resize dialog
if ($(window).height() < fullscreenHeight) {
- if (nfDialog.responsive.y) {
+ if (nfDialogData.responsive.y) {
dialog.css('height', '100%');
dialog.css('min-height', '100%');
}
} else {
//set the dialog min-height
- dialog.css('min-height', nfDialog['min-height']);
- if (nfDialog.responsive.y) {
- //make sure nfDialog.height is in terms of %
- if (nfDialog.height.indexOf("px") > 0) {
- nfDialog.height = (parseInt(nfDialog.height, 10) / $(window).height() * 100) + '%';
+ dialog.css('min-height', nfDialogData['min-height']);
+ if (nfDialogData.responsive.y) {
+ //make sure nfDialogData.height is in terms of %
+ if (nfDialogData.height.indexOf("px") > 0) {
+ nfDialogData.height = (parseInt(nfDialogData.height, 10) / $(window).height() * 100) + '%';
}
- dialog.css('height', nfDialog.height);
+ dialog.css('height', nfDialogData.height);
}
}
if ($(window).width() < fullscreenWidth) {
- if (nfDialog.responsive.x) {
+ if (nfDialogData.responsive.x) {
dialog.css('width', '100%');
dialog.css('min-width', '100%');
}
} else {
//set the dialog width
- dialog.css('min-width', nfDialog['min-width']);
- if (nfDialog.responsive.x) {
- //make sure nfDialog.width is in terms of %
- if (nfDialog.width.indexOf("px") > 0) {
- nfDialog.width = (parseInt(nfDialog.width, 10) / $(window).width() * 100) + '%';
+ dialog.css('min-width', nfDialogData['min-width']);
+ if (nfDialogData.responsive.x) {
+ //make sure nfDialogData.width is in terms of %
+ if (nfDialogData.width.indexOf("px") > 0) {
+ nfDialogData.width = (parseInt(nfDialogData.width, 10) / $(window).width() * 100) + '%';
}
- dialog.css('width', nfDialog.width);
+ dialog.css('width', nfDialogData.width);
}
}
dialog.center();
//persist data attribute
- dialog.data('nfDialog', nfDialog);
+ dialog.data('nfDialog', nfDialogData);
}
//apply scrollable style if applicable
if (dialogContent[0].offsetHeight < dialogContent[0].scrollHeight) {
// your element has overflow
- if (isDefinedAndNotNull(nfDialog.scrollableContentStyle)) {
- dialogContent.addClass(nfDialog.scrollableContentStyle);
+ if (isDefinedAndNotNull(nfDialogData.scrollableContentStyle)) {
+ dialogContent.addClass(nfDialogData.scrollableContentStyle);
}
} else {
// your element doesn't have overflow
- if (isDefinedAndNotNull(nfDialog.scrollableContentStyle)) {
- dialogContent.removeClass(nfDialog.scrollableContentStyle);
+ if (isDefinedAndNotNull(nfDialogData.scrollableContentStyle)) {
+ dialogContent.removeClass(nfDialogData.scrollableContentStyle);
}
}
- if (isDefinedAndNotNull(nfDialog.handler)) {
- var handler = nfDialog.handler.resize;
+ if (isDefinedAndNotNull(nfDialogData.handler)) {
+ var handler = nfDialogData.handler.resize;
if (isDefinedAndNotNull(handler) && typeof handler === 'function') {
// invoke the handler
handler.call(dialog);
@@ -492,20 +492,20 @@
}
dialog.css('z-index', zIndex);
- var nfDialog = {};
+ var nfDialogData = {};
if (isDefinedAndNotNull(dialog.data('nf-dialog'))) {
- nfDialog = dialog.data('nf-dialog');
+ nfDialogData = dialog.data('nf-dialog');
}
var glasspane;
- if (isDefinedAndNotNull(nfDialog.glasspane)) {
- glasspane = nfDialog.glasspane;
+ if (isDefinedAndNotNull(nfDialogData.glasspane)) {
+ glasspane = nfDialogData.glasspane;
} else {
- nfDialog.glasspane = glasspane = dialog.find('.dialog-header').css('background-color'); //default to header color
+ nfDialogData.glasspane = glasspane = dialog.find('.dialog-header').css('background-color'); //default to header color
}
- if(top !== window || !isDefinedAndNotNull(nfDialog.glasspane)) {
- nfDialog.glasspane = glasspane = 'transparent';
+ if(top !== window || !isDefinedAndNotNull(nfDialogData.glasspane)) {
+ nfDialogData.glasspane = glasspane = 'transparent';
}
if (!$('body').find("[data-nf-dialog-parent='" + dialog.attr('id') + "']").is(':visible')) {
@@ -517,7 +517,7 @@
}
//persist data attribute
- dialog.data('nfDialog', nfDialog);
+ dialog.data('nfDialog', nfDialogData);
return this.each(function () {
// show the dialog
@@ -526,8 +526,8 @@
dialog.modal('resize');
dialog.center();
- if (isDefinedAndNotNull(nfDialog.handler)) {
- var handler = nfDialog.handler.open;
+ if (isDefinedAndNotNull(nfDialogData.handler)) {
+ var handler = nfDialogData.handler.open;
if (isDefinedAndNotNull(handler) && typeof handler === 'function') {
// invoke the handler
handler.call(dialog);
@@ -544,13 +544,13 @@
return this.each(function () {
var dialog = $(this);
- var nfDialog = {};
+ var nfDialogData = {};
if (isDefinedAndNotNull(dialog.data('nf-dialog'))) {
- nfDialog = dialog.data('nf-dialog');
+ nfDialogData = dialog.data('nf-dialog');
}
- if (isDefinedAndNotNull(nfDialog.handler)) {
- var handler = nfDialog.handler.close;
+ if (isDefinedAndNotNull(nfDialogData.handler)) {
+ var handler = nfDialogData.handler.close;
if (isDefinedAndNotNull(handler) && typeof handler === 'function') {
// invoke the handler
handler.call(dialog);
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/nfeditor/jquery.nfeditor.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/nfeditor/jquery.nfeditor.js
index ba673a4751..8a00257cb9 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/nfeditor/jquery.nfeditor.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/nfeditor/jquery.nfeditor.js
@@ -22,8 +22,8 @@
define(['jquery',
'CodeMirror',
'nf'],
- function ($, common) {
- factory($, common);
+ function ($, CodeMirror, nf) {
+ factory($, CodeMirror, nf);
});
} else if (typeof exports === 'object' && typeof module === 'object') {
factory(require('jquery'),
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
index dacd8a0b62..5e298ae081 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
@@ -32,22 +32,22 @@
'nf.Settings'],
function ($,
Slick,
- common,
- universalCapture,
- dialog,
- client,
- errorHandler,
- processGroupConfiguration,
- settings) {
+ nfCommon,
+ nfUniversalCapture,
+ nfDialog,
+ nfClient,
+ nfErrorHandler,
+ nfProcessGroupConfiguration,
+ nfSettings) {
factory($,
Slick,
- common,
- universalCapture,
- dialog,
- client,
- errorHandler,
- processGroupConfiguration,
- settings);
+ nfCommon,
+ nfUniversalCapture,
+ nfDialog,
+ nfClient,
+ nfErrorHandler,
+ nfProcessGroupConfiguration,
+ nfSettings);
});
} else if (typeof exports === 'object' && typeof module === 'object') {
factory(require('jquery'),
@@ -72,13 +72,13 @@
}
}(this, function ($,
Slick,
- common,
- universalCapture,
- dialog,
- client,
- errorHandler,
- processGroupConfiguration,
- settings) {
+ nfCommon,
+ nfUniversalCapture,
+ nfDialog,
+ nfClient,
+ nfErrorHandler,
+ nfProcessGroupConfiguration,
+ nfSettings) {
var languageId = 'nfel';
var editorClass = languageId + '-editor';
@@ -124,7 +124,8 @@
'width': args.position.width + 'px',
'min-width': '212px',
'margin-bottom': '5px',
- 'margin-top': '10px'
+ 'margin-top': '10px',
+ 'white-space': 'pre'
}).tab().on('keydown', scope.handleKeyDown).appendTo(wrapper);
wrapper.draggable({
@@ -219,12 +220,12 @@
this.loadValue = function (item) {
// determine if this is a sensitive property
var isEmptyChecked = false;
- var sensitive = common.isSensitiveProperty(propertyDescriptor);
+ var sensitive = nfCommon.isSensitiveProperty(propertyDescriptor);
// determine the value to use when populating the text field
- if (common.isDefinedAndNotNull(item[args.column.field])) {
+ if (nfCommon.isDefinedAndNotNull(item[args.column.field])) {
if (sensitive) {
- initialValue = common.config.sensitiveText;
+ initialValue = nfCommon.config.sensitiveText;
} else {
initialValue = item[args.column.field];
isEmptyChecked = initialValue === '';
@@ -241,7 +242,7 @@
var sensitiveInput = $(this);
if (sensitiveInput.hasClass('sensitive')) {
sensitiveInput.removeClass('sensitive');
- if (sensitiveInput.val() === common.config.sensitiveText) {
+ if (sensitiveInput.val() === nfCommon.config.sensitiveText) {
sensitiveInput.val('');
}
}
@@ -260,8 +261,8 @@
return '';
} else {
// otherwise if the property is required
- if (common.isRequiredProperty(propertyDescriptor)) {
- if (common.isBlank(propertyDescriptor.defaultValue)) {
+ if (nfCommon.isRequiredProperty(propertyDescriptor)) {
+ if (nfCommon.isBlank(propertyDescriptor.defaultValue)) {
return previousValue;
} else {
return propertyDescriptor.defaultValue;
@@ -322,7 +323,7 @@
propertyDescriptor = descriptors[args.item.property];
// determine if this is a sensitive property
- var sensitive = common.isSensitiveProperty(propertyDescriptor);
+ var sensitive = nfCommon.isSensitiveProperty(propertyDescriptor);
// record the previous value
previousValue = args.item[args.column.field];
@@ -439,12 +440,12 @@
this.loadValue = function (item) {
// determine if this is a sensitive property
var isEmptyChecked = false;
- var sensitive = common.isSensitiveProperty(propertyDescriptor);
+ var sensitive = nfCommon.isSensitiveProperty(propertyDescriptor);
// determine the value to use when populating the text field
- if (common.isDefinedAndNotNull(item[args.column.field])) {
+ if (nfCommon.isDefinedAndNotNull(item[args.column.field])) {
if (sensitive) {
- initialValue = common.config.sensitiveText;
+ initialValue = nfCommon.config.sensitiveText;
} else {
initialValue = item[args.column.field];
isEmptyChecked = initialValue === '';
@@ -468,8 +469,8 @@
return '';
} else {
// otherwise if the property is required
- if (common.isRequiredProperty(propertyDescriptor)) {
- if (common.isBlank(propertyDescriptor.defaultValue)) {
+ if (nfCommon.isRequiredProperty(propertyDescriptor)) {
+ if (nfCommon.isBlank(propertyDescriptor.defaultValue)) {
return previousValue;
} else {
return propertyDescriptor.defaultValue;
@@ -553,7 +554,7 @@
}).appendTo(container);
// check for allowable values which will drive which editor to use
- var allowableValues = common.getAllowableValues(propertyDescriptor);
+ var allowableValues = nfCommon.getAllowableValues(propertyDescriptor);
// show the output port options
var options = [];
@@ -571,7 +572,7 @@
text: allowableValue.displayName,
value: allowableValue.value,
disabled: allowableValueEntity.canRead === false && allowableValue.value !== args.item['previousValue'],
- description: common.escapeHtml(allowableValue.description)
+ description: nfCommon.escapeHtml(allowableValue.description)
});
});
}
@@ -587,7 +588,7 @@
}
// if this descriptor identifies a controller service, provide a way to create one
- if (common.isDefinedAndNotNull(propertyDescriptor.identifiesControllerService)) {
+ if (nfCommon.isDefinedAndNotNull(propertyDescriptor.identifiesControllerService)) {
options.push({
text: 'Create new service...',
value: undefined,
@@ -685,13 +686,13 @@
this.loadValue = function (item) {
// select as appropriate
- if (!common.isUndefined(item.value)) {
+ if (!nfCommon.isUndefined(item.value)) {
initialValue = item.value;
combo.combo('setSelectedOption', {
value: item.value
});
- } else if (common.isDefinedAndNotNull(propertyDescriptor.defaultValue)) {
+ } else if (nfCommon.isDefinedAndNotNull(propertyDescriptor.defaultValue)) {
initialValue = propertyDescriptor.defaultValue;
combo.combo('setSelectedOption', {
@@ -735,20 +736,20 @@
*/
var showPropertyValue = function (propertyGrid, descriptors, row, cell) {
// remove any currently open detail dialogs
- universalCapture.removeAllPropertyDetailDialogs();
+ nfUniversalCapture.removeAllPropertyDetailDialogs();
// get the property in question
var propertyData = propertyGrid.getData();
var property = propertyData.getItem(row);
// ensure there is a value
- if (common.isDefinedAndNotNull(property.value)) {
+ if (nfCommon.isDefinedAndNotNull(property.value)) {
// get the descriptor to insert the description tooltip
var propertyDescriptor = descriptors[property.property];
// ensure we're not dealing with a sensitive property
- if (!common.isSensitiveProperty(propertyDescriptor)) {
+ if (!nfCommon.isSensitiveProperty(propertyDescriptor)) {
// get details about the location of the cell
var cellNode = $(propertyGrid.getCellNode(row, cell));
@@ -769,7 +770,7 @@
'left': offset.left - 20
}).appendTo('body');
- var allowableValues = common.getAllowableValues(propertyDescriptor);
+ var allowableValues = nfCommon.getAllowableValues(propertyDescriptor);
if ($.isArray(allowableValues)) {
// prevent dragging over the combo
wrapper.draggable({
@@ -784,7 +785,7 @@
options.push({
text: allowableValue.displayName,
value: allowableValue.value,
- description: common.escapeHtml(allowableValue.description),
+ description: nfCommon.escapeHtml(allowableValue.description),
disabled: true
});
});
@@ -833,7 +834,7 @@
var editor = null;
// so the nfel editor is appropriate
- if (common.supportsEl(propertyDescriptor)) {
+ if (nfCommon.supportsEl(propertyDescriptor)) {
var languageId = 'nfel';
var editorClass = languageId + '-editor';
@@ -957,15 +958,15 @@
var options = [];
$.each(response.controllerServiceTypes, function (i, controllerServiceType) {
options.push({
- text: common.substringAfterLast(controllerServiceType.type, '.'),
+ text: nfCommon.substringAfterLast(controllerServiceType.type, '.'),
value: controllerServiceType.type,
- description: common.escapeHtml(controllerServiceType.description)
+ description: nfCommon.escapeHtml(controllerServiceType.description)
});
});
// ensure there are some applicable controller services
if (options.length === 0) {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Controller Service',
dialogContent: 'No controller service types found that are applicable for this property.'
});
@@ -1053,7 +1054,7 @@
// build the controller service entity
var controllerServiceEntity = {
- 'revision': client.getRevision({
+ 'revision': nfClient.getRevision({
'revision': {
'version': 0,
}
@@ -1065,7 +1066,7 @@
// determine the appropriate uri for creating the controller service
var uri = '../nifi-api/controller/controller-services';
- if (common.isDefinedAndNotNull(groupId)) {
+ if (nfCommon.isDefinedAndNotNull(groupId)) {
uri = '../nifi-api/process-groups/' + encodeURIComponent(groupId) + '/controller-services';
}
@@ -1083,7 +1084,7 @@
// store the descriptor for use later
var descriptors = gridContainer.data('descriptors');
- if (!common.isUndefined(descriptors)) {
+ if (!nfCommon.isUndefined(descriptors)) {
descriptors[descriptor.name] = descriptor;
}
@@ -1101,7 +1102,7 @@
if (typeof configurationOptions.controllerServiceCreatedDeferred === 'function') {
configurationOptions.controllerServiceCreatedDeferred(response);
}
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
};
var cancel = function () {
@@ -1110,7 +1111,7 @@
newControllerServiceDialog.modal('show');
}
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
};
var initPropertiesTable = function (table, options) {
@@ -1130,8 +1131,8 @@
var propertyDescriptor = descriptors[dataContext.property];
// show the property description if applicable
- if (common.isDefinedAndNotNull(propertyDescriptor)) {
- if (!common.isBlank(propertyDescriptor.description) || !common.isBlank(propertyDescriptor.defaultValue) || !common.isBlank(propertyDescriptor.supportsEl)) {
+ if (nfCommon.isDefinedAndNotNull(propertyDescriptor)) {
+ if (!nfCommon.isBlank(propertyDescriptor.description) || !nfCommon.isBlank(propertyDescriptor.defaultValue) || !nfCommon.isBlank(propertyDescriptor.supportsEl)) {
$('' +
@@ -1673,7 +1674,7 @@
// store the descriptor for use later
var descriptors = table.data('descriptors');
- if (!common.isUndefined(descriptors)) {
+ if (!nfCommon.isUndefined(descriptors)) {
descriptors[descriptor.name] = descriptor;
}
@@ -1708,7 +1709,7 @@
propertyGrid.setActiveCell(row, propertyGrid.getColumnIndex('value'));
propertyGrid.editActiveCell();
} else {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Property Exists',
dialogContent: 'A property with this name already exists.'
});
@@ -1720,7 +1721,7 @@
}
}
} else {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Property Name',
dialogContent: 'Property name must be specified.'
});
@@ -1803,7 +1804,7 @@
return this.each(function () {
var table = $(this).find('div.property-table');
var propertyGrid = table.data('gridInstance');
- if (common.isDefinedAndNotNull(propertyGrid)) {
+ if (nfCommon.isDefinedAndNotNull(propertyGrid)) {
propertyGrid.resizeCanvas();
}
});
@@ -1816,7 +1817,7 @@
return this.each(function () {
var table = $(this).find('div.property-table');
var propertyGrid = table.data('gridInstance');
- if (common.isDefinedAndNotNull(propertyGrid)) {
+ if (nfCommon.isDefinedAndNotNull(propertyGrid)) {
var editController = propertyGrid.getEditController();
editController.cancelCurrentEdit();
}
@@ -1831,12 +1832,12 @@
var propertyTableContainer = $(this);
var options = propertyTableContainer.data('options');
- if (common.isDefinedAndNotNull(options)) {
+ if (nfCommon.isDefinedAndNotNull(options)) {
// clear the property table container
clear(propertyTableContainer);
// clear any existing new property dialogs
- if (common.isDefinedAndNotNull(options.dialogContainer)) {
+ if (nfCommon.isDefinedAndNotNull(options.dialogContainer)) {
$('#new-property-dialog').modal("hide");
$(options.dialogContainer).children('div.new-inline-controller-service-dialog').remove();
}
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/bulletin-board/nf-bulletin-board.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/bulletin-board/nf-bulletin-board.js
index b563a51db8..ea9f40d14a 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/bulletin-board/nf-bulletin-board.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/bulletin-board/nf-bulletin-board.js
@@ -30,23 +30,23 @@
'nf.Storage'],
function ($,
angular,
- common,
+ nfCommon,
appConfig,
appCtrl,
serviceProvider,
- angularBridge,
- errorHandler,
- storage) {
+ nfNgBridge,
+ nfErrorHandler,
+ nfStorage) {
return (nf.ng.BulletinBoardCtrl =
factory($,
angular,
- common,
+ nfCommon,
appConfig,
appCtrl,
serviceProvider,
- angularBridge,
- errorHandler,
- storage));
+ nfNgBridge,
+ nfErrorHandler,
+ nfStorage));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ng.BulletinBoardCtrl =
@@ -70,7 +70,7 @@
root.nf.ErrorHandler,
root.nf.Storage);
}
-}(this, function ($, angular, common, appConfig, appCtrl, serviceProvider, angularBridge, errorHandler, storage) {
+}(this, function ($, angular, nfCommon, appConfig, appCtrl, serviceProvider, nfNgBridge, nfErrorHandler, nfStorage) {
'use strict';
$(document).ready(function () {
@@ -95,10 +95,10 @@
app.service('bulletinBoardCtrl', nfBulletinBoard);
//Manually Boostrap Angular App
- angularBridge.injector = angular.bootstrap($('body'), ['ngBulletinBoardApp'], {strictDi: true});
+ nfNgBridge.injector = angular.bootstrap($('body'), ['ngBulletinBoardApp'], {strictDi: true});
// initialize the bulletin board
- angularBridge.injector.get('bulletinBoardCtrl').init();
+ nfNgBridge.injector.get('bulletinBoardCtrl').init();
});
var nfBulletinBoard = function (serviceProvider) {
@@ -158,7 +158,7 @@
// set the document title and the about title
document.title = bulletinBoardTitle;
$('#bulletin-board-header-text').text(bulletinBoardTitle);
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
// get the banners if we're not in the shell
var loadBanners = $.Deferred(function (deferred) {
@@ -169,8 +169,8 @@
dataType: 'json'
}).done(function (response) {
// ensure the banners response is specified
- if (common.isDefinedAndNotNull(response.banners)) {
- if (common.isDefinedAndNotNull(response.banners.headerText) && response.banners.headerText !== '') {
+ if (nfCommon.isDefinedAndNotNull(response.banners)) {
+ if (nfCommon.isDefinedAndNotNull(response.banners.headerText) && response.banners.headerText !== '') {
// update the header text
var bannerHeader = $('#banner-header').text(response.banners.headerText).show();
@@ -184,7 +184,7 @@
updateTop('bulletin-board');
}
- if (common.isDefinedAndNotNull(response.banners.footerText) && response.banners.footerText !== '') {
+ if (nfCommon.isDefinedAndNotNull(response.banners.footerText) && response.banners.footerText !== '') {
// update the footer text and show it
var bannerFooter = $('#banner-footer').text(response.banners.footerText).show();
@@ -200,7 +200,7 @@
deferred.resolve();
}).fail(function (xhr, status, error) {
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
deferred.reject();
});
} else {
@@ -286,7 +286,7 @@
// only attempt this if we're within a frame
if (top !== window) {
// and our parent has canvas utils and shell defined
- if (common.isDefinedAndNotNull(parent.nf) && common.isDefinedAndNotNull(parent.nf.CanvasUtils) && common.isDefinedAndNotNull(parent.nf.Shell)) {
+ if (nfCommon.isDefinedAndNotNull(parent.nf) && nfCommon.isDefinedAndNotNull(parent.nf.CanvasUtils) && nfCommon.isDefinedAndNotNull(parent.nf.Shell)) {
parent.nf.CanvasUtils.showComponent(groupId, sourceId);
parent.$('#shell-close-button').click();
}
@@ -333,7 +333,7 @@
});
}
- storage.init();
+ nfStorage.init();
initializePage().done(function () {
start();
@@ -347,7 +347,7 @@
var data = {};
// include the timestamp if appropriate
- if (common.isDefinedAndNotNull(lastBulletin)) {
+ if (nfCommon.isDefinedAndNotNull(lastBulletin)) {
data['after'] = lastBulletin;
} else {
data['limit'] = 10;
@@ -382,7 +382,7 @@
dataType: 'json'
}).done(function (response) {
// ensure the bulletin board was specified
- if (common.isDefinedAndNotNull(response.bulletinBoard)) {
+ if (nfCommon.isDefinedAndNotNull(response.bulletinBoard)) {
var bulletinBoard = response.bulletinBoard;
// update the stats last refreshed timestamp
@@ -407,13 +407,13 @@
// format the source id
var source;
- if (common.isDefinedAndNotNull(bulletin.sourceId) && common.isDefinedAndNotNull(bulletin.groupId) && top !== window) {
+ if (nfCommon.isDefinedAndNotNull(bulletin.sourceId) && nfCommon.isDefinedAndNotNull(bulletin.groupId) && top !== window) {
source = $('
').text(bulletin.sourceId).on('click', function () {
goToSource(bulletin.groupId, bulletin.sourceId);
});
} else {
var sourceId = bulletin.sourceId;
- if (common.isUndefined(sourceId) || common.isNull(sourceId)) {
+ if (nfCommon.isUndefined(sourceId) || nfCommon.isNull(sourceId)) {
sourceId = '';
}
source = $('
').text(sourceId);
@@ -430,7 +430,7 @@
$('
').appendTo(bulletinInfoMarkup);
// format the node address if applicable
- if (common.isDefinedAndNotNull(bulletin.nodeAddress)) {
+ if (nfCommon.isDefinedAndNotNull(bulletin.nodeAddress)) {
$('
').text(bulletin.nodeAddress).appendTo(bulletinMarkup);
}
@@ -467,7 +467,7 @@
// stop future polling
bulletinBoardCtrl.togglePolling();
} else {
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
}
});
},
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-breadcrumbs-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-breadcrumbs-controller.js
index c1771756e1..72cd57ba0f 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-breadcrumbs-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-breadcrumbs-controller.js
@@ -21,8 +21,8 @@
if (typeof define === 'function' && define.amd) {
define(['jquery',
'nf.Common'],
- function ($, common) {
- return (nf.ng.BreadcrumbsCtrl = factory($, common));
+ function ($, nfCommon) {
+ return (nf.ng.BreadcrumbsCtrl = factory($, nfCommon));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ng.BreadcrumbsCtrl =
@@ -32,7 +32,7 @@
nf.ng.BreadcrumbsCtrl = factory(root.$,
root.nf.Common);
}
-}(this, function ($, common) {
+}(this, function ($, nfCommon) {
'use strict';
return function (serviceProvider) {
@@ -69,7 +69,7 @@
'label': label
}, breadcrumbEntity));
- if (common.isDefinedAndNotNull(breadcrumbEntity.parentBreadcrumb)) {
+ if (nfCommon.isDefinedAndNotNull(breadcrumbEntity.parentBreadcrumb)) {
this.generateBreadcrumbs(breadcrumbEntity.parentBreadcrumb);
}
},
@@ -132,7 +132,7 @@
// still having issues with this in IE :/
element.on('DOMMouseScroll mousewheel', function (evt, d) {
- if (common.isUndefinedOrNull(evt.originalEvent)) {
+ if (nfCommon.isUndefinedOrNull(evt.originalEvent)) {
return;
}
@@ -155,9 +155,9 @@
//Chrome and Safari both have evt.originalEvent.detail defined but
//evt.originalEvent.wheelDelta holds the correct value so we must
//check for evt.originalEvent.wheelDelta first!
- if (common.isDefinedAndNotNull(evt.originalEvent.wheelDelta)) {
+ if (nfCommon.isDefinedAndNotNull(evt.originalEvent.wheelDelta)) {
delta = evt.originalEvent.wheelDelta;
- } else if (common.isDefinedAndNotNull(evt.originalEvent.detail)) {
+ } else if (nfCommon.isDefinedAndNotNull(evt.originalEvent.detail)) {
delta = -evt.originalEvent.detail;
}
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-flow-status-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-flow-status-controller.js
index 8e2b520a80..16f40f19d8 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-flow-status-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-flow-status-controller.js
@@ -27,8 +27,8 @@
'nf.ClusterSummary',
'nf.ErrorHandler',
'nf.Settings'],
- function ($, common, dialog, canvasUtils, contextMenu, clusterSummary, errorHandler, settings) {
- return (nf.ng.Canvas.FlowStatusCtrl = factory($, common, dialog, canvasUtils, contextMenu, clusterSummary, errorHandler, settings));
+ function ($, nfCommon, nfDialog, nfCanvasUtils, nfContextMenu, nfClusterSummary, nfErrorHandler, nfSettings) {
+ return (nf.ng.Canvas.FlowStatusCtrl = factory($, nfCommon, nfDialog, nfCanvasUtils, nfContextMenu, nfClusterSummary, nfErrorHandler, nfSettings));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ng.Canvas.FlowStatusCtrl =
@@ -50,7 +50,7 @@
root.nf.ErrorHandler,
root.nf.Settings);
}
-}(this, function ($, common, dialog, canvasUtils, contextMenu, clusterSummary, errorHandler, settings) {
+}(this, function ($, nfCommon, nfDialog, nfCanvasUtils, nfContextMenu, nfClusterSummary, nfErrorHandler, nfSettings) {
'use strict';
return function (serviceProvider) {
@@ -134,7 +134,7 @@
var searchResults = items[0];
// show all processors
- if (!common.isEmpty(searchResults.processorResults)) {
+ if (!nfCommon.isEmpty(searchResults.processorResults)) {
ul.append('');
$.each(searchResults.processorResults, function (i, processorMatch) {
nfSearchAutocomplete._renderItem(ul, processorMatch);
@@ -142,7 +142,7 @@
}
// show all process groups
- if (!common.isEmpty(searchResults.processGroupResults)) {
+ if (!nfCommon.isEmpty(searchResults.processGroupResults)) {
ul.append('');
$.each(searchResults.processGroupResults, function (i, processGroupMatch) {
nfSearchAutocomplete._renderItem(ul, processGroupMatch);
@@ -150,7 +150,7 @@
}
// show all remote process groups
- if (!common.isEmpty(searchResults.remoteProcessGroupResults)) {
+ if (!nfCommon.isEmpty(searchResults.remoteProcessGroupResults)) {
ul.append('');
$.each(searchResults.remoteProcessGroupResults, function (i, remoteProcessGroupMatch) {
nfSearchAutocomplete._renderItem(ul, remoteProcessGroupMatch);
@@ -158,7 +158,7 @@
}
// show all connections
- if (!common.isEmpty(searchResults.connectionResults)) {
+ if (!nfCommon.isEmpty(searchResults.connectionResults)) {
ul.append('');
$.each(searchResults.connectionResults, function (i, connectionMatch) {
nfSearchAutocomplete._renderItem(ul, connectionMatch);
@@ -166,7 +166,7 @@
}
// show all input ports
- if (!common.isEmpty(searchResults.inputPortResults)) {
+ if (!nfCommon.isEmpty(searchResults.inputPortResults)) {
ul.append('');
$.each(searchResults.inputPortResults, function (i, inputPortMatch) {
nfSearchAutocomplete._renderItem(ul, inputPortMatch);
@@ -174,7 +174,7 @@
}
// show all output ports
- if (!common.isEmpty(searchResults.outputPortResults)) {
+ if (!nfCommon.isEmpty(searchResults.outputPortResults)) {
ul.append('');
$.each(searchResults.outputPortResults, function (i, outputPortMatch) {
nfSearchAutocomplete._renderItem(ul, outputPortMatch);
@@ -182,7 +182,7 @@
}
// show all funnels
- if (!common.isEmpty(searchResults.funnelResults)) {
+ if (!nfCommon.isEmpty(searchResults.funnelResults)) {
ul.append('');
$.each(searchResults.funnelResults, function (i, funnelMatch) {
nfSearchAutocomplete._renderItem(ul, funnelMatch);
@@ -228,7 +228,7 @@
var item = ui.item;
// show the selected component
- canvasUtils.showComponent(item.groupId, item.id);
+ nfCanvasUtils.showComponent(item.groupId, item.id);
searchCtrl.getInputElement().val('').blur();
@@ -262,7 +262,7 @@
var searchCtrl = this;
// hide the context menu if necessary
- contextMenu.hide();
+ nfContextMenu.hide();
var isVisible = searchCtrl.getInputElement().is(':visible');
var display = 'none';
@@ -306,11 +306,11 @@
var currentBulletins = bulletinIcon.data('bulletins');
// update the bulletins if necessary
- if (common.doBulletinsDiffer(currentBulletins, response.bulletins)) {
+ if (nfCommon.doBulletinsDiffer(currentBulletins, response.bulletins)) {
bulletinIcon.data('bulletins', response.bulletins);
// get the formatted the bulletins
- var bulletins = common.getFormattedBulletins(response.bulletins);
+ var bulletins = nfCommon.getFormattedBulletins(response.bulletins);
// bulletins for this processor are now gone
if (bulletins.length === 0) {
@@ -318,7 +318,7 @@
bulletinIcon.removeClass('has-bulletins').qtip('api').destroy(true);
}
} else {
- var newBulletins = common.formatUnorderedList(bulletins);
+ var newBulletins = nfCommon.formatUnorderedList(bulletins);
// different bulletins, refresh
if (bulletinIcon.data('qtip')) {
@@ -326,7 +326,7 @@
} else {
// no bulletins before, show icon and tips
bulletinIcon.addClass('has-bulletins').qtip($.extend({},
- canvasUtils.config.systemTooltipConfig,
+ nfCanvasUtils.config.systemTooltipConfig,
{
content: newBulletins,
position: {
@@ -343,7 +343,7 @@
}
// update controller service and reporting task bulletins
- settings.setBulletins(response.controllerServiceBulletins, response.reportingTaskBulletins);
+ nfSettings.setBulletins(response.controllerServiceBulletins, response.reportingTaskBulletins);
}
}
@@ -371,10 +371,10 @@
dataType: 'json'
}).done(function (response) {
// report the updated status
- if (common.isDefinedAndNotNull(response.controllerStatus)) {
+ if (nfCommon.isDefinedAndNotNull(response.controllerStatus)) {
flowStatusCtrl.update(response.controllerStatus);
}
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
},
/**
@@ -384,11 +384,11 @@
*/
updateClusterSummary: function (summary) {
// see if this node has been (dis)connected
- if (clusterSummary.isConnectedToCluster() !== summary.connectedToCluster) {
+ if (nfClusterSummary.isConnectedToCluster() !== summary.connectedToCluster) {
if (summary.connectedToCluster) {
- dialog.showConnectedToClusterMessage();
+ nfDialog.showConnectedToClusterMessage();
} else {
- dialog.showDisconnectedFromClusterMessage();
+ nfDialog.showDisconnectedFromClusterMessage();
}
}
@@ -396,7 +396,7 @@
// update the connection state
if (summary.connectedToCluster) {
- if (common.isDefinedAndNotNull(summary.connectedNodes)) {
+ if (nfCommon.isDefinedAndNotNull(summary.connectedNodes)) {
var connectedNodes = summary.connectedNodes.split(' / ');
if (connectedNodes.length === 2 && connectedNodes[0] !== connectedNodes[1]) {
this.clusterConnectionWarning = true;
@@ -404,7 +404,7 @@
}
}
this.connectedNodesCount =
- common.isDefinedAndNotNull(summary.connectedNodes) ? summary.connectedNodes : '-';
+ nfCommon.isDefinedAndNotNull(summary.connectedNodes) ? summary.connectedNodes : '-';
} else {
this.connectedNodesCount = 'Disconnected';
color = '#BA554A';
@@ -420,7 +420,7 @@
* @param status The controller status returned from the `../nifi-api/flow/status` endpoint.
*/
update: function (status) {
- var controllerInvalidCount = (common.isDefinedAndNotNull(status.invalidCount)) ? status.invalidCount : 0;
+ var controllerInvalidCount = (nfCommon.isDefinedAndNotNull(status.invalidCount)) ? status.invalidCount : 0;
if (this.controllerInvalidCount > 0) {
$('#controller-invalid-count').parent().removeClass('zero').addClass('invalid');
@@ -447,7 +447,7 @@
// update the component counts
this.controllerTransmittingCount =
- common.isDefinedAndNotNull(status.activeRemotePortCount) ?
+ nfCommon.isDefinedAndNotNull(status.activeRemotePortCount) ?
status.activeRemotePortCount : '-';
if (this.controllerTransmittingCount > 0) {
@@ -457,7 +457,7 @@
}
this.controllerNotTransmittingCount =
- common.isDefinedAndNotNull(status.inactiveRemotePortCount) ?
+ nfCommon.isDefinedAndNotNull(status.inactiveRemotePortCount) ?
status.inactiveRemotePortCount : '-';
if (this.controllerNotTransmittingCount > 0) {
@@ -467,7 +467,7 @@
}
this.controllerRunningCount =
- common.isDefinedAndNotNull(status.runningCount) ? status.runningCount : '-';
+ nfCommon.isDefinedAndNotNull(status.runningCount) ? status.runningCount : '-';
if (this.controllerRunningCount > 0) {
$('#flow-status-container').find('.fa-play').removeClass('zero').addClass('running');
@@ -476,7 +476,7 @@
}
this.controllerStoppedCount =
- common.isDefinedAndNotNull(status.stoppedCount) ? status.stoppedCount : '-';
+ nfCommon.isDefinedAndNotNull(status.stoppedCount) ? status.stoppedCount : '-';
if (this.controllerStoppedCount > 0) {
$('#flow-status-container').find('.fa-stop').removeClass('zero').addClass('stopped');
@@ -485,7 +485,7 @@
}
this.controllerInvalidCount =
- common.isDefinedAndNotNull(status.invalidCount) ? status.invalidCount : '-';
+ nfCommon.isDefinedAndNotNull(status.invalidCount) ? status.invalidCount : '-';
if (this.controllerInvalidCount > 0) {
$('#flow-status-container').find('.fa-warning').removeClass('zero').addClass('invalid');
@@ -494,7 +494,7 @@
}
this.controllerDisabledCount =
- common.isDefinedAndNotNull(status.disabledCount) ? status.disabledCount : '-';
+ nfCommon.isDefinedAndNotNull(status.disabledCount) ? status.disabledCount : '-';
if (this.controllerDisabledCount > 0) {
$('#flow-status-container').find('.icon-enable-false').removeClass('zero').addClass('disabled');
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-global-menu-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-global-menu-controller.js
index b28d5b1f4a..28d818ead6 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-global-menu-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-global-menu-controller.js
@@ -28,8 +28,8 @@
'nf.ErrorHandler',
'nf.Settings',
'nf.CanvasUtils'],
- function ($, common, queueListing, shell, policyManagement, clusterSummary, errorHandler, settings, canvasUtils) {
- return (nf.ng.Canvas.GlobalMenuCtrl = factory($, common, queueListing, shell, policyManagement, clusterSummary, errorHandler, settings, canvasUtils));
+ function ($, nfCommon, nfQueueListing, nfShell, nfPolicyManagement, nfClusterSummary, nfErrorHandler, nfSettings, nfCanvasUtils) {
+ return (nf.ng.Canvas.GlobalMenuCtrl = factory($, nfCommon, nfQueueListing, nfShell, nfPolicyManagement, nfClusterSummary, nfErrorHandler, nfSettings, nfCanvasUtils));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ng.Canvas.GlobalMenuCtrl =
@@ -53,7 +53,7 @@
root.nf.Settings,
root.nf.CanvasUtils);
}
-}(this, function ($, common, queueListing, shell, policyManagement, clusterSummary, errorHandler, settings, canvasUtils) {
+}(this, function ($, nfCommon, nfQueueListing, nfShell, nfPolicyManagement, nfClusterSummary, nfErrorHandler, nfSettings, nfCanvasUtils) {
'use strict';
return function (serviceProvider) {
@@ -82,7 +82,7 @@
* Launch the summary shell.
*/
launch: function () {
- shell.showPage('summary');
+ nfShell.showPage('summary');
}
}
};
@@ -101,8 +101,8 @@
* Launch the counters shell.
*/
launch: function () {
- if (common.canAccessCounters()) {
- shell.showPage('counters');
+ if (nfCommon.canAccessCounters()) {
+ nfShell.showPage('counters');
}
}
}
@@ -122,7 +122,7 @@
* Launch the bulletin board shell.
*/
launch: function () {
- shell.showPage('bulletin-board');
+ nfShell.showPage('bulletin-board');
}
}
};
@@ -141,8 +141,8 @@
* Launch the data provenance shell.
*/
launch: function () {
- if (common.canAccessProvenance()) {
- shell.showPage('provenance');
+ if (nfCommon.canAccessProvenance()) {
+ nfShell.showPage('provenance');
}
}
}
@@ -162,7 +162,7 @@
* Launch the settings shell.
*/
launch: function () {
- settings.showSettings();
+ nfSettings.showSettings();
}
}
};
@@ -178,7 +178,7 @@
* @returns {*|boolean}
*/
visible: function () {
- return clusterSummary.isConnectedToCluster();
+ return nfClusterSummary.isConnectedToCluster();
},
/**
@@ -190,8 +190,8 @@
* Launch the cluster shell.
*/
launch: function () {
- if (common.canAccessController()) {
- shell.showPage('cluster');
+ if (nfCommon.canAccessController()) {
+ nfShell.showPage('cluster');
}
}
}
@@ -211,7 +211,7 @@
* Launch the history shell.
*/
launch: function () {
- shell.showPage('history');
+ nfShell.showPage('history');
}
}
};
@@ -230,8 +230,8 @@
* Launch the users shell.
*/
launch: function () {
- if (common.canAccessTenants()) {
- shell.showPage('users');
+ if (nfCommon.canAccessTenants()) {
+ nfShell.showPage('users');
}
}
}
@@ -251,8 +251,8 @@
* Launch the policies shell.
*/
launch: function () {
- if (common.canModifyPolicies() && common.canAccessTenants()) {
- policyManagement.showGlobalPolicies();
+ if (nfCommon.canModifyPolicies() && nfCommon.canAccessTenants()) {
+ nfPolicyManagement.showGlobalPolicies();
}
}
}
@@ -272,8 +272,8 @@
* Launch the templates shell.
*/
launch: function () {
- shell.showPage('templates?' + $.param({
- groupId: canvasUtils.getGroupId()
+ nfShell.showPage('templates?' + $.param({
+ groupId: nfCanvasUtils.getGroupId()
}));
}
}
@@ -293,7 +293,7 @@
* Launch the help documentation shell.
*/
launch: function () {
- shell.showPage(config.urls.helpDocument);
+ nfShell.showPage(config.urls.helpDocument);
}
}
};
@@ -339,11 +339,11 @@
}
// store the content viewer url if available
- if (!common.isBlank(aboutDetails.contentViewerUrl)) {
+ if (!nfCommon.isBlank(aboutDetails.contentViewerUrl)) {
$('#nifi-content-viewer-url').text(aboutDetails.contentViewerUrl);
- queueListing.initFlowFileDetailsDialog();
+ nfQueueListing.initFlowFileDetailsDialog();
}
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
this.modal.init();
},
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-graph-controls-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-graph-controls-controller.js
index 3274a48562..2835972201 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-graph-controls-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-graph-controls-controller.js
@@ -24,10 +24,9 @@
'nf.Birdseye',
'nf.Storage',
'nf.CanvasUtils',
- 'nf.Common',
'nf.ProcessGroupConfiguration'],
- function ($, action, birdseye, storage, canvasUtils, common, processGroupConfiguration) {
- return (nf.ng.Canvas.GraphControlsCtrl = factory($, action, birdseye, storage, canvasUtils, common, processGroupConfiguration));
+ function ($, nfActions, nfBirdseye, nfStorage, nfCanvasUtils, nfProcessGroupConfiguration) {
+ return (nf.ng.Canvas.GraphControlsCtrl = factory($, nfActions, nfBirdseye, nfStorage, nfCanvasUtils, nfProcessGroupConfiguration));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ng.Canvas.GraphControlsCtrl =
@@ -36,7 +35,6 @@
require('nf.Birdseye'),
require('nf.Storage'),
require('nf.CanvasUtils'),
- require('nf.Common'),
require('nf.ProcessGroupConfiguration')));
} else {
nf.ng.Canvas.GraphControlsCtrl = factory(root.$,
@@ -44,10 +42,9 @@
root.nf.Birdseye,
root.nf.Storage,
root.nf.CanvasUtils,
- root.nf.Common,
root.nf.ProcessGroupConfiguration);
}
-}(this, function ($, actions, birdseye, storage, canvasUtils, common, processGroupConfiguration) {
+}(this, function ($, nfActions, nfBirdseye, nfStorage, nfCanvasUtils, nfProcessGroupConfiguration) {
'use strict';
return function (serviceProvider, navigateCtrl, operateCtrl) {
@@ -72,11 +69,11 @@
// handle specific actions as necessary
if (graphControl.attr('id') === 'navigation-control') {
- birdseye.updateBirdseyeVisibility(true);
+ nfBirdseye.updateBirdseyeVisibility(true);
}
// get the current visibility
- var graphControlVisibility = storage.getItem('graph-control-visibility');
+ var graphControlVisibility = nfStorage.getItem('graph-control-visibility');
if (graphControlVisibility === null) {
graphControlVisibility = {};
}
@@ -84,7 +81,7 @@
// update the visibility for this graph control
var graphControlId = graphControl.attr('id');
graphControlVisibility[graphControlId] = true;
- storage.setItem('graph-control-visibility', graphControlVisibility);
+ nfStorage.setItem('graph-control-visibility', graphControlVisibility);
};
/**
@@ -106,11 +103,11 @@
// handle specific actions as necessary
if (graphControl.attr('id') === 'navigation-control') {
- birdseye.updateBirdseyeVisibility(false);
+ nfBirdseye.updateBirdseyeVisibility(false);
}
// get the current visibility
- var graphControlVisibility = storage.getItem('graph-control-visibility');
+ var graphControlVisibility = nfStorage.getItem('graph-control-visibility');
if (graphControlVisibility === null) {
graphControlVisibility = {};
}
@@ -118,7 +115,7 @@
// update the visibility for this graph control
var graphControlId = graphControl.attr('id');
graphControlVisibility[graphControlId] = false;
- storage.setItem('graph-control-visibility', graphControlVisibility);
+ nfStorage.setItem('graph-control-visibility', graphControlVisibility);
};
function GraphControlsCtrl(navigateCtrl, operateCtrl) {
@@ -144,7 +141,7 @@
init: function () {
this.operateCtrl.init();
// initial the graph control visibility
- var graphControlVisibility = storage.getItem('graph-control-visibility');
+ var graphControlVisibility = nfStorage.getItem('graph-control-visibility');
if (graphControlVisibility !== null) {
$.each(graphControlVisibility, function (id, isVisible) {
var graphControl = $('#' + id);
@@ -187,31 +184,31 @@
* Gets the icon to show for the selection context.
*/
getContextIcon: function () {
- var selection = canvasUtils.getSelection();
+ var selection = nfCanvasUtils.getSelection();
if (selection.empty()) {
- if (canvasUtils.getParentGroupId() === null) {
+ if (nfCanvasUtils.getParentGroupId() === null) {
return 'icon-drop';
} else {
return 'icon-group';
}
} else {
if (selection.size() === 1) {
- if (canvasUtils.isProcessor(selection)) {
+ if (nfCanvasUtils.isProcessor(selection)) {
return 'icon-processor';
- } else if (canvasUtils.isProcessGroup(selection)) {
+ } else if (nfCanvasUtils.isProcessGroup(selection)) {
return 'icon-group';
- } else if (canvasUtils.isInputPort(selection)) {
+ } else if (nfCanvasUtils.isInputPort(selection)) {
return 'icon-port-in';
- } else if (canvasUtils.isOutputPort(selection)) {
+ } else if (nfCanvasUtils.isOutputPort(selection)) {
return 'icon-port-out';
- } else if (canvasUtils.isRemoteProcessGroup(selection)) {
+ } else if (nfCanvasUtils.isRemoteProcessGroup(selection)) {
return 'icon-group-remote';
- } else if (canvasUtils.isFunnel(selection)) {
+ } else if (nfCanvasUtils.isFunnel(selection)) {
return 'icon-funnel';
- } else if (canvasUtils.isLabel(selection)) {
+ } else if (nfCanvasUtils.isLabel(selection)) {
return 'icon-label';
- } else if (canvasUtils.isConnection(selection)) {
+ } else if (nfCanvasUtils.isConnection(selection)) {
return 'icon-connect';
}
} else {
@@ -224,7 +221,7 @@
* Will hide target when appropriate.
*/
hide: function () {
- var selection = canvasUtils.getSelection();
+ var selection = nfCanvasUtils.getSelection();
if (selection.size() > 1) {
return 'invisible'
} else {
@@ -236,27 +233,27 @@
* Gets the name to show for the selection context.
*/
getContextName: function () {
- var selection = canvasUtils.getSelection();
- var canRead = canvasUtils.canReadFromGroup();
+ var selection = nfCanvasUtils.getSelection();
+ var canRead = nfCanvasUtils.canReadFromGroup();
if (selection.empty()) {
if (canRead) {
- return canvasUtils.getGroupName();
+ return nfCanvasUtils.getGroupName();
} else {
- return canvasUtils.getGroupId();
+ return nfCanvasUtils.getGroupId();
}
} else {
if (selection.size() === 1) {
var d = selection.datum();
if (d.permissions.canRead) {
- if (canvasUtils.isLabel(selection)) {
+ if (nfCanvasUtils.isLabel(selection)) {
if ($.trim(d.component.label) !== '') {
return d.component.label;
} else {
return '';
}
- } else if (canvasUtils.isConnection(selection)) {
- return canvasUtils.formatConnectionName(d.component);
+ } else if (nfCanvasUtils.isConnection(selection)) {
+ return nfCanvasUtils.formatConnectionName(d.component);
} else {
return d.component.name;
}
@@ -273,27 +270,27 @@
* Gets the type to show for the selection context.
*/
getContextType: function () {
- var selection = canvasUtils.getSelection();
+ var selection = nfCanvasUtils.getSelection();
if (selection.empty()) {
return 'Process Group';
} else {
if (selection.size() === 1) {
- if (canvasUtils.isProcessor(selection)) {
+ if (nfCanvasUtils.isProcessor(selection)) {
return 'Processor';
- } else if (canvasUtils.isProcessGroup(selection)) {
+ } else if (nfCanvasUtils.isProcessGroup(selection)) {
return 'Process Group';
- } else if (canvasUtils.isInputPort(selection)) {
+ } else if (nfCanvasUtils.isInputPort(selection)) {
return 'Input Port';
- } else if (canvasUtils.isOutputPort(selection)) {
+ } else if (nfCanvasUtils.isOutputPort(selection)) {
return 'Output Port';
- } else if (canvasUtils.isRemoteProcessGroup(selection)) {
+ } else if (nfCanvasUtils.isRemoteProcessGroup(selection)) {
return 'Remote Process Group';
- } else if (canvasUtils.isFunnel(selection)) {
+ } else if (nfCanvasUtils.isFunnel(selection)) {
return 'Funnel';
- } else if (canvasUtils.isLabel(selection)) {
+ } else if (nfCanvasUtils.isLabel(selection)) {
return 'Label';
- } else if (canvasUtils.isConnection(selection)) {
+ } else if (nfCanvasUtils.isConnection(selection)) {
return 'Connection';
}
} else {
@@ -306,10 +303,10 @@
* Gets the id to show for the selection context.
*/
getContextId: function () {
- var selection = canvasUtils.getSelection();
+ var selection = nfCanvasUtils.getSelection();
if (selection.empty()) {
- return canvasUtils.getGroupId();
+ return nfCanvasUtils.getGroupId();
} else {
if (selection.size() === 1) {
var d = selection.datum();
@@ -324,29 +321,29 @@
* Determines whether the user can configure or open the details dialog.
*/
canConfigureOrOpenDetails: function () {
- var selection = canvasUtils.getSelection();
+ var selection = nfCanvasUtils.getSelection();
if (selection.empty()) {
return true;
}
- return canvasUtils.isConfigurable(selection) || canvasUtils.hasDetails(selection);
+ return nfCanvasUtils.isConfigurable(selection) || nfCanvasUtils.hasDetails(selection);
},
/**
* Opens either the configuration or details view based on the current state.
*/
openConfigureOrDetailsView: function () {
- var selection = canvasUtils.getSelection();
+ var selection = nfCanvasUtils.getSelection();
if (selection.empty()) {
- processGroupConfiguration.showConfiguration(canvasUtils.getGroupId());
+ nfProcessGroupConfiguration.showConfiguration(nfCanvasUtils.getGroupId());
}
- if (canvasUtils.isConfigurable(selection)) {
- actions.showConfiguration(selection);
- } else if (canvasUtils.hasDetails(selection)) {
- actions.showDetails(selection);
+ if (nfCanvasUtils.isConfigurable(selection)) {
+ nfActions.showConfiguration(selection);
+ } else if (nfCanvasUtils.hasDetails(selection)) {
+ nfActions.showDetails(selection);
}
}
}
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-header-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-header-controller.js
index 2ad88954a0..6e4a30bf79 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-header-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-header-controller.js
@@ -24,8 +24,8 @@
'nf.Storage',
'nf.Shell',
'nf.ErrorHandler'],
- function ($, common, storage, shell, errorHandler) {
- return (nf.ng.Canvas.HeaderCtrl = factory($, common, storage, shell, errorHandler));
+ function ($, nfCommon, nfStorage, nfShell, nfErrorHandler) {
+ return (nf.ng.Canvas.HeaderCtrl = factory($, nfCommon, nfStorage, nfShell, nfErrorHandler));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ng.Canvas.HeaderCtrl =
@@ -41,7 +41,7 @@
root.nf.Shell,
root.nf.ErrorHandler);
}
-}(this, function ($, common, storage, shell, errorHandler) {
+}(this, function ($, nfCommon, nfStorage, nfShell, nfErrorHandler) {
'use strict';
return function (serviceProvider, toolboxCtrl, globalMenuCtrl, flowStatusCtrl) {
@@ -72,7 +72,7 @@
var loginCtrl = this;
// if the user is not anonymous or accessing via http
- if ($('#current-user').text() !== common.ANONYMOUS_USER_TEXT || location.protocol === 'http:') {
+ if ($('#current-user').text() !== nfCommon.ANONYMOUS_USER_TEXT || location.protocol === 'http:') {
$('#login-link-container').css('display', 'none');
}
@@ -90,7 +90,7 @@
$.when(loginXhr).done(function (loginResult) {
loginCtrl.supportsLogin = loginResult.config.supportsLogin;
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
},
/**
@@ -107,7 +107,7 @@
* Launch the login shell.
*/
launch: function () {
- shell.showPage('login', false);
+ nfShell.showPage('login', false);
}
}
};
@@ -117,7 +117,7 @@
*/
this.logoutCtrl = {
logout: function () {
- storage.removeItem("jwt");
+ nfStorage.removeItem("jwt");
window.location = '/nifi';
}
};
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-navigate-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-navigate-controller.js
index ca0b2269a5..46dc70fafb 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-navigate-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-navigate-controller.js
@@ -21,8 +21,8 @@
if (typeof define === 'function' && define.amd) {
define(['nf.CanvasUtils',
'nf.ContextMenu'],
- function (canvasUtils, contextMenu) {
- return (nf.ng.Canvas.NavigateCtrl = factory(canvasUtils, contextMenu));
+ function (nfCanvasUtils, nfContextMenu) {
+ return (nf.ng.Canvas.NavigateCtrl = factory(nfCanvasUtils, nfContextMenu));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ng.Canvas.NavigateCtrl =
@@ -32,7 +32,7 @@
nf.ng.Canvas.NavigateCtrl = factory(root.nf.CanvasUtils,
root.nf.ContextMenu);
}
-}(this, function (canvasUtils, contextMenu) {
+}(this, function (nfCanvasUtils, nfContextMenu) {
'use strict';
return function () {
@@ -44,13 +44,13 @@
* Zoom in on the canvas.
*/
this.zoomIn = function () {
- canvasUtils.zoomCanvasViewIn();
+ nfCanvasUtils.zoomCanvasViewIn();
// hide the context menu
- contextMenu.hide();
+ nfContextMenu.hide();
// refresh the canvas
- canvasUtils.refreshCanvasView({
+ nfCanvasUtils.refreshCanvasView({
transition: true
});
};
@@ -59,13 +59,13 @@
* Zoom out on the canvas.
*/
this.zoomOut = function () {
- canvasUtils.zoomCanvasViewOut();
+ nfCanvasUtils.zoomCanvasViewOut();
// hide the context menu
- contextMenu.hide();
+ nfContextMenu.hide();
// refresh the canvas
- canvasUtils.refreshCanvasView({
+ nfCanvasUtils.refreshCanvasView({
transition: true
});
};
@@ -74,13 +74,13 @@
* Zoom fit on the canvas.
*/
this.zoomFit = function () {
- canvasUtils.fitCanvasView();
+ nfCanvasUtils.fitCanvasView();
// hide the context menu
- contextMenu.hide();
+ nfContextMenu.hide();
// refresh the canvas
- canvasUtils.refreshCanvasView({
+ nfCanvasUtils.refreshCanvasView({
transition: true
});
};
@@ -89,13 +89,13 @@
* Zoom actual size on the canvas.
*/
this.zoomActualSize = function () {
- canvasUtils.actualSizeCanvasView();
+ nfCanvasUtils.actualSizeCanvasView();
// hide the context menu
- contextMenu.hide();
+ nfContextMenu.hide();
// refresh the canvas
- canvasUtils.refreshCanvasView({
+ nfCanvasUtils.refreshCanvasView({
transition: true
});
};
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 ed01f105b5..c1068bbd85 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
@@ -27,8 +27,8 @@
'nf.Common',
'nf.Client',
'nf.Processor'],
- function ($, d3, dialog, birdseye, canvasUtils, common, client, processor) {
- return (nf.ng.Canvas.OperateCtrl = factory($, d3, dialog, birdseye, canvasUtils, common, client, processor));
+ function ($, d3, nfDialog, nfBirdseye, nfCanvasUtils, nfCommon, nfClient, nfProcessor) {
+ return (nf.ng.Canvas.OperateCtrl = factory($, d3, nfDialog, nfBirdseye, nfCanvasUtils, nfCommon, nfClient, nfProcessor));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ng.Canvas.OperateCtrl =
@@ -50,7 +50,7 @@
root.nf.Client,
root.nf.Processor);
}
-}(this, function ($, d3, dialog, birdseye, canvasUtils, common, client, processor) {
+}(this, function ($, d3, nfDialog, nfBirdseye, nfCanvasUtils, nfCommon, nfClient, nfProcessor) {
'use strict';
return function () {
@@ -154,12 +154,12 @@
dataType: 'xml',
beforeSubmit: function (formData, $form, options) {
// ensure uploading to the current process group
- options.url += (encodeURIComponent(canvasUtils.getGroupId()) + '/templates/upload');
+ options.url += (encodeURIComponent(nfCanvasUtils.getGroupId()) + '/templates/upload');
},
success: function (response, statusText, xhr, form) {
// see if the import was successful and inform the user
if (response.documentElement.tagName === 'templateEntity') {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Success',
dialogContent: 'Template successfully imported.'
});
@@ -169,23 +169,23 @@
if (response.documentElement.tagName === 'errorResponse') {
// if a more specific error was given, use it
var errorMessage = response.documentElement.getAttribute('statusText');
- if (!common.isBlank(errorMessage)) {
+ if (!nfCommon.isBlank(errorMessage)) {
statusText = errorMessage;
}
}
// show reason
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Unable to Upload',
- dialogContent: common.escapeHtml(statusText)
+ dialogContent: nfCommon.escapeHtml(statusText)
});
}
},
error: function (xhr, statusText, error) {
// request failed
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Unable to Upload',
- dialogContent: common.escapeHtml(xhr.responseText)
+ dialogContent: nfCommon.escapeHtml(xhr.responseText)
});
}
});
@@ -205,7 +205,7 @@
var selectedTemplate = $('#selected-template-name').text();
// submit the template if necessary
- if (common.isBlank(selectedTemplate)) {
+ if (nfCommon.isBlank(selectedTemplate)) {
$('#upload-template-status').text('No template selected. Please browse to select a template.');
} else {
templateForm.submit();
@@ -248,7 +248,7 @@
// add a handler for the change file input chain event
$('#template-file-field').on('change', function (e) {
var filename = $(this).val();
- if (!common.isBlank(filename)) {
+ if (!nfCommon.isBlank(filename)) {
filename = filename.replace(/^.*[\\\/]/, '');
}
@@ -320,7 +320,7 @@
},
handler: {
click: function () {
- var selection = canvasUtils.getSelection();
+ var selection = nfCanvasUtils.getSelection();
// color the selected components
selection.each(function (d) {
@@ -334,7 +334,7 @@
if (color !== selectedData.component.style['background-color']) {
// build the request entity
var entity = {
- 'revision': client.getRevision(selectedData),
+ 'revision': nfClient.getRevision(selectedData),
'component': {
'id': selectedData.id,
'style': {
@@ -352,16 +352,16 @@
contentType: 'application/json'
}).done(function (response) {
// update the component
- canvasUtils.getComponentByType(selectedData.type).set(response);
+ nfCanvasUtils.getComponentByType(selectedData.type).set(response);
}).fail(function (xhr, status, error) {
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Error',
- dialogContent: common.escapeHtml(xhr.responseText)
+ dialogContent: nfCommon.escapeHtml(xhr.responseText)
});
}
}).always(function () {
- birdseye.refresh();
+ nfBirdseye.refresh();
});
}
});
@@ -448,13 +448,13 @@
if (hex.toLowerCase() === '#ffffff') {
//special case #ffffff implies default fill
$('#fill-color-processor-preview-icon').css({
- 'color': processor.defaultIconColor(),
+ 'color': nfProcessor.defaultIconColor(),
'background-color': hex
});
} else {
$('#fill-color-processor-preview-icon').css({
- 'color': common.determineContrastColor(
- common.substringAfterLast(
+ 'color': nfCommon.determineContrastColor(
+ nfCommon.substringAfterLast(
hex, '#')),
'background-color': hex
});
@@ -472,7 +472,7 @@
'background': hex
});
$('#fill-color-label-preview-value').css('color',
- common.determineContrastColor(common.substringAfterLast(hex, '#'))
+ nfCommon.determineContrastColor(nfCommon.substringAfterLast(hex, '#'))
);
}
});
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-toolbox-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-toolbox-controller.js
index 212ecc3bd7..f6b45f9a36 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-toolbox-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-toolbox-controller.js
@@ -21,8 +21,8 @@
if (typeof define === 'function' && define.amd) {
define(['nf.CanvasUtils',
'nf.ContextMenu'],
- function (canvasUtils, contextMenu) {
- return (nf.ng.Canvas.ToolboxCtrl = factory(canvasUtils, contextMenu));
+ function (nfCanvasUtils, nfContextMenu) {
+ return (nf.ng.Canvas.ToolboxCtrl = factory(nfCanvasUtils, nfContextMenu));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ng.Canvas.ToolboxCtrl =
@@ -32,7 +32,7 @@
nf.ng.Canvas.ToolboxCtrl = factory(root.nf.CanvasUtils,
root.nf.ContextMenu);
}
-}(this, function (canvasUtils, contextMenu) {
+}(this, function (nfCanvasUtils, nfContextMenu) {
'use strict';
return function (processorComponent,
@@ -127,14 +127,14 @@
cursor: '-webkit-grabbing',
start: function (e, ui) {
// hide the context menu if necessary
- contextMenu.hide();
+ nfContextMenu.hide();
},
stop: function (e, ui) {
- var translate = canvasUtils.translateCanvasView();
- var scale = canvasUtils.scaleCanvasView();
+ var translate = nfCanvasUtils.translateCanvasView();
+ var scale = nfCanvasUtils.scaleCanvasView();
var mouseX = e.originalEvent.pageX;
- var mouseY = e.originalEvent.pageY - canvasUtils.getCanvasOffset();
+ var mouseY = e.originalEvent.pageY - nfCanvasUtils.getCanvasOffset();
// invoke the drop handler if we're over the canvas
if (mouseX >= 0 && mouseY >= 0) {
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-funnel-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-funnel-component.js
index c324a8dec8..94db750e4b 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-funnel-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-funnel-component.js
@@ -25,8 +25,8 @@
'nf.Graph',
'nf.CanvasUtils',
'nf.ErrorHandler'],
- function ($, client, birdseye, graph, canvasUtils, errorHandler) {
- return (nf.ng.FunnelComponent = factory($, client, birdseye, graph, canvasUtils, errorHandler));
+ function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler) {
+ return (nf.ng.FunnelComponent = factory($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ng.FunnelComponent =
@@ -44,7 +44,7 @@
root.nf.CanvasUtils,
root.nf.ErrorHandler);
}
-}(this, function ($, client, birdseye, graph, canvasUtils, errorHandler) {
+}(this, function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler) {
'use strict';
return function (serviceProvider) {
@@ -108,7 +108,7 @@
*/
createFunnel: function (pt) {
var outputPortEntity = {
- 'revision': client.getRevision({
+ 'revision': nfClient.getRevision({
'revision': {
'version': 0
}
@@ -124,21 +124,21 @@
// create a new funnel
$.ajax({
type: 'POST',
- url: serviceProvider.headerCtrl.toolboxCtrl.config.urls.api + '/process-groups/' + encodeURIComponent(canvasUtils.getGroupId()) + '/funnels',
+ url: serviceProvider.headerCtrl.toolboxCtrl.config.urls.api + '/process-groups/' + encodeURIComponent(nfCanvasUtils.getGroupId()) + '/funnels',
data: JSON.stringify(outputPortEntity),
dataType: 'json',
contentType: 'application/json'
}).done(function (response) {
// add the funnel to the graph
- graph.add({
+ nfGraph.add({
'funnels': [response]
}, {
'selectAll': true
});
// update the birdseye
- birdseye.refresh();
- }).fail(errorHandler.handleAjaxError);
+ nfBirdseye.refresh();
+ }).fail(nfErrorHandler.handleAjaxError);
}
}
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 5e7463a548..fcd4aba234 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
@@ -25,8 +25,8 @@
'nf.Graph',
'nf.CanvasUtils',
'nf.ErrorHandler'],
- function ($, client, birdseye, graph, canvasUtils, errorHandler) {
- return (nf.ng.GroupComponent = factory($, client, birdseye, graph, canvasUtils, errorHandler));
+ function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler) {
+ return (nf.ng.GroupComponent = factory($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ng.GroupComponent =
@@ -44,7 +44,7 @@
root.nf.CanvasUtils,
root.nf.ErrorHandler);
}
-}(this, function ($, client, birdseye, graph, canvasUtils, errorHandler) {
+}(this, function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler) {
'use strict';
return function (serviceProvider) {
@@ -58,7 +58,7 @@
*/
var createGroup = function (groupName, pt) {
var processGroupEntity = {
- 'revision': client.getRevision({
+ 'revision': nfClient.getRevision({
'revision': {
'version': 0
}
@@ -75,24 +75,24 @@
// create a new processor of the defined type
return $.ajax({
type: 'POST',
- url: serviceProvider.headerCtrl.toolboxCtrl.config.urls.api + '/process-groups/' + encodeURIComponent(canvasUtils.getGroupId()) + '/process-groups',
+ url: serviceProvider.headerCtrl.toolboxCtrl.config.urls.api + '/process-groups/' + encodeURIComponent(nfCanvasUtils.getGroupId()) + '/process-groups',
data: JSON.stringify(processGroupEntity),
dataType: 'json',
contentType: 'application/json'
}).done(function (response) {
// add the process group to the graph
- graph.add({
+ nfGraph.add({
'processGroups': [response]
}, {
'selectAll': true
});
// update component visibility
- graph.updateVisibility();
+ nfGraph.updateVisibility();
// update the birdseye
- birdseye.refresh();
- }).fail(errorHandler.handleAjaxError);
+ nfBirdseye.refresh();
+ }).fail(nfErrorHandler.handleAjaxError);
};
function GroupComponent() {
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-input-port-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-input-port-component.js
index 9aab07bdaf..3c682a94b3 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-input-port-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-input-port-component.js
@@ -25,8 +25,8 @@
'nf.Graph',
'nf.CanvasUtils',
'nf.ErrorHandler'],
- function ($, client, birdseye, graph, canvasUtils, errorHandler) {
- return (nf.ng.InputPortComponent = factory($, client, birdseye, graph, canvasUtils, errorHandler));
+ function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler) {
+ return (nf.ng.InputPortComponent = factory($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ng.InputPortComponent =
@@ -44,7 +44,7 @@
root.nf.CanvasUtils,
root.nf.ErrorHandler);
}
-}(this, function ($, client, birdseye, graph, canvasUtils, errorHandler) {
+}(this, function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler) {
'use strict';
return function (serviceProvider) {
@@ -58,7 +58,7 @@
*/
var createInputPort = function (portName, pt) {
var inputPortEntity = {
- 'revision': client.getRevision({
+ 'revision': nfClient.getRevision({
'revision': {
'version': 0
}
@@ -75,24 +75,24 @@
// create a new processor of the defined type
$.ajax({
type: 'POST',
- url: serviceProvider.headerCtrl.toolboxCtrl.config.urls.api + '/process-groups/' + encodeURIComponent(canvasUtils.getGroupId()) + '/input-ports',
+ url: serviceProvider.headerCtrl.toolboxCtrl.config.urls.api + '/process-groups/' + encodeURIComponent(nfCanvasUtils.getGroupId()) + '/input-ports',
data: JSON.stringify(inputPortEntity),
dataType: 'json',
contentType: 'application/json'
}).done(function (response) {
// add the port to the graph
- graph.add({
+ nfGraph.add({
'inputPorts': [response]
}, {
'selectAll': true
});
// update component visibility
- graph.updateVisibility();
+ nfGraph.updateVisibility();
// update the birdseye
- birdseye.refresh();
- }).fail(errorHandler.handleAjaxError);
+ nfBirdseye.refresh();
+ }).fail(nfErrorHandler.handleAjaxError);
};
function InputPortComponent() {
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-label-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-label-component.js
index f3c4263e5f..9562109407 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-label-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-label-component.js
@@ -26,8 +26,8 @@
'nf.CanvasUtils',
'nf.ErrorHandler',
'nf.Label'],
- function ($, client, birdseye, graph, canvasUtils, errorHandler, label) {
- return (nf.ng.LabelComponent = factory($, client, birdseye, graph, canvasUtils, errorHandler, label));
+ function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfLabel) {
+ return (nf.ng.LabelComponent = factory($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfLabel));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ng.LabelComponent =
@@ -47,7 +47,7 @@
root.nf.ErrorHandler,
root.nf.Label);
}
-}(this, function ($, client, birdseye, graph, canvasUtils, errorHandler, label) {
+}(this, function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfLabel) {
'use strict';
return function (serviceProvider) {
@@ -111,14 +111,14 @@
*/
createLabel: function (pt) {
var labelEntity = {
- 'revision': client.getRevision({
+ 'revision': nfClient.getRevision({
'revision': {
'version': 0
}
}),
'component': {
- 'width': label.config.width,
- 'height': label.config.height,
+ 'width': nfLabel.config.width,
+ 'height': nfLabel.config.height,
'position': {
'x': pt.x,
'y': pt.y
@@ -129,21 +129,21 @@
// create a new label
$.ajax({
type: 'POST',
- url: serviceProvider.headerCtrl.toolboxCtrl.config.urls.api + '/process-groups/' + encodeURIComponent(canvasUtils.getGroupId()) + '/labels',
+ url: serviceProvider.headerCtrl.toolboxCtrl.config.urls.api + '/process-groups/' + encodeURIComponent(nfCanvasUtils.getGroupId()) + '/labels',
data: JSON.stringify(labelEntity),
dataType: 'json',
contentType: 'application/json'
}).done(function (response) {
// add the label to the graph
- graph.add({
+ nfGraph.add({
'labels': [response]
}, {
'selectAll': true
});
// update the birdseye
- birdseye.refresh();
- }).fail(errorHandler.handleAjaxError);
+ nfBirdseye.refresh();
+ }).fail(nfErrorHandler.handleAjaxError);
}
}
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-output-port-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-output-port-component.js
index 8b4c637c0f..6bb17521b0 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-output-port-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-output-port-component.js
@@ -25,8 +25,8 @@
'nf.Graph',
'nf.CanvasUtils',
'nf.ErrorHandler'],
- function ($, client, birdseye, graph, canvasUtils, errorHandler) {
- return (nf.ng.OutputPortComponent = factory($, client, birdseye, graph, canvasUtils, errorHandler));
+ function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler) {
+ return (nf.ng.OutputPortComponent = factory($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ng.OutputPortComponent =
@@ -44,7 +44,7 @@
root.nf.CanvasUtils,
root.nf.ErrorHandler);
}
-}(this, function ($, client, birdseye, graph, canvasUtils, errorHandler) {
+}(this, function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler) {
'use strict';
return function (serviceProvider) {
@@ -58,7 +58,7 @@
*/
var createOutputPort = function (portName, pt) {
var outputPortEntity = {
- 'revision': client.getRevision({
+ 'revision': nfClient.getRevision({
'revision': {
'version': 0
}
@@ -75,24 +75,24 @@
// create a new processor of the defined type
$.ajax({
type: 'POST',
- url: serviceProvider.headerCtrl.toolboxCtrl.config.urls.api + '/process-groups/' + encodeURIComponent(canvasUtils.getGroupId()) + '/output-ports',
+ url: serviceProvider.headerCtrl.toolboxCtrl.config.urls.api + '/process-groups/' + encodeURIComponent(nfCanvasUtils.getGroupId()) + '/output-ports',
data: JSON.stringify(outputPortEntity),
dataType: 'json',
contentType: 'application/json'
}).done(function (response) {
// add the port to the graph
- graph.add({
+ nfGraph.add({
'outputPorts': [response]
}, {
'selectAll': true
});
// update component visibility
- graph.updateVisibility();
+ nfGraph.updateVisibility();
// update the birdseye
- birdseye.refresh();
- }).fail(errorHandler.handleAjaxError);
+ nfBirdseye.refresh();
+ }).fail(nfErrorHandler.handleAjaxError);
};
function OutputPortComponent() {
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-processor-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-processor-component.js
index 257de23814..87bb5809b0 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-processor-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-processor-component.js
@@ -28,8 +28,8 @@
'nf.ErrorHandler',
'nf.Dialog',
'nf.Common'],
- function ($, Slick, client, birdseye, graph, canvasUtils, errorHandler, dialog, common) {
- return (nf.ng.ProcessorComponent = factory($, Slick, client, birdseye, graph, canvasUtils, errorHandler, dialog, common));
+ function ($, Slick, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon) {
+ return (nf.ng.ProcessorComponent = factory($, Slick, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ng.ProcessorComponent =
@@ -53,7 +53,7 @@
root.nf.Dialog,
root.nf.Common);
}
-}(this, function ($, Slick, client, birdseye, graph, canvasUtils, errorHandler, dialog, common) {
+}(this, function ($, Slick, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon) {
'use strict';
return function (serviceProvider) {
@@ -67,7 +67,7 @@
var processorTypesGrid = $('#processor-types-table').data('gridInstance');
// ensure the grid has been initialized
- if (common.isDefinedAndNotNull(processorTypesGrid)) {
+ if (nfCommon.isDefinedAndNotNull(processorTypesGrid)) {
var processorTypesData = processorTypesGrid.getData();
// update the search criteria
@@ -187,8 +187,8 @@
var sort = function (sortDetails, data) {
// defines a function for sorting
var comparer = function (a, b) {
- var aString = common.isDefinedAndNotNull(a[sortDetails.columnId]) ? a[sortDetails.columnId] : '';
- var bString = common.isDefinedAndNotNull(b[sortDetails.columnId]) ? b[sortDetails.columnId] : '';
+ var aString = nfCommon.isDefinedAndNotNull(a[sortDetails.columnId]) ? a[sortDetails.columnId] : '';
+ var bString = nfCommon.isDefinedAndNotNull(b[sortDetails.columnId]) ? b[sortDetails.columnId] : '';
return aString === bString ? 0 : aString > bString ? 1 : -1;
};
@@ -239,7 +239,7 @@
*/
var createProcessor = function (name, processorType, pt) {
var processorEntity = {
- 'revision': client.getRevision({
+ 'revision': nfClient.getRevision({
'revision': {
'version': 0
}
@@ -257,24 +257,24 @@
// create a new processor of the defined type
$.ajax({
type: 'POST',
- url: serviceProvider.headerCtrl.toolboxCtrl.config.urls.api + '/process-groups/' + encodeURIComponent(canvasUtils.getGroupId()) + '/processors',
+ url: serviceProvider.headerCtrl.toolboxCtrl.config.urls.api + '/process-groups/' + encodeURIComponent(nfCanvasUtils.getGroupId()) + '/processors',
data: JSON.stringify(processorEntity),
dataType: 'json',
contentType: 'application/json'
}).done(function (response) {
// add the processor to the graph
- graph.add({
+ nfGraph.add({
'processors': [response]
}, {
'selectAll': true
});
// update component visibility
- graph.updateVisibility();
+ nfGraph.updateVisibility();
// update the birdseye
- birdseye.refresh();
- }).fail(errorHandler.handleAjaxError);
+ nfBirdseye.refresh();
+ }).fail(nfErrorHandler.handleAjaxError);
};
/**
@@ -283,7 +283,7 @@
* @param item process type
*/
var isSelectable = function (item) {
- return common.isBlank(item.usageRestriction) || common.canAccessRestrictedComponents();
+ return nfCommon.isBlank(item.usageRestriction) || nfCommon.canAccessRestrictedComponents();
};
function ProcessorComponent() {
@@ -312,7 +312,7 @@
id: 'type',
name: 'Type',
field: 'label',
- formatter: common.typeFormatter,
+ formatter: nfCommon.typeFormatter,
sortable: true,
resizable: true
},
@@ -368,8 +368,8 @@
var processorType = processorTypesGrid.getDataItem(processorTypeIndex);
// set the processor type description
- if (common.isDefinedAndNotNull(processorType)) {
- if (common.isBlank(processorType.description)) {
+ if (nfCommon.isDefinedAndNotNull(processorType)) {
+ if (nfCommon.isBlank(processorType.description)) {
$('#processor-type-description')
.attr('title', '')
.html('
No description specified');
@@ -391,7 +391,7 @@
}
});
processorTypesGrid.onViewportChanged.subscribe(function (e, args) {
- common.cleanUpTooltips($('#processor-types-table'), 'div.view-usage-restriction');
+ nfCommon.cleanUpTooltips($('#processor-types-table'), 'div.view-usage-restriction');
});
// wire up the dataview to the grid
@@ -418,8 +418,8 @@
var item = processorTypesData.getItemById(rowId);
// show the tooltip
- if (common.isDefinedAndNotNull(item.usageRestriction)) {
- usageRestriction.qtip($.extend({}, common.config.tooltipConfig, {
+ if (nfCommon.isDefinedAndNotNull(item.usageRestriction)) {
+ usageRestriction.qtip($.extend({}, nfCommon.config.tooltipConfig, {
content: item.usageRestriction,
position: {
container: $('#summary'),
@@ -454,10 +454,10 @@
// create the row for the processor type
processorTypesData.addItem({
id: i,
- label: common.substringAfterLast(type, '.'),
+ label: nfCommon.substringAfterLast(type, '.'),
type: type,
- description: common.escapeHtml(documentedType.description),
- usageRestriction: common.escapeHtml(documentedType.usageRestriction),
+ description: nfCommon.escapeHtml(documentedType.description),
+ usageRestriction: nfCommon.escapeHtml(documentedType.usageRestriction),
tags: documentedType.tags.join(', ')
});
@@ -479,7 +479,7 @@
select: applyFilter,
remove: applyFilter
});
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
}
},
@@ -600,7 +600,7 @@
// ensure something was selected
if (name === '' || processorType === '') {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Add Processor',
dialogContent: 'The type of processor to create must be selected.'
});
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-remote-process-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-remote-process-group-component.js
index d911ece84e..5e6e116a00 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-remote-process-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-remote-process-group-component.js
@@ -27,8 +27,8 @@
'nf.ErrorHandler',
'nf.Dialog',
'nf.Common'],
- function ($, client, birdseye, graph, canvasUtils, errorHandler, dialog, common) {
- return (nf.ng.RemoteProcessGroupComponent = factory($, client, birdseye, graph, canvasUtils, errorHandler, dialog, common));
+ function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon) {
+ return (nf.ng.RemoteProcessGroupComponent = factory($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ng.RemoteProcessGroupComponent =
@@ -50,7 +50,7 @@
root.nf.Dialog,
root.nf.Common);
}
-}(this, function ($, client, birdseye, graph, canvasUtils, errorHandler, dialog, common) {
+}(this, function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon) {
'use strict';
return function (serviceProvider) {
@@ -64,7 +64,7 @@
var createRemoteProcessGroup = function (pt) {
var remoteProcessGroupEntity = {
- 'revision': client.getRevision({
+ 'revision': nfClient.getRevision({
'revision': {
'version': 0
}
@@ -88,13 +88,13 @@
// create a new processor of the defined type
$.ajax({
type: 'POST',
- url: serviceProvider.headerCtrl.toolboxCtrl.config.urls.api + '/process-groups/' + encodeURIComponent(canvasUtils.getGroupId()) + '/remote-process-groups',
+ url: serviceProvider.headerCtrl.toolboxCtrl.config.urls.api + '/process-groups/' + encodeURIComponent(nfCanvasUtils.getGroupId()) + '/remote-process-groups',
data: JSON.stringify(remoteProcessGroupEntity),
dataType: 'json',
contentType: 'application/json'
}).done(function (response) {
// add the processor to the graph
- graph.add({
+ nfGraph.add({
'remoteProcessGroups': [response]
}, {
'selectAll': true
@@ -104,10 +104,10 @@
$('#new-remote-process-group-dialog').modal('hide');
// update component visibility
- graph.updateVisibility();
+ nfGraph.updateVisibility();
// update the birdseye
- birdseye.refresh();
+ nfBirdseye.refresh();
}).fail(function (xhr, status, error) {
if (xhr.status === 400) {
var errors = xhr.responseText.split('\n');
@@ -116,15 +116,15 @@
if (errors.length === 1) {
content = $('
').text(errors[0]);
} else {
- content = common.formatUnorderedList(errors);
+ content = nfCommon.formatUnorderedList(errors);
}
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
dialogContent: content,
headerText: 'Configuration Error'
});
} else {
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
}
});
};
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-template-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-template-component.js
index 7dc3b8b443..99fe0ecb70 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-template-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-template-component.js
@@ -27,8 +27,8 @@
'nf.ErrorHandler',
'nf.Dialog',
'nf.Common'],
- function ($, client, birdseye, graph, canvasUtils, errorHandler, dialog, common) {
- return (nf.ng.TemplateComponent = factory($, client, birdseye, graph, canvasUtils, errorHandler, dialog, common));
+ function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon) {
+ return (nf.ng.TemplateComponent = factory($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ng.TemplateComponent =
@@ -50,7 +50,7 @@
root.nf.Dialog,
root.nf.Common);
}
-}(this, function ($, client, birdseye, graph, canvasUtils, errorHandler, dialog, common) {
+}(this, function ($, nfClient, nfBirdseye, nfGraph, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon) {
'use strict';
return function (serviceProvider) {
@@ -72,22 +72,22 @@
// create a new instance of the new template
$.ajax({
type: 'POST',
- url: serviceProvider.headerCtrl.toolboxCtrl.config.urls.api + '/process-groups/' + encodeURIComponent(canvasUtils.getGroupId()) + '/template-instance',
+ url: serviceProvider.headerCtrl.toolboxCtrl.config.urls.api + '/process-groups/' + encodeURIComponent(nfCanvasUtils.getGroupId()) + '/template-instance',
data: JSON.stringify(instantiateTemplateInstance),
dataType: 'json',
contentType: 'application/json'
}).done(function (response) {
// populate the graph accordingly
- graph.add(response.flow, {
+ nfGraph.add(response.flow, {
'selectAll': true
});
// update component visibility
- graph.updateVisibility();
+ nfGraph.updateVisibility();
// update the birdseye
- birdseye.refresh();
- }).fail(errorHandler.handleAjaxError);
+ nfBirdseye.refresh();
+ }).fail(nfErrorHandler.handleAjaxError);
};
function TemplateComponent() {
@@ -205,11 +205,11 @@
dataType: 'json'
}).done(function (response) {
var templates = response.templates;
- if (common.isDefinedAndNotNull(templates) && templates.length > 0) {
+ if (nfCommon.isDefinedAndNotNull(templates) && templates.length > 0) {
// sort the templates
templates = templates.sort(function (one, two) {
- var oneDate = common.parseDateTime(one.template.timestamp);
- var twoDate = common.parseDateTime(two.template.timestamp);
+ var oneDate = nfCommon.parseDateTime(one.template.timestamp);
+ var twoDate = nfCommon.parseDateTime(two.template.timestamp);
// newest templates first
return twoDate.getTime() - oneDate.getTime();
@@ -221,7 +221,7 @@
options.push({
text: templateEntity.template.name,
value: templateEntity.id,
- description: common.escapeHtml(templateEntity.template.description)
+ description: nfCommon.escapeHtml(templateEntity.template.description)
});
}
});
@@ -271,13 +271,13 @@
// show the dialog
templateComponent.modal.show();
} else {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Instantiate Template',
dialogContent: 'No templates have been loaded into this NiFi.'
});
}
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
}
}
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 e8d677b72f..5ee3817dfa 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
@@ -53,8 +53,8 @@
'nf.RemoteProcessGroupPorts',
'nf.QueueListing',
'nf.StatusHistory'],
- function ($, d3, canvasUtils, common, dialog, client, errorHandler, clipboard, nfSnippet, nfGoto, angularBridge, shell, componentState, draggable, birdseye, nfConnection, graph, processGroupConfiguration, processorConfiguration, processorDetails, labelConfiguration, remoteProcessGroupConfiguration, remoteProcessGroupDetails, portConfiguration, portDetails, connectionConfiguration, connectionDetails, policyManagement, remoteProcessGroup, label, processor, remoteProcessGroupPorts, queueListing, statusHistory) {
- return (nf.Actions = factory($, d3, canvasUtils, common, dialog, client, errorHandler, clipboard, nfSnippet, nfGoto, angularBridge, shell, componentState, draggable, birdseye, nfConnection, graph, processGroupConfiguration, processorConfiguration, processorDetails, labelConfiguration, remoteProcessGroupConfiguration, remoteProcessGroupDetails, portConfiguration, portDetails, connectionConfiguration, connectionDetails, policyManagement, remoteProcessGroup, label, processor, remoteProcessGroupPorts, queueListing, statusHistory));
+ function ($, d3, nfCanvasUtils, nfCommon, nfDialog, nfClient, nfErrorHandler, nfClipboard, nfSnippet, nfGoto, nfNgBridge, nfShell, nfComponentState, nfDraggable, nfBirdseye, nfConnection, nfGraph, nfProcessGroupConfiguration, nfProcessorConfiguration, nfProcessorDetails, nfLabelConfiguration, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupDetails, nfPortConfiguration, nfPortDetails, nfConnectionConfiguration, nfConnectionDetails, nfPolicyManagement, nfRemoteProcessGroup, nfLabel, nfProcessor, nfRemoteProcessGroupPorts, nfQueueListing, nfStatusHistory) {
+ return (nf.Actions = factory($, d3, nfCanvasUtils, nfCommon, nfDialog, nfClient, nfErrorHandler, nfClipboard, nfSnippet, nfGoto, nfNgBridge, nfShell, nfComponentState, nfDraggable, nfBirdseye, nfConnection, nfGraph, nfProcessGroupConfiguration, nfProcessorConfiguration, nfProcessorDetails, nfLabelConfiguration, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupDetails, nfPortConfiguration, nfPortDetails, nfConnectionConfiguration, nfConnectionDetails, nfPolicyManagement, nfRemoteProcessGroup, nfLabel, nfProcessor, nfRemoteProcessGroupPorts, nfQueueListing, nfStatusHistory));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.Actions =
@@ -128,7 +128,7 @@
root.nf.QueueListing,
root.nf.StatusHistory);
}
-}(this, function ($, d3, canvasUtils, common, dialog, client, errorHandler, clipboard, nfSnippet, nfGoto, angularBridge, shell, componentState, draggable, birdseye, nfConnection, graph, processGroupConfiguration, processorConfiguration, processorDetails, labelConfiguration, remoteProcessGroupConfiguration, remoteProcessGroupDetails, portConfiguration, portDetails, connectionConfiguration, connectionDetails, policyManagement, remoteProcessGroup, label, processor, remoteProcessGroupPorts, queueListing, statusHistory) {
+}(this, function ($, d3, nfCanvasUtils, nfCommon, nfDialog, nfClient, nfErrorHandler, nfClipboard, nfSnippet, nfGoto, nfNgBridge, nfShell, nfComponentState, nfDraggable, nfBirdseye, nfConnection, nfGraph, nfProcessGroupConfiguration, nfProcessorConfiguration, nfProcessorDetails, nfLabelConfiguration, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupDetails, nfPortConfiguration, nfPortDetails, nfConnectionConfiguration, nfConnectionDetails, nfPolicyManagement, nfRemoteProcessGroup, nfLabel, nfProcessor, nfRemoteProcessGroupPorts, nfQueueListing, nfStatusHistory) {
'use strict';
var config = {
@@ -169,9 +169,9 @@
dataType: 'json',
contentType: 'application/json'
}).fail(function (xhr, status, error) {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Update Resource',
- dialogContent: common.escapeHtml(xhr.responseText)
+ dialogContent: nfCommon.escapeHtml(xhr.responseText)
});
});
};
@@ -183,14 +183,14 @@
url: config.urls.api + '/flow/process-groups/' + encodeURIComponent(response.id),
dataType: 'json'
}).done(function (response) {
- graph.set(response.processGroupFlow.flow);
+ nfGraph.set(response.processGroupFlow.flow);
});
};
// determine if the source of this connection is part of the selection
var isSourceSelected = function (connection, selection) {
return selection.filter(function (d) {
- return canvasUtils.getConnectionSourceComponentId(connection) === d.id;
+ return nfCanvasUtils.getConnectionSourceComponentId(connection) === d.id;
}).size() > 0;
};
@@ -208,9 +208,9 @@
* @param {selection} selection The the currently selected component
*/
enterGroup: function (selection) {
- if (selection.size() === 1 && canvasUtils.isProcessGroup(selection)) {
+ if (selection.size() === 1 && nfCanvasUtils.isProcessGroup(selection)) {
var selectionData = selection.datum();
- canvasUtils.getComponentByType('ProcessGroup').enterGroup(selectionData.id);
+ nfCanvasUtils.getComponentByType('ProcessGroup').enterGroup(selectionData.id);
}
},
@@ -218,7 +218,7 @@
* Exits the current process group but entering the parent group.
*/
leaveGroup: function () {
- canvasUtils.getComponentByType('ProcessGroup').enterGroup(canvasUtils.getParentGroupId());
+ nfCanvasUtils.getComponentByType('ProcessGroup').enterGroup(nfCanvasUtils.getParentGroupId());
},
/**
@@ -227,7 +227,7 @@
* @param {selection} selection
*/
refreshRemoteFlow: function (selection) {
- if (selection.size() === 1 && canvasUtils.isRemoteProcessGroup(selection)) {
+ if (selection.size() === 1 && nfCanvasUtils.isRemoteProcessGroup(selection)) {
var d = selection.datum();
var refreshTimestamp = d.component.flowRefreshed;
@@ -256,7 +256,7 @@
if (refreshTimestamp === remoteProcessGroup.flowRefreshed) {
schedule(nextDelay);
} else {
- remoteProcessGroup.set(response);
+ nfRemoteProcessGroup.set(response);
// reload the group's connections
var connections = nfConnection.getComponentConnections(remoteProcessGroup.id);
@@ -291,14 +291,14 @@
* @param {selection} selection The selection
*/
openUri: function (selection) {
- if (selection.size() === 1 && canvasUtils.isRemoteProcessGroup(selection)) {
+ if (selection.size() === 1 && nfCanvasUtils.isRemoteProcessGroup(selection)) {
var selectionData = selection.datum();
var uri = selectionData.component.targetUri;
- if (!common.isBlank(uri)) {
+ if (!nfCommon.isBlank(uri)) {
window.open(encodeURI(uri));
} else {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Remote Process Group',
dialogContent: 'No target URI defined.'
});
@@ -312,11 +312,11 @@
* @param {selection} selection The selection
*/
showSource: function (selection) {
- if (selection.size() === 1 && canvasUtils.isConnection(selection)) {
+ if (selection.size() === 1 && nfCanvasUtils.isConnection(selection)) {
var selectionData = selection.datum();
// the source is in the current group
- if (selectionData.sourceGroupId === canvasUtils.getGroupId()) {
+ if (selectionData.sourceGroupId === nfCanvasUtils.getGroupId()) {
var source = d3.select('#id-' + selectionData.sourceId);
nfActions.show(source);
} else if (selectionData.sourceType === 'REMOTE_OUTPUT_PORT') {
@@ -325,7 +325,7 @@
nfActions.show(remoteSource);
} else {
// if the source is local but in a sub group
- canvasUtils.showComponent(selectionData.sourceGroupId, selectionData.sourceId);
+ nfCanvasUtils.showComponent(selectionData.sourceGroupId, selectionData.sourceId);
}
}
},
@@ -336,11 +336,11 @@
* @param {selection} selection The selection
*/
showDestination: function (selection) {
- if (selection.size() === 1 && canvasUtils.isConnection(selection)) {
+ if (selection.size() === 1 && nfCanvasUtils.isConnection(selection)) {
var selectionData = selection.datum();
// the destination is in the current group or its remote
- if (selectionData.destinationGroupId === canvasUtils.getGroupId()) {
+ if (selectionData.destinationGroupId === nfCanvasUtils.getGroupId()) {
var destination = d3.select('#id-' + selectionData.destinationId);
nfActions.show(destination);
} else if (selectionData.destinationType === 'REMOTE_INPUT_PORT') {
@@ -349,7 +349,7 @@
nfActions.show(remoteDestination);
} else {
// if the destination is local but in a sub group
- canvasUtils.showComponent(selectionData.destinationGroupId, selectionData.destinationId);
+ nfCanvasUtils.showComponent(selectionData.destinationGroupId, selectionData.destinationId);
}
}
},
@@ -360,18 +360,18 @@
* @param {selection} selection The selection
*/
showDownstream: function (selection) {
- if (selection.size() === 1 && !canvasUtils.isConnection(selection)) {
+ if (selection.size() === 1 && !nfCanvasUtils.isConnection(selection)) {
// open the downstream dialog according to the selection
- if (canvasUtils.isProcessor(selection)) {
+ if (nfCanvasUtils.isProcessor(selection)) {
nfGoto.showDownstreamFromProcessor(selection);
- } else if (canvasUtils.isFunnel(selection)) {
+ } else if (nfCanvasUtils.isFunnel(selection)) {
nfGoto.showDownstreamFromFunnel(selection);
- } else if (canvasUtils.isInputPort(selection)) {
+ } else if (nfCanvasUtils.isInputPort(selection)) {
nfGoto.showDownstreamFromInputPort(selection);
- } else if (canvasUtils.isOutputPort(selection)) {
+ } else if (nfCanvasUtils.isOutputPort(selection)) {
nfGoto.showDownstreamFromOutputPort(selection);
- } else if (canvasUtils.isProcessGroup(selection) || canvasUtils.isRemoteProcessGroup(selection)) {
+ } else if (nfCanvasUtils.isProcessGroup(selection) || nfCanvasUtils.isRemoteProcessGroup(selection)) {
nfGoto.showDownstreamFromGroup(selection);
}
}
@@ -383,18 +383,18 @@
* @param {selection} selection The selection
*/
showUpstream: function (selection) {
- if (selection.size() === 1 && !canvasUtils.isConnection(selection)) {
+ if (selection.size() === 1 && !nfCanvasUtils.isConnection(selection)) {
// open the downstream dialog according to the selection
- if (canvasUtils.isProcessor(selection)) {
+ if (nfCanvasUtils.isProcessor(selection)) {
nfGoto.showUpstreamFromProcessor(selection);
- } else if (canvasUtils.isFunnel(selection)) {
+ } else if (nfCanvasUtils.isFunnel(selection)) {
nfGoto.showUpstreamFromFunnel(selection);
- } else if (canvasUtils.isInputPort(selection)) {
+ } else if (nfCanvasUtils.isInputPort(selection)) {
nfGoto.showUpstreamFromInputPort(selection);
- } else if (canvasUtils.isOutputPort(selection)) {
+ } else if (nfCanvasUtils.isOutputPort(selection)) {
nfGoto.showUpstreamFromOutputPort(selection);
- } else if (canvasUtils.isProcessGroup(selection) || canvasUtils.isRemoteProcessGroup(selection)) {
+ } else if (nfCanvasUtils.isProcessGroup(selection) || nfCanvasUtils.isRemoteProcessGroup(selection)) {
nfGoto.showUpstreamFromGroup(selection);
}
}
@@ -408,7 +408,7 @@
show: function (selection) {
if (selection.size() === 1) {
// deselect the current selection
- var currentlySelected = canvasUtils.getSelection();
+ var currentlySelected = nfCanvasUtils.getSelection();
currentlySelected.classed('selected', false);
// select only the component/connection in question
@@ -416,7 +416,7 @@
nfActions.center(selection);
// inform Angular app that values have changed
- angularBridge.digest();
+ nfNgBridge.digest();
}
},
@@ -444,7 +444,7 @@
center: function (selection) {
if (selection.size() === 1) {
var box;
- if (canvasUtils.isConnection(selection)) {
+ if (nfCanvasUtils.isConnection(selection)) {
var x, y;
var d = selection.datum();
@@ -477,10 +477,10 @@
}
// center on the component
- canvasUtils.centerBoundingBox(box);
+ nfCanvasUtils.centerBoundingBox(box);
// refresh the canvas
- canvasUtils.refreshCanvasView({
+ nfCanvasUtils.refreshCanvasView({
transition: true
});
}
@@ -492,10 +492,10 @@
* @argument {selection} selection The selection
*/
enable: function (selection) {
- var componentsToEnable = canvasUtils.filterEnable(selection);
+ var componentsToEnable = nfCanvasUtils.filterEnable(selection);
if (componentsToEnable.empty()) {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Enable Components',
dialogContent: 'No eligible components are selected. Please select the components to be enabled and ensure they are no longer running.'
});
@@ -508,7 +508,7 @@
// build the entity
var entity = {
- 'revision': client.getRevision(d),
+ 'revision': nfClient.getRevision(d),
'component': {
'id': d.id,
'state': 'STOPPED'
@@ -516,14 +516,14 @@
};
enableRequests.push(updateResource(d.uri, entity).done(function (response) {
- canvasUtils.getComponentByType(d.type).set(response);
+ nfCanvasUtils.getComponentByType(d.type).set(response);
}));
});
// inform Angular app once the updates have completed
if (enableRequests.length > 0) {
$.when.apply(window, enableRequests).always(function () {
- angularBridge.digest();
+ nfNgBridge.digest();
});
}
}
@@ -535,10 +535,10 @@
* @argument {selection} selection The selection
*/
disable: function (selection) {
- var componentsToDisable = canvasUtils.filterDisable(selection);
+ var componentsToDisable = nfCanvasUtils.filterDisable(selection);
if (componentsToDisable.empty()) {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Disable Components',
dialogContent: 'No eligible components are selected. Please select the components to be disabled and ensure they are no longer running.'
});
@@ -551,7 +551,7 @@
// build the entity
var entity = {
- 'revision': client.getRevision(d),
+ 'revision': nfClient.getRevision(d),
'component': {
'id': d.id,
'state': 'DISABLED'
@@ -559,14 +559,14 @@
};
disableRequests.push(updateResource(d.uri, entity).done(function (response) {
- canvasUtils.getComponentByType(d.type).set(response);
+ nfCanvasUtils.getComponentByType(d.type).set(response);
}));
});
// inform Angular app once the updates have completed
if (disableRequests.length > 0) {
$.when.apply(window, disableRequests).always(function () {
- angularBridge.digest();
+ nfNgBridge.digest();
});
}
}
@@ -582,7 +582,7 @@
var selectionData = selection.datum();
// open the provenance page with the specified component
- shell.showPage('provenance?' + $.param({
+ nfShell.showPage('provenance?' + $.param({
componentId: selectionData.id
}));
}
@@ -597,19 +597,19 @@
if (selection.empty()) {
// build the entity
var entity = {
- 'id': canvasUtils.getGroupId(),
+ 'id': nfCanvasUtils.getGroupId(),
'state': 'RUNNING'
};
- updateResource(config.urls.api + '/flow/process-groups/' + encodeURIComponent(canvasUtils.getGroupId()), entity).done(updateProcessGroup);
+ updateResource(config.urls.api + '/flow/process-groups/' + encodeURIComponent(nfCanvasUtils.getGroupId()), entity).done(updateProcessGroup);
} else {
var componentsToStart = selection.filter(function (d) {
- return canvasUtils.isRunnable(d3.select(this));
+ return nfCanvasUtils.isRunnable(d3.select(this));
});
// ensure there are startable components selected
if (componentsToStart.empty()) {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Start Components',
dialogContent: 'No eligible components are selected. Please select the components to be started and ensure they are no longer running.'
});
@@ -622,7 +622,7 @@
// prepare the request
var uri, entity;
- if (canvasUtils.isProcessGroup(selected)) {
+ if (nfCanvasUtils.isProcessGroup(selected)) {
uri = config.urls.api + '/flow/process-groups/' + encodeURIComponent(d.id);
entity = {
'id': d.id,
@@ -631,7 +631,7 @@
} else {
uri = d.uri;
entity = {
- 'revision': client.getRevision(d),
+ 'revision': nfClient.getRevision(d),
'component': {
'id': d.id,
'state': 'RUNNING'
@@ -640,10 +640,10 @@
}
startRequests.push(updateResource(uri, entity).done(function (response) {
- if (canvasUtils.isProcessGroup(selected)) {
- canvasUtils.getComponentByType('ProcessGroup').reload(d.id);
+ if (nfCanvasUtils.isProcessGroup(selected)) {
+ nfCanvasUtils.getComponentByType('ProcessGroup').reload(d.id);
} else {
- canvasUtils.getComponentByType(d.type).set(response);
+ nfCanvasUtils.getComponentByType(d.type).set(response);
}
}));
});
@@ -651,7 +651,7 @@
// inform Angular app once the updates have completed
if (startRequests.length > 0) {
$.when.apply(window, startRequests).always(function () {
- angularBridge.digest();
+ nfNgBridge.digest();
});
}
}
@@ -667,19 +667,19 @@
if (selection.empty()) {
// build the entity
var entity = {
- 'id': canvasUtils.getGroupId(),
+ 'id': nfCanvasUtils.getGroupId(),
'state': 'STOPPED'
};
- updateResource(config.urls.api + '/flow/process-groups/' + encodeURIComponent(canvasUtils.getGroupId()), entity).done(updateProcessGroup);
+ updateResource(config.urls.api + '/flow/process-groups/' + encodeURIComponent(nfCanvasUtils.getGroupId()), entity).done(updateProcessGroup);
} else {
var componentsToStop = selection.filter(function (d) {
- return canvasUtils.isStoppable(d3.select(this));
+ return nfCanvasUtils.isStoppable(d3.select(this));
});
// ensure there are some component to stop
if (componentsToStop.empty()) {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Stop Components',
dialogContent: 'No eligible components are selected. Please select the components to be stopped.'
});
@@ -692,7 +692,7 @@
// prepare the request
var uri, entity;
- if (canvasUtils.isProcessGroup(selected)) {
+ if (nfCanvasUtils.isProcessGroup(selected)) {
uri = config.urls.api + '/flow/process-groups/' + encodeURIComponent(d.id);
entity = {
'id': d.id,
@@ -701,7 +701,7 @@
} else {
uri = d.uri;
entity = {
- 'revision': client.getRevision(d),
+ 'revision': nfClient.getRevision(d),
'component': {
'id': d.id,
'state': 'STOPPED'
@@ -710,10 +710,10 @@
}
stopRequests.push(updateResource(uri, entity).done(function (response) {
- if (canvasUtils.isProcessGroup(selected)) {
- canvasUtils.getComponentByType('ProcessGroup').reload(d.id);
+ if (nfCanvasUtils.isProcessGroup(selected)) {
+ nfCanvasUtils.getComponentByType('ProcessGroup').reload(d.id);
} else {
- canvasUtils.getComponentByType(d.type).set(response);
+ nfCanvasUtils.getComponentByType(d.type).set(response);
}
}));
});
@@ -721,7 +721,7 @@
// inform Angular app once the updates have completed
if (stopRequests.length > 0) {
$.when.apply(window, stopRequests).always(function () {
- angularBridge.digest();
+ nfNgBridge.digest();
});
}
}
@@ -735,14 +735,14 @@
*/
enableTransmission: function (selection) {
var componentsToEnable = selection.filter(function (d) {
- return canvasUtils.canStartTransmitting(d3.select(this));
+ return nfCanvasUtils.canStartTransmitting(d3.select(this));
});
// start each selected component
componentsToEnable.each(function (d) {
// build the entity
var entity = {
- 'revision': client.getRevision(d),
+ 'revision': nfClient.getRevision(d),
'component': {
'id': d.id,
'transmitting': true
@@ -751,7 +751,7 @@
// start transmitting
updateResource(d.uri, entity).done(function (response) {
- remoteProcessGroup.set(response);
+ nfRemoteProcessGroup.set(response);
});
});
},
@@ -763,14 +763,14 @@
*/
disableTransmission: function (selection) {
var componentsToDisable = selection.filter(function (d) {
- return canvasUtils.canStopTransmitting(d3.select(this));
+ return nfCanvasUtils.canStopTransmitting(d3.select(this));
});
// stop each selected component
componentsToDisable.each(function (d) {
// build the entity
var entity = {
- 'revision': client.getRevision(d),
+ 'revision': nfClient.getRevision(d),
'component': {
'id': d.id,
'transmitting': false
@@ -778,7 +778,7 @@
};
updateResource(d.uri, entity).done(function (response) {
- remoteProcessGroup.set(response);
+ nfRemoteProcessGroup.set(response);
});
});
},
@@ -790,21 +790,21 @@
*/
showConfiguration: function (selection) {
if (selection.empty()) {
- processGroupConfiguration.showConfiguration(canvasUtils.getGroupId());
+ nfProcessGroupConfiguration.showConfiguration(nfCanvasUtils.getGroupId());
} else if (selection.size() === 1) {
var selectionData = selection.datum();
- if (canvasUtils.isProcessor(selection)) {
- processorConfiguration.showConfiguration(selection);
- } else if (canvasUtils.isLabel(selection)) {
- labelConfiguration.showConfiguration(selection);
- } else if (canvasUtils.isProcessGroup(selection)) {
- processGroupConfiguration.showConfiguration(selectionData.id);
- } else if (canvasUtils.isRemoteProcessGroup(selection)) {
- remoteProcessGroupConfiguration.showConfiguration(selection);
- } else if (canvasUtils.isInputPort(selection) || canvasUtils.isOutputPort(selection)) {
- portConfiguration.showConfiguration(selection);
- } else if (canvasUtils.isConnection(selection)) {
- connectionConfiguration.showConfiguration(selection);
+ if (nfCanvasUtils.isProcessor(selection)) {
+ nfProcessorConfiguration.showConfiguration(selection);
+ } else if (nfCanvasUtils.isLabel(selection)) {
+ nfLabelConfiguration.showConfiguration(selection);
+ } else if (nfCanvasUtils.isProcessGroup(selection)) {
+ nfProcessGroupConfiguration.showConfiguration(selectionData.id);
+ } else if (nfCanvasUtils.isRemoteProcessGroup(selection)) {
+ nfRemoteProcessGroupConfiguration.showConfiguration(selection);
+ } else if (nfCanvasUtils.isInputPort(selection) || nfCanvasUtils.isOutputPort(selection)) {
+ nfPortConfiguration.showConfiguration(selection);
+ } else if (nfCanvasUtils.isConnection(selection)) {
+ nfConnectionConfiguration.showConfiguration(selection);
}
}
},
@@ -816,26 +816,26 @@
*/
managePolicies: function(selection) {
if (selection.size() <= 1) {
- policyManagement.showComponentPolicy(selection);
+ nfPolicyManagement.showComponentPolicy(selection);
}
},
// Defines an action for showing component details (like configuration but read only).
showDetails: function (selection) {
if (selection.empty()) {
- processGroupConfiguration.showConfiguration(canvasUtils.getGroupId());
+ nfProcessGroupConfiguration.showConfiguration(nfCanvasUtils.getGroupId());
} else if (selection.size() === 1) {
var selectionData = selection.datum();
- if (canvasUtils.isProcessor(selection)) {
- processorDetails.showDetails(canvasUtils.getGroupId(), selectionData.id);
- } else if (canvasUtils.isProcessGroup(selection)) {
- processGroupConfiguration.showConfiguration(selectionData.id);
- } else if (canvasUtils.isRemoteProcessGroup(selection)) {
- remoteProcessGroupDetails.showDetails(selection);
- } else if (canvasUtils.isInputPort(selection) || canvasUtils.isOutputPort(selection)) {
- portDetails.showDetails(selection);
- } else if (canvasUtils.isConnection(selection)) {
- connectionDetails.showDetails(canvasUtils.getGroupId(), selectionData.id);
+ if (nfCanvasUtils.isProcessor(selection)) {
+ nfProcessorDetails.showDetails(nfCanvasUtils.getGroupId(), selectionData.id);
+ } else if (nfCanvasUtils.isProcessGroup(selection)) {
+ nfProcessGroupConfiguration.showConfiguration(selectionData.id);
+ } else if (nfCanvasUtils.isRemoteProcessGroup(selection)) {
+ nfRemoteProcessGroupDetails.showDetails(selection);
+ } else if (nfCanvasUtils.isInputPort(selection) || nfCanvasUtils.isOutputPort(selection)) {
+ nfPortDetails.showDetails(selection);
+ } else if (nfCanvasUtils.isConnection(selection)) {
+ nfConnectionDetails.showDetails(nfCanvasUtils.getGroupId(), selectionData.id);
}
}
},
@@ -846,10 +846,10 @@
* @param {selection} selection The selection
*/
showUsage: function (selection) {
- if (selection.size() === 1 && canvasUtils.isProcessor(selection)) {
+ if (selection.size() === 1 && nfCanvasUtils.isProcessor(selection)) {
var selectionData = selection.datum();
- shell.showPage('../nifi-docs/documentation?' + $.param({
- select: common.substringAfterLast(selectionData.component.type, '.')
+ nfShell.showPage('../nifi-docs/documentation?' + $.param({
+ select: nfCommon.substringAfterLast(selectionData.component.type, '.')
}));
}
},
@@ -862,14 +862,14 @@
showStats: function (selection) {
if (selection.size() === 1) {
var selectionData = selection.datum();
- if (canvasUtils.isProcessor(selection)) {
- statusHistory.showProcessorChart(canvasUtils.getGroupId(), selectionData.id);
- } else if (canvasUtils.isProcessGroup(selection)) {
- statusHistory.showProcessGroupChart(canvasUtils.getGroupId(), selectionData.id);
- } else if (canvasUtils.isRemoteProcessGroup(selection)) {
- statusHistory.showRemoteProcessGroupChart(canvasUtils.getGroupId(), selectionData.id);
- } else if (canvasUtils.isConnection(selection)) {
- statusHistory.showConnectionChart(canvasUtils.getGroupId(), selectionData.id);
+ if (nfCanvasUtils.isProcessor(selection)) {
+ nfStatusHistory.showProcessorChart(nfCanvasUtils.getGroupId(), selectionData.id);
+ } else if (nfCanvasUtils.isProcessGroup(selection)) {
+ nfStatusHistory.showProcessGroupChart(nfCanvasUtils.getGroupId(), selectionData.id);
+ } else if (nfCanvasUtils.isRemoteProcessGroup(selection)) {
+ nfStatusHistory.showRemoteProcessGroupChart(nfCanvasUtils.getGroupId(), selectionData.id);
+ } else if (nfCanvasUtils.isConnection(selection)) {
+ nfStatusHistory.showConnectionChart(nfCanvasUtils.getGroupId(), selectionData.id);
}
}
},
@@ -880,8 +880,8 @@
* @param {selection} selection The selection
*/
remotePorts: function (selection) {
- if (selection.size() === 1 && canvasUtils.isRemoteProcessGroup(selection)) {
- remoteProcessGroupPorts.showPorts(selection);
+ if (selection.size() === 1 && nfCanvasUtils.isRemoteProcessGroup(selection)) {
+ nfRemoteProcessGroupPorts.showPorts(selection);
}
},
@@ -889,7 +889,7 @@
* Reloads the status for the entire canvas (components and flow.)
*/
reload: function () {
- canvasUtils.reload({
+ nfCanvasUtils.reload({
'transition': true
});
},
@@ -900,15 +900,15 @@
* @param {selection} selection The selection containing the component to be removed
*/
'delete': function (selection) {
- if (common.isUndefined(selection) || selection.empty()) {
- dialog.showOkDialog({
+ if (nfCommon.isUndefined(selection) || selection.empty()) {
+ nfDialog.showOkDialog({
headerText: 'Reload',
dialogContent: 'No eligible components are selected. Please select the components to be deleted.'
});
} else {
if (selection.size() === 1) {
var selectionData = selection.datum();
- var revision = client.getRevision(selectionData);
+ var revision = nfClient.getRevision(selectionData);
$.ajax({
type: 'DELETE',
@@ -919,10 +919,10 @@
dataType: 'json'
}).done(function (response) {
// remove the component/connection in question
- canvasUtils.getComponentByType(selectionData.type).remove(selectionData.id);
+ nfCanvasUtils.getComponentByType(selectionData.type).remove(selectionData.id);
// if the selection is a connection, reload the source and destination accordingly
- if (canvasUtils.isConnection(selection) === false) {
+ if (nfCanvasUtils.isConnection(selection) === false) {
var connections = nfConnection.getComponentConnections(selectionData.id);
if (connections.length > 0) {
var ids = [];
@@ -936,10 +936,10 @@
}
// refresh the birdseye
- birdseye.refresh();
+ nfBirdseye.refresh();
// inform Angular app values have changed
- angularBridge.digest();
- }).fail(errorHandler.handleAjaxError);
+ nfNgBridge.digest();
+ }).fail(nfErrorHandler.handleAjaxError);
} else {
// create a snippet for the specified component and link to the data flow
var snippet = nfSnippet.marshal(selection);
@@ -975,7 +975,7 @@
// remove all the non connections in the snippet first
components.forEach(function (type, ids) {
if (type !== 'Connection') {
- canvasUtils.getComponentByType(type).remove(ids);
+ nfCanvasUtils.getComponentByType(type).remove(ids);
}
});
@@ -985,12 +985,12 @@
}
// refresh the birdseye
- birdseye.refresh();
+ nfBirdseye.refresh();
// inform Angular app values have changed
- angularBridge.digest();
- }).fail(errorHandler.handleAjaxError);
- }).fail(errorHandler.handleAjaxError);
+ nfNgBridge.digest();
+ }).fail(nfErrorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
}
}
},
@@ -1001,12 +1001,12 @@
* @param {type} selection
*/
emptyQueue: function (selection) {
- if (selection.size() !== 1 || !canvasUtils.isConnection(selection)) {
+ if (selection.size() !== 1 || !nfCanvasUtils.isConnection(selection)) {
return;
}
// prompt the user before emptying the queue
- dialog.showYesNoDialog({
+ nfDialog.showYesNoDialog({
headerText: 'Empty Queue',
dialogContent: 'Are you sure you want to empty this queue? All FlowFiles waiting at the time of the request will be removed.',
noText: 'Cancel',
@@ -1029,7 +1029,7 @@
// update the progress bar
var label = $('
').text(percentComplete + '%');
- (angularBridge.injector.get('$compile')($('
'))(angularBridge.rootScope)).appendTo(progressBar);
+ (nfNgBridge.injector.get('$compile')($('
'))(nfNgBridge.rootScope)).appendTo(progressBar);
progressBar.append(label);
};
@@ -1063,7 +1063,7 @@
nfConnection.reloadStatus(connection.id);
// clean up as appropriate
- if (common.isDefinedAndNotNull(dropRequest)) {
+ if (nfCommon.isDefinedAndNotNull(dropRequest)) {
$.ajax({
type: 'DELETE',
url: dropRequest.uri,
@@ -1087,12 +1087,12 @@
$('
').text(' were removed from the queue.').appendTo(results);
// if this request failed so the error
- if (common.isDefinedAndNotNull(dropRequest.failureReason)) {
+ if (nfCommon.isDefinedAndNotNull(dropRequest.failureReason)) {
$('
').text(dropRequest.failureReason).appendTo(results);
}
// display the results
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Empty Queue',
dialogContent: results
});
@@ -1101,7 +1101,7 @@
});
} else {
// nothing was removed
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Empty Queue',
dialogContent: 'No FlowFiles were removed.'
});
@@ -1145,7 +1145,7 @@
processDropRequest(nextDelay);
}).fail(function (xhr, status, error) {
if (xhr.status === 403) {
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
} else {
completeDropRequest()
}
@@ -1170,7 +1170,7 @@
processDropRequest(1);
}).fail(function (xhr, status, error) {
if (xhr.status === 403) {
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
} else {
completeDropRequest()
}
@@ -1185,7 +1185,7 @@
* @param {selection} selection
*/
listQueue: function (selection) {
- if (selection.size() !== 1 || !canvasUtils.isConnection(selection)) {
+ if (selection.size() !== 1 || !nfCanvasUtils.isConnection(selection)) {
return;
}
@@ -1193,7 +1193,7 @@
var connection = selection.datum();
// list the flow files in the specified connection
- queueListing.listQueue(connection);
+ nfQueueListing.listQueue(connection);
},
/**
@@ -1202,7 +1202,7 @@
* @param {selection} selection
*/
viewState: function (selection) {
- if (selection.size() !== 1 || !canvasUtils.isProcessor(selection)) {
+ if (selection.size() !== 1 || !nfCanvasUtils.isProcessor(selection)) {
return;
}
@@ -1210,7 +1210,7 @@
var processor = selection.datum();
// view the state for the selected processor
- componentState.showState(processor, canvasUtils.isConfigurable(selection));
+ nfComponentState.showState(processor, nfCanvasUtils.isConfigurable(selection));
},
/**
@@ -1221,8 +1221,8 @@
alignVertical: function (selection) {
var updates = d3.map();
// ensure every component is writable
- if (canvasUtils.canModify(selection) === false) {
- dialog.showOkDialog({
+ if (nfCanvasUtils.canModify(selection) === false) {
+ nfDialog.showOkDialog({
headerText: 'Component Position',
dialogContent: 'Must be authorized to modify every component selected.'
});
@@ -1257,28 +1257,28 @@
$.each(connections, function(_, connection) {
var connectionSelection = d3.select('#id-' + connection.id);
- if (!updates.has(connection.id) && canvasUtils.getConnectionSourceComponentId(connection) === canvasUtils.getConnectionDestinationComponentId(connection)) {
+ if (!updates.has(connection.id) && nfCanvasUtils.getConnectionSourceComponentId(connection) === nfCanvasUtils.getConnectionDestinationComponentId(connection)) {
// this connection is self looping and hasn't been updated by the delta yet
- var connectionUpdate = draggable.updateConnectionPosition(nfConnection.get(connection.id), delta);
+ var connectionUpdate = nfDraggable.updateConnectionPosition(nfConnection.get(connection.id), delta);
if (connectionUpdate !== null) {
updates.set(connection.id, connectionUpdate);
}
- } else if (!updates.has(connection.id) && connectionSelection.classed('selected') && canvasUtils.canModify(connectionSelection)) {
+ } else if (!updates.has(connection.id) && connectionSelection.classed('selected') && nfCanvasUtils.canModify(connectionSelection)) {
// this is a selected connection that hasn't been updated by the delta yet
- if (canvasUtils.getConnectionSourceComponentId(connection) === d.id || !isSourceSelected(connection, selection)) {
+ if (nfCanvasUtils.getConnectionSourceComponentId(connection) === d.id || !isSourceSelected(connection, selection)) {
// the connection is either outgoing or incoming when the source of the connection is not part of the selection
- var connectionUpdate = draggable.updateConnectionPosition(nfConnection.get(connection.id), delta);
+ var connectionUpdate = nfDraggable.updateConnectionPosition(nfConnection.get(connection.id), delta);
if (connectionUpdate !== null) {
updates.set(connection.id, connectionUpdate);
}
}
}
});
- updates.set(d.id, draggable.updateComponentPosition(d, delta));
+ updates.set(d.id, nfDraggable.updateComponentPosition(d, delta));
}
}
});
- draggable.refreshConnections(updates);
+ nfDraggable.refreshConnections(updates);
},
/**
@@ -1289,8 +1289,8 @@
alignHorizontal: function (selection) {
var updates = d3.map();
// ensure every component is writable
- if (canvasUtils.canModify(selection) === false) {
- dialog.showOkDialog({
+ if (nfCanvasUtils.canModify(selection) === false) {
+ nfDialog.showOkDialog({
headerText: 'Component Position',
dialogContent: 'Must be authorized to modify every component selected.'
});
@@ -1327,29 +1327,29 @@
$.each(connections, function(_, connection) {
var connectionSelection = d3.select('#id-' + connection.id);
- if (!updates.has(connection.id) && canvasUtils.getConnectionSourceComponentId(connection) === canvasUtils.getConnectionDestinationComponentId(connection)) {
+ if (!updates.has(connection.id) && nfCanvasUtils.getConnectionSourceComponentId(connection) === nfCanvasUtils.getConnectionDestinationComponentId(connection)) {
// this connection is self looping and hasn't been updated by the delta yet
- var connectionUpdate = draggable.updateConnectionPosition(nfConnection.get(connection.id), delta);
+ var connectionUpdate = nfDraggable.updateConnectionPosition(nfConnection.get(connection.id), delta);
if (connectionUpdate !== null) {
updates.set(connection.id, connectionUpdate);
}
- } else if (!updates.has(connection.id) && connectionSelection.classed('selected') && canvasUtils.canModify(connectionSelection)) {
+ } else if (!updates.has(connection.id) && connectionSelection.classed('selected') && nfCanvasUtils.canModify(connectionSelection)) {
// this is a selected connection that hasn't been updated by the delta yet
- if (canvasUtils.getConnectionSourceComponentId(connection) === d.id || !isSourceSelected(connection, selection)) {
+ if (nfCanvasUtils.getConnectionSourceComponentId(connection) === d.id || !isSourceSelected(connection, selection)) {
// the connection is either outgoing or incoming when the source of the connection is not part of the selection
- var connectionUpdate = draggable.updateConnectionPosition(nfConnection.get(connection.id), delta);
+ var connectionUpdate = nfDraggable.updateConnectionPosition(nfConnection.get(connection.id), delta);
if (connectionUpdate !== null) {
updates.set(connection.id, connectionUpdate);
}
}
}
});
- updates.set(d.id, draggable.updateComponentPosition(d, delta));
+ updates.set(d.id, nfDraggable.updateComponentPosition(d, delta));
}
}
});
- draggable.refreshConnections(updates);
+ nfDraggable.refreshConnections(updates);
},
/**
@@ -1358,16 +1358,16 @@
* @param {type} selection The selection
*/
fillColor: function (selection) {
- if (canvasUtils.isColorable(selection)) {
+ if (nfCanvasUtils.isColorable(selection)) {
// we know that the entire selection is processors or labels... this
// checks if the first item is a processor... if true, all processors
- var allProcessors = canvasUtils.isProcessor(selection);
+ var allProcessors = nfCanvasUtils.isProcessor(selection);
var color;
if (allProcessors) {
- color = processor.defaultFillColor();
+ color = nfProcessor.defaultFillColor();
} else {
- color = label.defaultColor();
+ color = nfLabel.defaultColor();
}
// if there is only one component selected, get its color otherwise use default
@@ -1375,7 +1375,7 @@
var selectionData = selection.datum();
// use the specified color if appropriate
- if (common.isDefinedAndNotNull(selectionData.component.style['background-color'])) {
+ if (nfCommon.isDefinedAndNotNull(selectionData.component.style['background-color'])) {
color = selectionData.component.style['background-color'];
}
}
@@ -1401,7 +1401,7 @@
* Groups the currently selected components into a new group.
*/
group: function () {
- var selection = canvasUtils.getSelection();
+ var selection = nfCanvasUtils.getSelection();
// ensure that components have been specified
if (selection.empty()) {
@@ -1409,12 +1409,12 @@
}
// determine the origin of the bounding box for the selected components
- var origin = canvasUtils.getOrigin(selection);
+ var origin = nfCanvasUtils.getOrigin(selection);
var pt = {'x': origin.x, 'y': origin.y};
- $.when(angularBridge.injector.get('groupComponent').promptForGroupName(pt)).done(function (processGroup) {
+ $.when(nfNgBridge.injector.get('groupComponent').promptForGroupName(pt)).done(function (processGroup) {
var group = d3.select('#id-' + processGroup.id);
- canvasUtils.moveComponents(selection, group);
+ nfCanvasUtils.moveComponents(selection, group);
});
},
@@ -1422,7 +1422,7 @@
* Moves the currently selected component into the current parent group.
*/
moveIntoParent: function () {
- var selection = canvasUtils.getSelection();
+ var selection = nfCanvasUtils.getSelection();
// ensure that components have been specified
if (selection.empty()) {
@@ -1430,7 +1430,7 @@
}
// move the current selection into the parent group
- canvasUtils.moveComponentsToParent(selection);
+ nfCanvasUtils.moveComponentsToParent(selection);
},
/**
@@ -1445,7 +1445,7 @@
* are selected, a template of the entire canvas is made.
*/
template: function () {
- var selection = canvasUtils.getSelection();
+ var selection = nfCanvasUtils.getSelection();
// if no components are selected, use the entire graph
if (selection.empty()) {
@@ -1454,7 +1454,7 @@
// ensure that components have been specified
if (selection.empty()) {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Create Template',
dialogContent: "The current selection is not valid to create a template."
});
@@ -1462,11 +1462,11 @@
}
// remove dangling edges (where only the source or destination is also selected)
- selection = canvasUtils.trimDanglingEdges(selection);
+ selection = nfCanvasUtils.trimDanglingEdges(selection);
// ensure that components specified are valid
if (selection.empty()) {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Create Template',
dialogContent: "The current selection is not valid to create a template."
});
@@ -1487,8 +1487,8 @@
var templateName = $('#new-template-name').val();
// ensure the template name is not blank
- if (common.isBlank(templateName)) {
- dialog.showOkDialog({
+ if (nfCommon.isBlank(templateName)) {
+ nfDialog.showOkDialog({
headerText: 'Create Template',
dialogContent: "The template name cannot be blank."
});
@@ -1515,22 +1515,22 @@
// create the template
$.ajax({
type: 'POST',
- url: config.urls.api + '/process-groups/' + encodeURIComponent(canvasUtils.getGroupId()) + '/templates',
+ url: config.urls.api + '/process-groups/' + encodeURIComponent(nfCanvasUtils.getGroupId()) + '/templates',
data: JSON.stringify(createSnippetEntity),
dataType: 'json',
contentType: 'application/json'
}).done(function () {
// show the confirmation dialog
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Create Template',
- dialogContent: "Template '" + common.escapeHtml(templateName) + "' was successfully created."
+ dialogContent: "Template '" + nfCommon.escapeHtml(templateName) + "' was successfully created."
});
}).always(function () {
// clear the template dialog fields
$('#new-template-name').val('');
$('#new-template-description').val('');
- }).fail(errorHandler.handleAjaxError);
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
}
}
}, {
@@ -1566,10 +1566,10 @@
}
// determine the origin of the bounding box of the selection
- var origin = canvasUtils.getOrigin(selection);
+ var origin = nfCanvasUtils.getOrigin(selection);
// copy the snippet details
- clipboard.copy({
+ nfClipboard.copy({
snippet: nfSnippet.marshal(selection),
origin: origin
});
@@ -1582,13 +1582,13 @@
* @param {obj} evt The mouse event
*/
paste: function (selection, evt) {
- if (common.isDefinedAndNotNull(evt)) {
+ if (nfCommon.isDefinedAndNotNull(evt)) {
// get the current scale and translation
- var scale = canvasUtils.scaleCanvasView();
- var translate = canvasUtils.translateCanvasView();
+ var scale = nfCanvasUtils.scaleCanvasView();
+ var translate = nfCanvasUtils.translateCanvasView();
var mouseX = evt.pageX;
- var mouseY = evt.pageY - canvasUtils.getCanvasOffset();
+ var mouseY = evt.pageY - nfCanvasUtils.getCanvasOffset();
// adjust the x and y coordinates accordingly
var x = (mouseX / scale) - (translate[0] / scale);
@@ -1602,7 +1602,7 @@
}
// perform the paste
- clipboard.paste().done(function (data) {
+ nfClipboard.paste().done(function (data) {
var copySnippet = $.Deferred(function (deferred) {
var reject = function (xhr, status, error) {
deferred.reject(xhr.responseText);
@@ -1615,7 +1615,7 @@
var snippetOrigin = data['origin'];
// determine the appropriate origin
- if (!common.isDefinedAndNotNull(origin)) {
+ if (!nfCommon.isDefinedAndNotNull(origin)) {
snippetOrigin.x += 25;
snippetOrigin.y += 25;
origin = snippetOrigin;
@@ -1626,24 +1626,24 @@
var snippetFlow = copyResponse.flow;
// update the graph accordingly
- graph.add(snippetFlow, {
+ nfGraph.add(snippetFlow, {
'selectAll': true
});
// update component visibility
- graph.updateVisibility();
+ nfGraph.updateVisibility();
// refresh the birdseye/toolbar
- birdseye.refresh();
+ nfBirdseye.refresh();
}).fail(function () {
// an error occured while performing the copy operation, reload the
// graph in case it was a partial success
- canvasUtils.reload().done(function () {
+ nfCanvasUtils.reload().done(function () {
// update component visibility
- graph.updateVisibility();
+ nfGraph.updateVisibility();
// refresh the birdseye/toolbar
- birdseye.refresh();
+ nfBirdseye.refresh();
});
}).fail(reject);
}).fail(reject);
@@ -1657,9 +1657,9 @@
message = responseText;
}
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Paste Error',
- dialogContent: common.escapeHtml(message)
+ dialogContent: nfCommon.escapeHtml(message)
});
});
});
@@ -1671,7 +1671,7 @@
* @param {selection} selection
*/
toFront: function (selection) {
- if (selection.size() !== 1 || !canvasUtils.isConnection(selection)) {
+ if (selection.size() !== 1 || !nfCanvasUtils.isConnection(selection)) {
return;
}
@@ -1693,7 +1693,7 @@
// build the connection entity
var connectionEntity = {
- 'revision': client.getRevision(connection),
+ 'revision': nfClient.getRevision(connection),
'component': {
'id': connection.id,
'zIndex': zIndex
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-birdseye.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-birdseye.js
index 5d9f419e6b..4355e05a7b 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-birdseye.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-birdseye.js
@@ -21,19 +21,17 @@
if (typeof define === 'function' && define.amd) {
define(['jquery',
'd3',
- 'nf.ErrorHandler',
'nf.Common',
'nf.CanvasUtils',
'nf.ContextMenu',
'nf.Label'],
- function ($, d3, errorHandler, common, canvasUtils, contextMenu, label) {
- return (nf.Birdseye = factory($, d3, errorHandler, common, canvasUtils, contextMenu, label));
+ function ($, d3, nfCommon, nfCanvasUtils, nfContextMenu, nfLabel) {
+ return (nf.Birdseye = factory($, d3, nfCommon, nfCanvasUtils, nfContextMenu, nfLabel));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.Birdseye =
factory(require('jquery'),
require('d3'),
- require('nf.ErrorHandler'),
require('nf.Common'),
require('nf.CanvasUtils'),
require('nf.ContextMenu'),
@@ -41,13 +39,12 @@
} else {
nf.Birdseye = factory(root.$,
root.d3,
- root.nf.ErrorHandler,
root.nf.Common,
root.nf.CanvasUtils,
root.nf.ContextMenu,
root.nf.Label);
}
-}(this, function ($, d3, errorHandler, common, canvasUtils, contextMenu, label) {
+}(this, function ($, d3, nfCommon, nfCanvasUtils, nfContextMenu, nfLabel) {
'use strict';
var nfGraph;
@@ -56,8 +53,8 @@
// refreshes the birdseye
var refresh = function (components) {
- var translate = canvasUtils.translateCanvasView();
- var scale = canvasUtils.scaleCanvasView();
+ var translate = nfCanvasUtils.translateCanvasView();
+ var scale = nfCanvasUtils.scaleCanvasView();
// scale the translation
translate = [translate[0] / scale, translate[1] / scale];
@@ -65,7 +62,7 @@
// get the bounding box for the graph and convert into canvas space
var graphBox = d3.select('#canvas').node().getBoundingClientRect();
var graphLeft = (graphBox.left / scale) - translate[0];
- var graphTop = ((graphBox.top - canvasUtils.getCanvasOffset()) / scale) - translate[1];
+ var graphTop = ((graphBox.top - nfCanvasUtils.getCanvasOffset()) / scale) - translate[1];
var graphRight = (graphBox.right / scale) - translate[0];
var graphBottom = (graphBox.bottom / scale) - translate[1];
@@ -181,11 +178,11 @@
// labels
$.each(components.labels, function (_, d) {
- var color = label.defaultColor();
+ var color = nfLabel.defaultColor();
if (d.permissions.canRead) {
// use the specified color if appropriate
- if (common.isDefinedAndNotNull(d.component.style['background-color'])) {
+ if (nfCommon.isDefinedAndNotNull(d.component.style['background-color'])) {
color = d.component.style['background-color'];
}
}
@@ -224,7 +221,7 @@
if (d.permissions.canRead) {
// use the specified color if appropriate
- if (common.isDefinedAndNotNull(d.component.style['background-color'])) {
+ if (nfCommon.isDefinedAndNotNull(d.component.style['background-color'])) {
color = d.component.style['background-color'];
//if the background color is #ffffff use the default instead
@@ -245,8 +242,14 @@
var visible = true;
var nfBirdseye = {
- init: function (graph) {
- nfGraph = graph;
+
+ /**
+ * Initializes of the graph controller.
+ *
+ * @param nfGraphRef The nfConnectable module.
+ */
+ init: function (nfGraphRef) {
+ nfGraph = nfGraphRef;
var birdseye = $('#birdseye');
@@ -278,7 +281,7 @@
})
.on('dragstart', function () {
// hide the context menu
- contextMenu.hide();
+ nfContextMenu.hide();
})
.on('drag', function (d) {
d.x += d3.event.dx;
@@ -289,17 +292,17 @@
return 'translate(' + d.x + ', ' + d.y + ')';
});
// get the current transformation
- var scale = canvasUtils.scaleCanvasView();
- var translate = canvasUtils.translateCanvasView();
+ var scale = nfCanvasUtils.scaleCanvasView();
+ var translate = nfCanvasUtils.translateCanvasView();
// update the translation according to the delta
translate = [(-d3.event.dx * scale) + translate[0], (-d3.event.dy * scale) + translate[1]];
// record the current transforms
- canvasUtils.translateCanvasView(translate);
+ nfCanvasUtils.translateCanvasView(translate);
// refresh the canvas
- canvasUtils.refreshCanvasView({
+ nfCanvasUtils.refreshCanvasView({
persist: false,
transition: false,
refreshComponents: false,
@@ -311,7 +314,7 @@
nfGraph.updateVisibility();
// persist the users view
- canvasUtils.persistUserView();
+ nfCanvasUtils.persistUserView();
// refresh the birdseye
nfBirdseye.refresh();
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-bootstrap.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-bootstrap.js
index 3669495da8..2d98e08ef4 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-bootstrap.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-bootstrap.js
@@ -79,8 +79,8 @@
'nf.ng.Canvas.OperateCtrl',
'nf.ng.BreadcrumbsDirective',
'nf.ng.DraggableDirective'],
- function ($, angular, common, canvasUtils, errorHandler, client, clusterSummary, dialog, storage, canvas, graph, contextMenu, shell, settings, actions, snippet, queueListing, componentState, draggable, connectable, statusHistory, birdseye, connectionConfiguration, controllerService, reportingTask, policyManagement, processorConfiguration, processGroupConfiguration, controllerServices, remoteProcessGroupConfiguration, remoteProcessGroupPorts, portConfiguration, labelConfiguration, processorDetails, portDetails, connectionDetails, remoteProcessGroupDetails, nfGoto, angularBridge, appCtrl, appConfig, serviceProvider, breadcrumbsCtrl, headerCtrl, flowStatusCtrl, globalMenuCtrl, toolboxCtrl, processorComponent, inputPortComponent, outputPortComponent, processGroupComponent, remoteProcessGroupComponent, funnelComponent, templateComponent, labelComponent, graphControlsCtrl, navigateCtrl, operateCtrl, breadcrumbsDirective, draggableDirective) {
- return factory($, angular, common, canvasUtils, errorHandler, client, clusterSummary, dialog, storage, canvas, graph, contextMenu, shell, settings, actions, snippet, queueListing, componentState, draggable, connectable, statusHistory, birdseye, connectionConfiguration, controllerService, reportingTask, policyManagement, processorConfiguration, processGroupConfiguration, controllerServices, remoteProcessGroupConfiguration, remoteProcessGroupPorts, portConfiguration, labelConfiguration, processorDetails, portDetails, connectionDetails, remoteProcessGroupDetails, nfGoto, angularBridge, appCtrl, appConfig, serviceProvider, breadcrumbsCtrl, headerCtrl, flowStatusCtrl, globalMenuCtrl, toolboxCtrl, processorComponent, inputPortComponent, outputPortComponent, processGroupComponent, remoteProcessGroupComponent, funnelComponent, templateComponent, labelComponent, graphControlsCtrl, navigateCtrl, operateCtrl, breadcrumbsDirective, draggableDirective);
+ function ($, angular, nfCommon, nfCanvasUtils, nfErrorHandler, nfClient, nfClusterSummary, nfDialog, nfStorage, nfCanvas, nfGraph, nfContextMenu, nfShell, nfSettings, nfActions, nfSnippet, nfQueueListing, nfComponentState, nfDraggable, nfConnectable, nfStatusHistory, nfBirdseye, nfConnectionConfiguration, nfControllerService, nfReportingTask, nfPolicyManagement, nfProcessorConfiguration, nfProcessGroupConfiguration, nfControllerServices, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupPorts, nfPortConfiguration, nfLabelConfiguration, nfProcessorDetails, nfPortDetails, nfConnectionDetails, nfRemoteProcessGroupDetails, nfGoto, nfNgBridge, appCtrl, appConfig, serviceProvider, breadcrumbsCtrl, headerCtrl, flowStatusCtrl, globalMenuCtrl, toolboxCtrl, processorComponent, inputPortComponent, outputPortComponent, processGroupComponent, remoteProcessGroupComponent, funnelComponent, templateComponent, labelComponent, graphControlsCtrl, navigateCtrl, operateCtrl, breadcrumbsDirective, draggableDirective) {
+ return factory($, angular, nfCommon, nfCanvasUtils, nfErrorHandler, nfClient, nfClusterSummary, nfDialog, nfStorage, nfCanvas, nfGraph, nfContextMenu, nfShell, nfSettings, nfActions, nfSnippet, nfQueueListing, nfComponentState, nfDraggable, nfConnectable, nfStatusHistory, nfBirdseye, nfConnectionConfiguration, nfControllerService, nfReportingTask, nfPolicyManagement, nfProcessorConfiguration, nfProcessGroupConfiguration, nfControllerServices, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupPorts, nfPortConfiguration, nfLabelConfiguration, nfProcessorDetails, nfPortDetails, nfConnectionDetails, nfRemoteProcessGroupDetails, nfGoto, nfNgBridge, appCtrl, appConfig, serviceProvider, breadcrumbsCtrl, headerCtrl, flowStatusCtrl, globalMenuCtrl, toolboxCtrl, processorComponent, inputPortComponent, outputPortComponent, processGroupComponent, remoteProcessGroupComponent, funnelComponent, templateComponent, labelComponent, graphControlsCtrl, navigateCtrl, operateCtrl, breadcrumbsDirective, draggableDirective);
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = factory(require('jquery'),
@@ -205,7 +205,7 @@
root.nf.ng.BreadcrumbsDirective,
root.nf.ng.DraggableDirective);
}
-}(this, function ($, angular, common, canvasUtils, errorHandler, client, clusterSummary, dialog, storage, canvas, graph, contextMenu, shell, settings, actions, snippet, queueListing, componentState, draggable, connectable, statusHistory, birdseye, connectionConfiguration, controllerService, reportingTask, policyManagement, processorConfiguration, processGroupConfiguration, controllerServices, remoteProcessGroupConfiguration, remoteProcessGroupPorts, portConfiguration, labelConfiguration, processorDetails, portDetails, connectionDetails, remoteProcessGroupDetails, nfGoto, angularBridge, appCtrl, appConfig, serviceProvider, breadcrumbsCtrl, headerCtrl, flowStatusCtrl, globalMenuCtrl, toolboxCtrl, processorComponent, inputPortComponent, outputPortComponent, processGroupComponent, remoteProcessGroupComponent, funnelComponent, templateComponent, labelComponent, graphControlsCtrl, navigateCtrl, operateCtrl, breadcrumbsDirective, draggableDirective) {
+}(this, function ($, angular, nfCommon, nfCanvasUtils, nfErrorHandler, nfClient, nfClusterSummary, nfDialog, nfStorage, nfCanvas, nfGraph, nfContextMenu, nfShell, nfSettings, nfActions, nfSnippet, nfQueueListing, nfComponentState, nfDraggable, nfConnectable, nfStatusHistory, nfBirdseye, nfConnectionConfiguration, nfControllerService, nfReportingTask, nfPolicyManagement, nfProcessorConfiguration, nfProcessGroupConfiguration, nfControllerServices, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupPorts, nfPortConfiguration, nfLabelConfiguration, nfProcessorDetails, nfPortDetails, nfConnectionDetails, nfRemoteProcessGroupDetails, nfGoto, nfNgBridge, appCtrl, appConfig, serviceProvider, breadcrumbsCtrl, headerCtrl, flowStatusCtrl, globalMenuCtrl, toolboxCtrl, processorComponent, inputPortComponent, outputPortComponent, processGroupComponent, remoteProcessGroupComponent, funnelComponent, templateComponent, labelComponent, graphControlsCtrl, navigateCtrl, operateCtrl, breadcrumbsDirective, draggableDirective) {
var config = {
urls: {
@@ -217,7 +217,7 @@
* Bootstrap the canvas application.
*/
$(document).ready(function () {
- if (canvas.SUPPORTS_SVG) {
+ if (nfCanvas.SUPPORTS_SVG) {
//Create Angular App
var app = angular.module('ngCanvasApp', ['ngResource', 'ngRoute', 'ngMaterial', 'ngMessages']);
@@ -283,17 +283,17 @@
// initialize the canvas utils and invert control of the canvas,
// actions, snippet, birdseye, and graph
- canvasUtils.init(canvas, actions, snippet, birdseye, graph);
+ nfCanvasUtils.init(nfCanvas, nfActions, nfSnippet, nfBirdseye, nfGraph);
//Manually Boostrap Angular App
- angularBridge.injector = angular.bootstrap($('body'), ['ngCanvasApp'], {strictDi: true});
+ nfNgBridge.injector = angular.bootstrap($('body'), ['ngCanvasApp'], {strictDi: true});
// initialize the NiFi
- var userXhr = canvas.init();
+ var userXhr = nfCanvas.init();
userXhr.done(function () {
// load the client id
- var clientXhr = client.init();
+ var clientXhr = nfClient.init();
// get the controller config to register the status poller
var configXhr = $.ajax({
@@ -303,89 +303,89 @@
});
// ensure the config requests are loaded
- $.when(configXhr, clusterSummary.loadClusterSummary(), userXhr, clientXhr).done(function (configResult) {
+ $.when(configXhr, nfClusterSummary.loadClusterSummary(), userXhr, clientXhr).done(function (configResult) {
var configResponse = configResult[0];
// calculate the canvas offset
var canvasContainer = $('#canvas-container');
- canvas.CANVAS_OFFSET = canvasContainer.offset().top;
+ nfCanvas.CANVAS_OFFSET = canvasContainer.offset().top;
// get the config details
var configDetails = configResponse.flowConfiguration;
// show disconnected message on load if necessary
- if (clusterSummary.isClustered() && !clusterSummary.isConnectedToCluster()) {
- dialog.showDisconnectedFromClusterMessage();
+ if (nfClusterSummary.isClustered() && !nfClusterSummary.isConnectedToCluster()) {
+ nfDialog.showDisconnectedFromClusterMessage();
}
// get the auto refresh interval
var autoRefreshIntervalSeconds = parseInt(configDetails.autoRefreshIntervalSeconds, 10);
// record whether we can configure the authorizer
- canvas.setConfigurableAuthorizer(configDetails.supportsConfigurableAuthorizer);
+ nfCanvas.setConfigurableAuthorizer(configDetails.supportsConfigurableAuthorizer);
- // init storage
- storage.init();
+ // init nfStorage
+ nfStorage.init();
// initialize the application
- canvas.initCanvas();
- canvas.View.init();
+ nfCanvas.initCanvas();
+ nfCanvas.View.init();
// initialize the context menu and invert control of the actions
- contextMenu.init(actions);
+ nfContextMenu.init(nfActions);
// initialize the shell and invert control of the context menu
- shell.init(contextMenu);
- angularBridge.injector.get('headerCtrl').init();
- settings.init();
- actions.init();
- queueListing.init();
- componentState.init();
+ nfShell.init(nfContextMenu);
+ nfNgBridge.injector.get('headerCtrl').init();
+ nfSettings.init();
+ nfActions.init();
+ nfQueueListing.init();
+ nfComponentState.init();
// initialize the component behaviors
- draggable.init();
- connectable.init();
+ nfDraggable.init();
+ nfConnectable.init();
// initialize the chart
- statusHistory.init(configDetails.timeOffset);
+ nfStatusHistory.init(configDetails.timeOffset);
// initialize the birdseye
- birdseye.init(graph);
+ nfBirdseye.init(nfGraph);
// initialize the connection config and invert control of the birdseye and graph
- connectionConfiguration.init(birdseye, graph);
- controllerService.init();
- reportingTask.init(settings);
- policyManagement.init();
- processorConfiguration.init();
+ nfConnectionConfiguration.init(nfBirdseye, nfGraph);
+ nfControllerService.init();
+ nfReportingTask.init(nfSettings);
+ nfPolicyManagement.init();
+ nfProcessorConfiguration.init();
// initialize the PG config and invert control of the controllerServices
- processGroupConfiguration.init(controllerServices);
- remoteProcessGroupConfiguration.init();
- remoteProcessGroupPorts.init();
- portConfiguration.init();
- labelConfiguration.init();
- processorDetails.init(true);
- portDetails.init();
- connectionDetails.init();
- remoteProcessGroupDetails.init();
+ nfProcessGroupConfiguration.init(nfControllerServices);
+ nfRemoteProcessGroupConfiguration.init();
+ nfRemoteProcessGroupPorts.init();
+ nfPortConfiguration.init();
+ nfLabelConfiguration.init();
+ nfProcessorDetails.init(true);
+ nfPortDetails.init();
+ nfConnectionDetails.init();
+ nfRemoteProcessGroupDetails.init();
nfGoto.init();
- graph.init().done(function () {
- angularBridge.injector.get('graphControlsCtrl').init();
+ nfGraph.init().done(function () {
+ nfNgBridge.injector.get('graphControlsCtrl').init();
// determine the split between the polling
var pollingSplit = autoRefreshIntervalSeconds / 2;
// register the polling
setTimeout(function () {
- canvas.startPolling(autoRefreshIntervalSeconds);
+ nfCanvas.startPolling(autoRefreshIntervalSeconds);
}, pollingSplit * 1000);
// hide the splash screen
- canvas.hideSplash();
- }).fail(errorHandler.handleAjaxError);
- }).fail(errorHandler.handleAjaxError);
- }).fail(errorHandler.handleAjaxError);
+ nfCanvas.hideSplash();
+ }).fail(nfErrorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
//initialize toolbox components tooltips
- $('.component-button').qtip($.extend({}, common.config.tooltipConfig));
+ $('.component-button').qtip($.extend({}, nfCommon.config.tooltipConfig));
} else {
$('#message-title').text('Unsupported Browser');
$('#message-content').text('Flow graphs are shown using SVG. Please use a browser that supports rendering SVG.');
@@ -394,7 +394,7 @@
$('#message-pane').show();
// hide the splash screen
- canvas.hideSplash();
+ nfCanvas.hideSplash();
}
});
}));
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-error-handler.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-error-handler.js
index a4879d20df..05519a320a 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-error-handler.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-error-handler.js
@@ -23,8 +23,8 @@
'nf.Common',
'nf.Canvas',
'nf.ContextMenu'],
- function (ajaxErrorHandler, common, canvas, contextMenu) {
- return (nf.ErrorHandler = factory(ajaxErrorHandler, common, canvas, contextMenu));
+ function (ajaxErrorHandler, nfCommon, nfCanvas, nfContextMenu) {
+ return (nf.ErrorHandler = factory(ajaxErrorHandler, nfCommon, nfCanvas, nfContextMenu));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ErrorHandler =
@@ -38,7 +38,7 @@
root.nf.Canvas,
root.nf.ContextMenu);
}
-}(this, function (ajaxErrorHandler, common, canvas, contextMenu) {
+}(this, function (ajaxErrorHandler, nfCommon, nfCanvas, nfContextMenu) {
'use strict';
return {
@@ -52,21 +52,21 @@
*/
handleAjaxError: function (xhr, status, error) {
ajaxErrorHandler.handleAjaxError(xhr, status, error);
- common.showLogoutLink();
+ nfCommon.showLogoutLink();
// hide the splash screen if required
if ($('#splash').is(':visible')) {
- canvas.hideSplash();
+ nfCanvas.hideSplash();
}
// hide the context menu
- contextMenu.hide();
+ nfContextMenu.hide();
// shut off the auto refresh
- canvas.stopPolling();
+ nfCanvas.stopPolling();
// allow page refresh with ctrl-r
- canvas.disableRefreshHotKey();
+ nfCanvas.disableRefreshHotKey();
}
};
}));
\ No newline at end of file
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js
index 3e09a0e115..8e96dfa0ef 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js
@@ -24,8 +24,8 @@
'nf.Dialog',
'nf.Clipboard',
'nf.Storage'],
- function (d3, $, common, dialog, clipboard, storage) {
- return (nf.CanvasUtils = factory(d3, $, common, dialog, clipboard, storage));
+ function (d3, $, nfCommon, nfDialog, nfClipboard, nfStorage) {
+ return (nf.CanvasUtils = factory(d3, $, nfCommon, nfDialog, nfClipboard, nfStorage));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.CanvasUtils = factory(
@@ -44,7 +44,7 @@
root.nf.Clipboard,
root.nf.Storage);
}
-}(this, function (d3, $, common, dialog, clipboard, storage) {
+}(this, function (d3, $, nfCommon, nfDialog, nfClipboard, nfStorage) {
'use strict';
var nfCanvas;
@@ -116,10 +116,10 @@
nfBirdseye.refresh();
deferred.resolve();
- }).fail(common.handleAjaxError).fail(function () {
+ }).fail(nfCommon.handleAjaxError).fail(function () {
deferred.reject();
});
- }).fail(common.handleAjaxError).fail(function () {
+ }).fail(nfCommon.handleAjaxError).fail(function () {
deferred.reject();
});
}).promise();
@@ -130,18 +130,18 @@
/**
* Initialize the canvas utils.
*
- * @param canvas The reference to the canvas controller.
- * @param actions The reference to the actions controller.
- * @param snippet The reference to the snippet controller.
- * @param birdseye The reference to the birdseye controller.
- * @param graph The reference to the graph controller.
+ * @param nfCanvasRef The nfCanvas module.
+ * @param nfActionsRef The nfActions module.
+ * @param nfSnippetRef The nfSnippet module.
+ * @param nfBirdseyeRef The nfBirdseye module.
+ * @param nfGraphRef The nfGraph module.
*/
- init: function(canvas, actions, snippet, birdseye, graph){
- nfCanvas = canvas;
- nfActions = actions;
- nfSnippet = snippet;
- nfBirdseye = birdseye;
- nfGraph = graph;
+ init: function(nfCanvasRef, nfActionsRef, nfSnippetRef, nfBirdseyeRef, nfGraphRef){
+ nfCanvas = nfCanvasRef;
+ nfActions = nfActionsRef;
+ nfSnippet = nfSnippetRef;
+ nfBirdseye = nfBirdseyeRef;
+ nfGraph = nfGraphRef;
},
config: {
@@ -241,7 +241,7 @@
*/
showComponent: function (groupId, componentId) {
// ensure the group id is specified
- if (common.isDefinedAndNotNull(groupId)) {
+ if (nfCommon.isDefinedAndNotNull(groupId)) {
// initiate a graph refresh
var refreshGraph = $.Deferred(function (deferred) {
// load a different group if necessary
@@ -253,7 +253,7 @@
nfCanvas.reload().done(function () {
deferred.resolve();
}).fail(function () {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Process Group',
dialogContent: 'Unable to load the group for the specified component.'
});
@@ -271,7 +271,7 @@
if (!component.empty()) {
nfActions.show(component);
} else {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Process Group',
dialogContent: 'Unable to find the specified component.'
});
@@ -313,21 +313,23 @@
* Enables/disables the editable behavior for the specified selection based on their access policies.
*
* @param selection selection
+ * @param nfConnectableRef The nfConnectable module.
+ * @param nfDraggableRef The nfDraggable module.
*/
- editable: function (selection, connectable, draggable) {
+ editable: function (selection, nfConnectableRef, nfDraggableRef) {
if (nfCanvasUtils.canModify(selection)) {
if (!selection.classed('connectable')) {
- selection.call(connectable.activate);
+ selection.call(nfConnectableRef.activate);
}
if (!selection.classed('moveable')) {
- selection.call(draggable.activate);
+ selection.call(nfDraggableRef.activate);
}
} else {
if (selection.classed('connectable')) {
- selection.call(connectable.deactivate);
+ selection.call(nfConnectableRef.deactivate);
}
if (selection.classed('moveable')) {
- selection.call(draggable.deactivate);
+ selection.call(nfDraggableRef.deactivate);
}
}
},
@@ -425,7 +427,7 @@
// go through each word
var word = words.pop();
- while (common.isDefinedAndNotNull(word)) {
+ while (nfCommon.isDefinedAndNotNull(word)) {
// add the current word
line.push(word);
@@ -536,20 +538,20 @@
* @param {function} offset Optional offset
*/
bulletins: function (selection, d, getTooltipContainer, offset) {
- offset = common.isDefinedAndNotNull(offset) ? offset : 0;
+ offset = nfCommon.isDefinedAndNotNull(offset) ? offset : 0;
// get the tip
var tip = d3.select('#bulletin-tip-' + d.id);
var hasBulletins = false;
- if (!common.isEmpty(d.bulletins)) {
+ if (!nfCommon.isEmpty(d.bulletins)) {
// format the bulletins
- var bulletins = common.getFormattedBulletins(d.bulletins);
+ var bulletins = nfCommon.getFormattedBulletins(d.bulletins);
hasBulletins = bulletins.length > 0;
if (hasBulletins) {
// create the unordered list based off the formatted bulletins
- var list = common.formatUnorderedList(bulletins);
+ var list = nfCommon.formatUnorderedList(bulletins);
}
}
@@ -1094,7 +1096,7 @@
}
// ensure access to read tenants
- return common.canAccessTenants();
+ return nfCommon.canAccessTenants();
}
return false;
@@ -1266,7 +1268,7 @@
* Determines if something is currently pastable.
*/
isPastable: function () {
- return nfCanvas.canWrite() && clipboard.isCopied();
+ return nfCanvas.canWrite() && nfClipboard.isCopied();
},
/**
@@ -1284,7 +1286,7 @@
};
// store the item
- storage.setItem(name, item);
+ nfStorage.setItem(name, item);
},
/**
@@ -1293,9 +1295,9 @@
* @param {object} connection
*/
formatConnectionName: function (connection) {
- if (!common.isBlank(connection.name)) {
+ if (!nfCommon.isBlank(connection.name)) {
return connection.name;
- } else if (common.isDefinedAndNotNull(connection.selectedRelationships)) {
+ } else if (nfCommon.isDefinedAndNotNull(connection.selectedRelationships)) {
return connection.selectedRelationships.join(', ');
}
return '';
@@ -1308,13 +1310,13 @@
* @param {string} destinationComponentId The connection destination id
*/
reloadConnectionSourceAndDestination: function (sourceComponentId, destinationComponentId) {
- if (common.isBlank(sourceComponentId) === false) {
+ if (nfCommon.isBlank(sourceComponentId) === false) {
var source = d3.select('#id-' + sourceComponentId);
if (source.empty() === false) {
nfGraph.reload(source);
}
}
- if (common.isBlank(destinationComponentId) === false) {
+ if (nfCommon.isBlank(destinationComponentId) === false) {
var destination = d3.select('#id-' + destinationComponentId);
if (destination.empty() === false) {
nfGraph.reload(destination);
@@ -1362,10 +1364,10 @@
try {
// see if we can restore the view position from storage
var name = config.storage.namePrefix + nfCanvas.getGroupId();
- var item = storage.getItem(name);
+ var item = nfStorage.getItem(name);
// ensure the item is valid
- if (common.isDefinedAndNotNull(item)) {
+ if (nfCommon.isDefinedAndNotNull(item)) {
if (isFinite(item.scale) && isFinite(item.translateX) && isFinite(item.translateY)) {
// restore previous view
nfCanvas.View.translate([item.translateX, item.translateY]);
@@ -1398,10 +1400,10 @@
selection.each(function (d) {
var selected = d3.select(this);
if (!nfCanvasUtils.isConnection(selected)) {
- if (common.isUndefined(origin.x) || d.position.x < origin.x) {
+ if (nfCommon.isUndefined(origin.x) || d.position.x < origin.x) {
origin.x = d.position.x;
}
- if (common.isUndefined(origin.y) || d.position.y < origin.y) {
+ if (nfCommon.isUndefined(origin.y) || d.position.y < origin.y) {
origin.y = d.position.y;
}
}
@@ -1420,7 +1422,7 @@
// if the group id is null, we're already in the top most group
if (groupId === null) {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Process Group',
dialogContent: 'Components are already in the topmost group.'
});
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
index 97be460b7b..74b43d8607 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
@@ -33,8 +33,8 @@
'nf.ContextMenu',
'nf.Actions',
'nf.ProcessGroup'],
- function ($, d3, common, nfGraph, nfShell, angularBridge, nfClusterSummary, errorHandler, storage, canvasUtils, birdseye, contextMenu, actions, processGroup) {
- return (nf.Canvas = factory($, d3, common, nfGraph, nfShell, angularBridge, nfClusterSummary, errorHandler, storage, canvasUtils, birdseye, contextMenu, actions, processGroup));
+ function ($, d3, nfCommon, nfGraph, nfShell, nfNgBridge, nfClusterSummary, nfErrorHandler, nfStorage, nfCanvasUtils, nfBirdseye, nfContextMenu, nfActions, nfProcessGroup) {
+ return (nf.Canvas = factory($, d3, nfCommon, nfGraph, nfShell, nfNgBridge, nfClusterSummary, nfErrorHandler, nfStorage, nfCanvasUtils, nfBirdseye, nfContextMenu, nfActions, nfProcessGroup));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.Canvas =
@@ -68,7 +68,7 @@
root.nf.Actions,
root.nf.ProcessGroup);
}
-}(this, function ($, d3, common, nfGraph, nfShell, angularBridge, nfClusterSummary, errorHandler, storage, canvasUtils, birdseye, contextMenu, actions, processGroup) {
+}(this, function ($, d3, nfCommon, nfGraph, nfShell, nfNgBridge, nfClusterSummary, nfErrorHandler, nfStorage, nfCanvasUtils, nfBirdseye, nfContextMenu, nfActions, nfProcessGroup) {
'use strict';
var SCALE = 1;
@@ -155,17 +155,17 @@
permissions = flowResponse.permissions;
// update the breadcrumbs
- angularBridge.injector.get('breadcrumbsCtrl').resetBreadcrumbs();
+ nfNgBridge.injector.get('breadcrumbsCtrl').resetBreadcrumbs();
// inform Angular app values have changed
- angularBridge.digest();
- angularBridge.injector.get('breadcrumbsCtrl').generateBreadcrumbs(breadcrumb);
- angularBridge.injector.get('breadcrumbsCtrl').resetScrollPosition();
+ nfNgBridge.digest();
+ nfNgBridge.injector.get('breadcrumbsCtrl').generateBreadcrumbs(breadcrumb);
+ nfNgBridge.injector.get('breadcrumbsCtrl').resetScrollPosition();
// update the timestamp
$('#stats-last-refreshed').text(processGroupFlow.lastRefreshed);
// set the parent id if applicable
- if (common.isDefinedAndNotNull(processGroupFlow.parentGroupId)) {
+ if (nfCommon.isDefinedAndNotNull(processGroupFlow.parentGroupId)) {
nfCanvas.setParentGroupId(processGroupFlow.parentGroupId);
} else {
nfCanvas.setParentGroupId(null);
@@ -181,8 +181,8 @@
nfCanvas.View.updateVisibility();
// update the birdseye
- birdseye.refresh();
- }).fail(errorHandler.handleAjaxError);
+ nfBirdseye.refresh();
+ }).fail(nfErrorHandler.handleAjaxError);
};
/**
@@ -198,7 +198,7 @@
dataType: 'json'
}).done(function (currentUser) {
// set the current user
- common.setCurrentUser(currentUser);
+ nfCommon.setCurrentUser(currentUser);
});
};
@@ -240,26 +240,26 @@
return $.Deferred(function (deferred) {
// issue the requests
var processGroupXhr = reloadProcessGroup(nfCanvas.getGroupId(), options);
- var statusXhr = angularBridge.injector.get('flowStatusCtrl').reloadFlowStatus();
+ var statusXhr = nfNgBridge.injector.get('flowStatusCtrl').reloadFlowStatus();
var currentUserXhr = loadCurrentUser();
var controllerBulletins = $.ajax({
type: 'GET',
url: config.urls.controllerBulletins,
dataType: 'json'
}).done(function (response) {
- angularBridge.injector.get('flowStatusCtrl').updateBulletins(response);
+ nfNgBridge.injector.get('flowStatusCtrl').updateBulletins(response);
});
var clusterSummary = nfClusterSummary.loadClusterSummary().done(function (response) {
var clusterSummary = response.clusterSummary;
// update the cluster summary
- angularBridge.injector.get('flowStatusCtrl').updateClusterSummary(clusterSummary);
+ nfNgBridge.injector.get('flowStatusCtrl').updateClusterSummary(clusterSummary);
});
// wait for all requests to complete
$.when(processGroupXhr, statusXhr, currentUserXhr, controllerBulletins, clusterSummary).done(function (processGroupResult) {
// inform Angular app values have changed
- angularBridge.digest();
+ nfNgBridge.digest();
// resolve the deferred
deferred.resolve(processGroupResult);
@@ -282,10 +282,10 @@
canvasClicked = false;
// since the context menu event propagated back to the canvas, clear the selection
- canvasUtils.getSelection().classed('selected', false);
+ nfCanvasUtils.getSelection().classed('selected', false);
// show the context menu on the canvas
- contextMenu.show();
+ nfContextMenu.show();
// prevent default browser behavior
d3.event.preventDefault();
@@ -555,11 +555,11 @@
selectionBox.remove();
} else if (panning === false) {
// deselect as necessary if we are not panning
- canvasUtils.getSelection().classed('selected', false);
+ nfCanvasUtils.getSelection().classed('selected', false);
}
// inform Angular app values have changed
- angularBridge.digest();
+ nfNgBridge.digest();
});
// define a function for update the graph dimensions
@@ -587,7 +587,7 @@
});
//breadcrumbs
- angularBridge.injector.get('breadcrumbsCtrl').updateBreadcrumbsCss({'bottom': bottom + 'px'});
+ nfNgBridge.injector.get('breadcrumbsCtrl').updateBreadcrumbsCss({'bottom': bottom + 'px'});
// body
$('#canvas-body').css({
@@ -606,16 +606,16 @@
// listen for events to go to components
$('body').on('GoTo:Component', function (e, item) {
- canvasUtils.showComponent(item.parentGroupId, item.id);
+ nfCanvasUtils.showComponent(item.parentGroupId, item.id);
});
// listen for events to go to process groups
$('body').on('GoTo:ProcessGroup', function (e, item) {
- processGroup.enterGroup(item.id).done(function () {
- canvasUtils.getSelection().classed('selected', false);
+ nfProcessGroup.enterGroup(item.id).done(function () {
+ nfCanvasUtils.getSelection().classed('selected', false);
// inform Angular app that values have changed
- angularBridge.digest();
+ nfNgBridge.digest();
});
});
@@ -670,7 +670,7 @@
}
}
$.each(tabsContents, function (index, tabsContent) {
- common.toggleScrollable(tabsContent.get(0));
+ nfCommon.toggleScrollable(tabsContent.get(0));
});
}
}).on('keydown', function (evt) {
@@ -680,7 +680,7 @@
}
// get the current selection
- var selection = canvasUtils.getSelection();
+ var selection = nfCanvasUtils.getSelection();
// handle shortcuts
var isCtrl = evt.ctrlKey || evt.metaKey;
@@ -691,25 +691,25 @@
return;
}
// ctrl-r
- actions.reload();
+ nfActions.reload();
// default prevented in nf-universal-capture.js
} else if (evt.keyCode === 65) {
// ctrl-a
- actions.selectAll();
- angularBridge.digest();
+ nfActions.selectAll();
+ nfNgBridge.digest();
// only want to prevent default if the action was performed, otherwise default select all would be overridden
evt.preventDefault();
} else if (evt.keyCode === 67) {
// ctrl-c
- if (nfCanvas.canWrite() && canvasUtils.isCopyable(selection)) {
- actions.copy(selection);
+ if (nfCanvas.canWrite() && nfCanvasUtils.isCopyable(selection)) {
+ nfActions.copy(selection);
}
} else if (evt.keyCode === 86) {
// ctrl-v
- if (nfCanvas.canWrite() && canvasUtils.isPastable()) {
- actions.paste(selection);
+ if (nfCanvas.canWrite() && nfCanvasUtils.isPastable()) {
+ nfActions.paste(selection);
// only want to prevent default if the action was performed, otherwise default paste would be overridden
evt.preventDefault();
@@ -718,8 +718,8 @@
} else {
if (evt.keyCode === 8 || evt.keyCode === 46) {
// backspace or delete
- if (nfCanvas.canWrite() && canvasUtils.areDeletable(selection)) {
- actions['delete'](selection);
+ if (nfCanvas.canWrite() && nfCanvasUtils.areDeletable(selection)) {
+ nfActions['delete'](selection);
}
// default prevented in nf-universal-capture.js
@@ -734,14 +734,14 @@
dataType: 'json'
}).done(function (response) {
// ensure the banners response is specified
- if (common.isDefinedAndNotNull(response.banners)) {
- if (common.isDefinedAndNotNull(response.banners.headerText) && response.banners.headerText !== '') {
+ if (nfCommon.isDefinedAndNotNull(response.banners)) {
+ if (nfCommon.isDefinedAndNotNull(response.banners.headerText) && response.banners.headerText !== '') {
// update the header text and show it
$('#banner-header').addClass('banner-header-background').text(response.banners.headerText).show();
$('#canvas-container').css('top', '98px');
}
- if (common.isDefinedAndNotNull(response.banners.footerText) && response.banners.footerText !== '') {
+ if (nfCommon.isDefinedAndNotNull(response.banners.footerText) && response.banners.footerText !== '') {
// update the footer text and show it
var bannerFooter = $('#banner-footer').text(response.banners.footerText).show();
@@ -757,7 +757,7 @@
// update the graph dimensions
updateGraphSize();
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
},
/**
@@ -766,7 +766,7 @@
init: function () {
// attempt kerberos authentication
var ticketExchange = $.Deferred(function (deferred) {
- if (storage.hasItem('jwt')) {
+ if (nfStorage.hasItem('jwt')) {
deferred.resolve();
} else {
$.ajax({
@@ -775,9 +775,9 @@
dataType: 'text'
}).done(function (jwt) {
// get the payload and store the token with the appropriate expiration
- var token = common.getJwtPayload(jwt);
- var expiration = parseInt(token['exp'], 10) * common.MILLIS_PER_SECOND;
- storage.setItem('jwt', jwt, expiration);
+ var token = nfCommon.getJwtPayload(jwt);
+ var expiration = parseInt(token['exp'], 10) * nfCommon.MILLIS_PER_SECOND;
+ nfStorage.setItem('jwt', jwt, expiration);
deferred.resolve();
}).fail(function () {
deferred.reject();
@@ -795,12 +795,12 @@
$('#current-user').text(currentUser.identity).show();
// render the logout button if there is a token locally
- if (storage.getItem('jwt') !== null) {
+ if (nfStorage.getItem('jwt') !== null) {
$('#logout-link-container').show();
}
} else {
// set the anonymous user label
- common.setAnonymousUserLabel();
+ nfCommon.setAnonymousUserLabel();
}
deferred.resolve();
}).fail(function (xhr, status, error) {
@@ -1024,7 +1024,7 @@
.scale(SCALE)
.on('zoomstart', function () {
// hide the context menu
- contextMenu.hide();
+ nfContextMenu.hide();
})
.on('zoom', function () {
// if we have zoomed, indicate that we are panning
@@ -1050,16 +1050,16 @@
})
.on('zoomend', function () {
// ensure the canvas was actually refreshed
- if (common.isDefinedAndNotNull(refreshed)) {
+ if (nfCommon.isDefinedAndNotNull(refreshed)) {
nfCanvas.View.updateVisibility();
// refresh the birdseye
refreshed.done(function () {
- birdseye.refresh();
+ nfBirdseye.refresh();
});
// persist the users view
- canvasUtils.persistUserView();
+ nfCanvasUtils.persistUserView();
// reset the refreshed deferred
refreshed = null;
@@ -1096,7 +1096,7 @@
* @param {array} translate [x, y]
*/
translate: function (translate) {
- if (common.isUndefined(translate)) {
+ if (nfCommon.isUndefined(translate)) {
return behavior.translate();
} else {
behavior.translate(translate);
@@ -1109,7 +1109,7 @@
* @param {number} scale The new scale
*/
scale: function (scale) {
- if (common.isUndefined(scale)) {
+ if (nfCommon.isUndefined(scale)) {
return behavior.scale();
} else {
behavior.scale(scale);
@@ -1133,7 +1133,7 @@
nfCanvas.View.scale(newScale);
// center around the center of the screen accounting for the translation accordingly
- canvasUtils.centerBoundingBox({
+ nfCanvasUtils.centerBoundingBox({
x: (screenWidth / 2) - (translate[0] / scale),
y: (screenHeight / 2) - (translate[1] / scale),
width: 1,
@@ -1158,7 +1158,7 @@
nfCanvas.View.scale(newScale);
// center around the center of the screen accounting for the translation accordingly
- canvasUtils.centerBoundingBox({
+ nfCanvasUtils.centerBoundingBox({
x: (screenWidth / 2) - (translate[0] / scale),
y: (screenHeight / 2) - (translate[1] / scale),
width: 1,
@@ -1205,7 +1205,7 @@
nfCanvas.View.scale(newScale);
// center as appropriate
- canvasUtils.centerBoundingBox({
+ nfCanvasUtils.centerBoundingBox({
x: graphLeft - (translate[0] / scale),
y: graphTop - (translate[1] / scale),
width: canvasWidth / newScale,
@@ -1221,7 +1221,7 @@
var scale = nfCanvas.View.scale();
// get the first selected component
- var selection = canvasUtils.getSelection();
+ var selection = nfCanvasUtils.getSelection();
// set the updated scale
nfCanvas.View.scale(1);
@@ -1259,7 +1259,7 @@
}
// center as appropriate
- canvasUtils.centerBoundingBox(box);
+ nfCanvasUtils.centerBoundingBox(box);
},
/**
@@ -1276,11 +1276,11 @@
var refreshBirdseye = true;
// extract the options if specified
- if (common.isDefinedAndNotNull(options)) {
- persist = common.isDefinedAndNotNull(options.persist) ? options.persist : persist;
- transition = common.isDefinedAndNotNull(options.transition) ? options.transition : transition;
- refreshComponents = common.isDefinedAndNotNull(options.refreshComponents) ? options.refreshComponents : refreshComponents;
- refreshBirdseye = common.isDefinedAndNotNull(options.refreshBirdseye) ? options.refreshBirdseye : refreshBirdseye;
+ if (nfCommon.isDefinedAndNotNull(options)) {
+ persist = nfCommon.isDefinedAndNotNull(options.persist) ? options.persist : persist;
+ transition = nfCommon.isDefinedAndNotNull(options.transition) ? options.transition : transition;
+ refreshComponents = nfCommon.isDefinedAndNotNull(options.refreshComponents) ? options.refreshComponents : refreshComponents;
+ refreshBirdseye = nfCommon.isDefinedAndNotNull(options.refreshBirdseye) ? options.refreshBirdseye : refreshBirdseye;
}
// update component visibility
@@ -1290,7 +1290,7 @@
// persist if appropriate
if (persist === true) {
- canvasUtils.persistUserView();
+ nfCanvasUtils.persistUserView();
}
// update the canvas
@@ -1303,7 +1303,7 @@
.each('end', function () {
// refresh birdseye if appropriate
if (refreshBirdseye === true) {
- birdseye.refresh();
+ nfBirdseye.refresh();
}
deferred.resolve();
@@ -1315,7 +1315,7 @@
// refresh birdseye if appropriate
if (refreshBirdseye === true) {
- birdseye.refresh();
+ nfBirdseye.refresh();
}
deferred.resolve();
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-clipboard.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-clipboard.js
index d5dd80c579..c6fdadc784 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-clipboard.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-clipboard.js
@@ -24,8 +24,8 @@
if (typeof define === 'function' && define.amd) {
define(['jquery',
'nf.Common'],
- function ($, common) {
- return (nf.Clipboard = factory($, common));
+ function ($, nfCommon) {
+ return (nf.Clipboard = factory($, nfCommon));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.Clipboard =
@@ -35,7 +35,7 @@
nf.Clipboard = factory(root.$,
root.nf.Common);
}
-}(this, function ($, common) {
+}(this, function ($, nfCommon) {
'use strict';
var COPY = 'copy';
@@ -60,7 +60,7 @@
* @argument {object} listener A clipboard listener
*/
removeListener: function (listener) {
- if (common.isDefinedAndNotNull(listeners[listener])) {
+ if (nfCommon.isDefinedAndNotNull(listeners[listener])) {
delete listeners[listener];
}
},
@@ -83,7 +83,7 @@
* Checks to see if any data has been copied.
*/
isCopied: function () {
- return common.isDefinedAndNotNull(data);
+ return nfCommon.isDefinedAndNotNull(data);
},
/**
@@ -93,7 +93,7 @@
paste: function () {
return $.Deferred(function (deferred) {
// ensure there was data
- if (common.isDefinedAndNotNull(data)) {
+ if (nfCommon.isDefinedAndNotNull(data)) {
var clipboardData = data;
// resolve the deferred
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-component-state.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-component-state.js
index e362b461e3..ae9ebdc51e 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-component-state.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-component-state.js
@@ -28,8 +28,8 @@
'nf.ErrorHandler',
'nf.Dialog',
'nf.Common'],
- function ($, Slick, clusterSummary, errorHandler, dialog, common) {
- return (nf.ComponentState = factory($, Slick, clusterSummary, errorHandler, dialog, common));
+ function ($, Slick, nfClusterSummary, nfErrorHandler, nfDialog, nfCommon) {
+ return (nf.ComponentState = factory($, Slick, nfClusterSummary, nfErrorHandler, nfDialog, nfCommon));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ComponentState =
@@ -47,7 +47,7 @@
root.nf.Dialog,
root.nf.Common);
}
-}(this, function ($, Slick, clusterSummary, errorHandler, dialog, common) {
+}(this, function ($, Slick, nfClusterSummary, nfErrorHandler, nfDialog, nfCommon) {
'use strict';
/**
@@ -58,7 +58,7 @@
var componentStateTable = $('#component-state-table').data('gridInstance');
// ensure the grid has been initialized
- if (common.isDefinedAndNotNull(componentStateTable)) {
+ if (nfCommon.isDefinedAndNotNull(componentStateTable)) {
var componentStateData = componentStateTable.getData();
// update the search criteria
@@ -95,7 +95,7 @@
// conditionally consider the scope
var matchesScope = false;
- if (common.isDefinedAndNotNull(item['scope'])) {
+ if (nfCommon.isDefinedAndNotNull(item['scope'])) {
matchesScope = item['scope'].search(filterExp) >= 0;
}
@@ -111,8 +111,8 @@
var sort = function (sortDetails, data) {
// defines a function for sorting
var comparer = function (a, b) {
- var aString = common.isDefinedAndNotNull(a[sortDetails.columnId]) ? a[sortDetails.columnId] : '';
- var bString = common.isDefinedAndNotNull(b[sortDetails.columnId]) ? b[sortDetails.columnId] : '';
+ var aString = nfCommon.isDefinedAndNotNull(a[sortDetails.columnId]) ? a[sortDetails.columnId] : '';
+ var bString = nfCommon.isDefinedAndNotNull(b[sortDetails.columnId]) ? b[sortDetails.columnId] : '';
return aString === bString ? 0 : aString > bString ? 1 : -1;
};
@@ -162,7 +162,7 @@
componentStateData.beginUpdate();
// local state
- if (common.isDefinedAndNotNull(localState)) {
+ if (nfCommon.isDefinedAndNotNull(localState)) {
$.each(localState.state, function (i, stateEntry) {
componentStateData.addItem($.extend({
id: count++,
@@ -171,12 +171,12 @@
});
totalEntries += localState.totalEntryCount;
- if (common.isDefinedAndNotNull(localState.state) && localState.totalEntryCount !== localState.state.length) {
+ if (nfCommon.isDefinedAndNotNull(localState.state) && localState.totalEntryCount !== localState.state.length) {
showPartialDetails = true;
}
}
- if (common.isDefinedAndNotNull(clusterState)) {
+ if (nfCommon.isDefinedAndNotNull(clusterState)) {
$.each(clusterState.state, function (i, stateEntry) {
componentStateData.addItem($.extend({
id: count++,
@@ -185,7 +185,7 @@
});
totalEntries += clusterState.totalEntryCount;
- if (common.isDefinedAndNotNull(clusterState.state) && clusterState.totalEntryCount !== clusterState.state.length) {
+ if (nfCommon.isDefinedAndNotNull(clusterState.state) && clusterState.totalEntryCount !== clusterState.state.length) {
showPartialDetails = true;
}
}
@@ -199,7 +199,7 @@
}
// update the total number of state entries
- $('#total-component-state-entries').text(common.formatInteger(totalEntries));
+ $('#total-component-state-entries').text(nfCommon.formatInteger(totalEntries));
};
/**
@@ -281,9 +281,9 @@
// reload the table with no state
loadComponentState()
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
} else {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Component State',
dialogContent: 'This component has no state to clear.'
});
@@ -310,7 +310,7 @@
];
// conditionally show the cluster node identifier
- if (clusterSummary.isClustered()) {
+ if (nfClusterSummary.isClustered()) {
componentStateColumns.push({
id: 'scope',
field: 'scope',
@@ -418,7 +418,7 @@
// reset the grid size
var componentStateGrid = componentStateTable.data('gridInstance');
componentStateGrid.resizeCanvas();
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
}
};
}));
\ No newline at end of file
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connectable.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connectable.js
index 3da81e39e2..91d29f612c 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connectable.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connectable.js
@@ -23,8 +23,8 @@
'nf.Connection',
'nf.ConnectionConfiguration',
'nf.CanvasUtils'],
- function (d3, connection, connectionConfiguration, canvasUtils) {
- return (nf.Connectable = factory(d3, connection, connectionConfiguration, canvasUtils));
+ function (d3, nfConnection, nfConnectionConfiguration, nfCanvasUtils) {
+ return (nf.Connectable = factory(d3, nfConnection, nfConnectionConfiguration, nfCanvasUtils));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.Connectable =
@@ -38,7 +38,7 @@
root.nf.ConnectionConfiguration,
root.nf.CanvasUtils);
}
-}(this, function (d3, connection, connectionConfiguration, canvasUtils) {
+}(this, function (d3, nfConnection, nfConnectionConfiguration, nfCanvasUtils) {
'use strict';
var connect;
@@ -78,7 +78,7 @@
d3.event.sourceEvent.stopPropagation();
// unselect the previous components
- canvasUtils.getSelection().classed('selected', false);
+ nfCanvasUtils.getSelection().classed('selected', false);
// mark the source component has selected
var source = d3.select(this.parentNode).classed('selected', true);
@@ -128,7 +128,7 @@
// component to itself. requiring the mouse to have actually moved before
// checking the eligiblity of the destination addresses the issue
return (Math.abs(origin[0] - d3.event.x) > 10 || Math.abs(origin[1] - d3.event.y) > 10) &&
- canvasUtils.isValidConnectionDestination(d3.select(this));
+ nfCanvasUtils.isValidConnectionDestination(d3.select(this));
});
// update the drag line
@@ -148,12 +148,12 @@
var x = pathDatum.x;
var y = pathDatum.y;
var componentOffset = pathDatum.sourceWidth / 2;
- var xOffset = connection.config.selfLoopXOffset;
- var yOffset = connection.config.selfLoopYOffset;
+ var xOffset = nfConnection.config.selfLoopXOffset;
+ var yOffset = nfConnection.config.selfLoopYOffset;
return 'M' + x + ' ' + y + 'L' + (x + componentOffset + xOffset) + ' ' + (y - yOffset) + 'L' + (x + componentOffset + xOffset) + ' ' + (y + yOffset) + 'Z';
} else {
// get the position on the destination perimeter
- var end = canvasUtils.getPerimeterPoint(pathDatum, {
+ var end = nfCanvasUtils.getPerimeterPoint(pathDatum, {
'x': destinationData.position.x,
'y': destinationData.position.y,
'width': destinationData.dimensions.width,
@@ -212,7 +212,7 @@
// create the connection
var destinationData = destination.datum();
- connectionConfiguration.createConnection(connectorData.sourceId, destinationData.id);
+ nfConnectionConfiguration.createConnection(connectorData.sourceId, destinationData.id);
}
});
},
@@ -230,7 +230,7 @@
var selection = d3.select(this);
// ensure the current component supports connection source
- if (canvasUtils.isValidConnectionSource(selection)) {
+ if (nfCanvasUtils.isValidConnectionSource(selection)) {
// see if theres already a connector rendered
var addConnect = d3.select('text.add-connect');
if (addConnect.empty()) {
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
index 5f0dfc2039..a404e5fa41 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
@@ -27,8 +27,8 @@
'nf.Client',
'nf.CanvasUtils',
'nf.Connection'],
- function ($, d3, errorHandler, common, dialog, client, canvasUtils, connection) {
- return (nf.ConnectionConfiguration = factory($, d3, errorHandler, common, dialog, client, canvasUtils, connection));
+ function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfConnection) {
+ return (nf.ConnectionConfiguration = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfConnection));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ConnectionConfiguration =
@@ -50,7 +50,7 @@
root.nf.CanvasUtils,
root.nf.Connection);
}
-}(this, function ($, d3, errorHandler, common, dialog, client, canvasUtils, connection) {
+}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfConnection) {
'use strict';
var nfBirdseye;
@@ -80,11 +80,11 @@
*/
var initializeSourceNewConnectionDialog = function (source) {
// handle the selected source
- if (canvasUtils.isProcessor(source)) {
+ if (nfCanvasUtils.isProcessor(source)) {
return $.Deferred(function (deferred) {
// initialize the source processor
initializeSourceProcessor(source).done(function (processor) {
- if (!common.isEmpty(processor.relationships)) {
+ if (!nfCommon.isEmpty(processor.relationships)) {
// populate the available connections
$.each(processor.relationships, function (i, relationship) {
createRelationshipOption(relationship.name);
@@ -114,7 +114,7 @@
addConnection(selectedRelationships);
} else {
// inform users that no relationships were selected
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Connection Configuration',
dialogContent: 'The connection must have at least one relationship selected.'
});
@@ -143,9 +143,9 @@
deferred.resolve();
} else {
// there are no relationships for this processor
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Connection Configuration',
- dialogContent: '\'' + common.escapeHtml(processor.name) + '\' does not support any relationships.'
+ dialogContent: '\'' + nfCommon.escapeHtml(processor.name) + '\' does not support any relationships.'
});
// reset the dialog
@@ -161,11 +161,11 @@
return $.Deferred(function (deferred) {
// determine how to initialize the source
var connectionSourceDeferred;
- if (canvasUtils.isInputPort(source)) {
+ if (nfCanvasUtils.isInputPort(source)) {
connectionSourceDeferred = initializeSourceInputPort(source);
- } else if (canvasUtils.isRemoteProcessGroup(source)) {
+ } else if (nfCanvasUtils.isRemoteProcessGroup(source)) {
connectionSourceDeferred = initializeSourceRemoteProcessGroup(source);
- } else if (canvasUtils.isProcessGroup(source)) {
+ } else if (nfCanvasUtils.isProcessGroup(source)) {
connectionSourceDeferred = initializeSourceProcessGroup(source);
} else {
connectionSourceDeferred = initializeSourceFunnel(source);
@@ -233,8 +233,8 @@
$('#connection-source-component-id').val(inputPortData.id);
// populate the group details
- $('#connection-source-group-id').val(canvasUtils.getGroupId());
- $('#connection-source-group-name').text(canvasUtils.getGroupName());
+ $('#connection-source-group-id').val(nfCanvasUtils.getGroupId());
+ $('#connection-source-group-name').text(nfCanvasUtils.getGroupName());
// resolve the deferred
deferred.resolve();
@@ -259,8 +259,8 @@
$('#connection-source-component-id').val(funnelData.id);
// populate the group details
- $('#connection-source-group-id').val(canvasUtils.getGroupId());
- $('#connection-source-group-name').text(canvasUtils.getGroupName());
+ $('#connection-source-group-id').val(nfCanvasUtils.getGroupId());
+ $('#connection-source-group-name').text(nfCanvasUtils.getGroupName());
// resolve the deferred
deferred.resolve();
@@ -277,7 +277,7 @@
// get the processor data
var processorData = source.datum();
var processorName = processorData.permissions.canRead ? processorData.component.name : processorData.id;
- var processorType = processorData.permissions.canRead ? common.substringAfterLast(processorData.component.type, '.') : 'Processor';
+ var processorType = processorData.permissions.canRead ? nfCommon.substringAfterLast(processorData.component.type, '.') : 'Processor';
// populate the source processor information
$('#processor-source').show();
@@ -289,8 +289,8 @@
$('#connection-source-component-id').val(processorData.id);
// populate the group details
- $('#connection-source-group-id').val(canvasUtils.getGroupId());
- $('#connection-source-group-name').text(canvasUtils.getGroupName());
+ $('#connection-source-group-id').val(nfCanvasUtils.getGroupId());
+ $('#connection-source-group-name').text(nfCanvasUtils.getGroupName());
// show the available relationships
$('#relationship-names-container').show();
@@ -327,13 +327,13 @@
options.push({
text: component.name,
value: component.id,
- description: common.escapeHtml(component.comments)
+ description: nfCommon.escapeHtml(component.comments)
});
}
});
// only proceed if there are output ports
- if (!common.isEmpty(options)) {
+ if (!nfCommon.isEmpty(options)) {
$('#output-port-source').show();
// sort the options
@@ -359,13 +359,13 @@
deferred.resolve();
} else {
- var message = '\'' + common.escapeHtml(processGroupName) + '\' does not have any output ports.';
- if (common.isEmpty(processGroupContents.outputPorts) === false) {
- message = 'Not authorized for any output ports in \'' + common.escapeHtml(processGroupName) + '\'.';
+ var message = '\'' + nfCommon.escapeHtml(processGroupName) + '\' does not have any output ports.';
+ if (nfCommon.isEmpty(processGroupContents.outputPorts) === false) {
+ message = 'Not authorized for any output ports in \'' + nfCommon.escapeHtml(processGroupName) + '\'.';
}
// there are no output ports for this process group
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Connection Configuration',
dialogContent: message
});
@@ -377,7 +377,7 @@
}
}).fail(function (xhr, status, error) {
// handle the error
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
deferred.reject();
});
@@ -403,7 +403,7 @@
var remoteProcessGroupContents = remoteProcessGroup.contents;
// only proceed if there are output ports
- if (!common.isEmpty(remoteProcessGroupContents.outputPorts)) {
+ if (!nfCommon.isEmpty(remoteProcessGroupContents.outputPorts)) {
$('#output-port-source').show();
// show the output port options
@@ -413,7 +413,7 @@
text: outputPort.name,
value: outputPort.id,
disabled: outputPort.exists === false,
- description: common.escapeHtml(outputPort.comments)
+ description: nfCommon.escapeHtml(outputPort.comments)
});
});
@@ -441,9 +441,9 @@
deferred.resolve();
} else {
// there are no relationships for this processor
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Connection Configuration',
- dialogContent: '\'' + common.escapeHtml(remoteProcessGroup.name) + '\' does not have any output ports.'
+ dialogContent: '\'' + nfCommon.escapeHtml(remoteProcessGroup.name) + '\' does not have any output ports.'
});
// reset the dialog
@@ -453,7 +453,7 @@
}
}).fail(function (xhr, status, error) {
// handle the error
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
deferred.reject();
});
@@ -461,13 +461,13 @@
};
var initializeDestinationNewConnectionDialog = function (destination) {
- if (canvasUtils.isOutputPort(destination)) {
+ if (nfCanvasUtils.isOutputPort(destination)) {
return initializeDestinationOutputPort(destination);
- } else if (canvasUtils.isProcessor(destination)) {
+ } else if (nfCanvasUtils.isProcessor(destination)) {
return initializeDestinationProcessor(destination);
- } else if (canvasUtils.isRemoteProcessGroup(destination)) {
+ } else if (nfCanvasUtils.isRemoteProcessGroup(destination)) {
return initializeDestinationRemoteProcessGroup(destination);
- } else if (canvasUtils.isFunnel(destination)) {
+ } else if (nfCanvasUtils.isFunnel(destination)) {
return initializeDestinationFunnel(destination);
} else {
return initializeDestinationProcessGroup(destination);
@@ -487,8 +487,8 @@
$('#connection-destination-component-id').val(outputPortData.id);
// populate the group details
- $('#connection-destination-group-id').val(canvasUtils.getGroupId());
- $('#connection-destination-group-name').text(canvasUtils.getGroupName());
+ $('#connection-destination-group-id').val(nfCanvasUtils.getGroupId());
+ $('#connection-destination-group-name').text(nfCanvasUtils.getGroupName());
deferred.resolve();
}).promise();
@@ -505,8 +505,8 @@
$('#connection-destination-component-id').val(funnelData.id);
// populate the group details
- $('#connection-destination-group-id').val(canvasUtils.getGroupId());
- $('#connection-destination-group-name').text(canvasUtils.getGroupName());
+ $('#connection-destination-group-id').val(nfCanvasUtils.getGroupId());
+ $('#connection-destination-group-name').text(nfCanvasUtils.getGroupName());
deferred.resolve();
}).promise();
@@ -516,7 +516,7 @@
return $.Deferred(function (deferred) {
var processorData = destination.datum();
var processorName = processorData.permissions.canRead ? processorData.component.name : processorData.id;
- var processorType = processorData.permissions.canRead ? common.substringAfterLast(processorData.component.type, '.') : 'Processor';
+ var processorType = processorData.permissions.canRead ? nfCommon.substringAfterLast(processorData.component.type, '.') : 'Processor';
$('#processor-destination').show();
$('#processor-destination-name').text(processorName).attr('title', processorName);
@@ -527,8 +527,8 @@
$('#connection-destination-component-id').val(processorData.id);
// populate the group details
- $('#connection-destination-group-id').val(canvasUtils.getGroupId());
- $('#connection-destination-group-name').text(canvasUtils.getGroupName());
+ $('#connection-destination-group-id').val(nfCanvasUtils.getGroupId());
+ $('#connection-destination-group-name').text(nfCanvasUtils.getGroupName());
deferred.resolve();
}).promise();
@@ -558,12 +558,12 @@
options.push({
text: inputPort.permissions.canRead ? inputPort.component.name : inputPort.id,
value: inputPort.id,
- description: inputPort.permissions.canRead ? common.escapeHtml(inputPort.component.comments) : null
+ description: inputPort.permissions.canRead ? nfCommon.escapeHtml(inputPort.component.comments) : null
});
});
// only proceed if there are output ports
- if (!common.isEmpty(options)) {
+ if (!nfCommon.isEmpty(options)) {
$('#input-port-destination').show();
// sort the options
@@ -590,9 +590,9 @@
deferred.resolve();
} else {
// there are no relationships for this processor
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Connection Configuration',
- dialogContent: '\'' + common.escapeHtml(processGroupName) + '\' does not have any input ports.'
+ dialogContent: '\'' + nfCommon.escapeHtml(processGroupName) + '\' does not have any input ports.'
});
// reset the dialog
@@ -602,7 +602,7 @@
}
}).fail(function (xhr, status, error) {
// handle the error
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
deferred.reject();
});
@@ -628,7 +628,7 @@
var remoteProcessGroupContents = remoteProcessGroup.contents;
// only proceed if there are output ports
- if (!common.isEmpty(remoteProcessGroupContents.inputPorts)) {
+ if (!nfCommon.isEmpty(remoteProcessGroupContents.inputPorts)) {
$('#input-port-destination').show();
// show the input port options
@@ -638,7 +638,7 @@
text: inputPort.name,
value: inputPort.id,
disabled: inputPort.exists === false,
- description: common.escapeHtml(inputPort.comments)
+ description: nfCommon.escapeHtml(inputPort.comments)
});
});
@@ -666,9 +666,9 @@
deferred.resolve();
} else {
// there are no relationships for this processor
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Connection Configuration',
- dialogContent: '\'' + common.escapeHtml(remoteProcessGroup.name) + '\' does not have any input ports.'
+ dialogContent: '\'' + nfCommon.escapeHtml(remoteProcessGroup.name) + '\' does not have any input ports.'
});
// reset the dialog
@@ -678,7 +678,7 @@
}
}).fail(function (xhr, status, error) {
// handle the error
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
deferred.reject();
});
@@ -716,11 +716,11 @@
* @argument {selection} source The source
*/
var initializeSourceEditConnectionDialog = function (source) {
- if (canvasUtils.isProcessor(source)) {
+ if (nfCanvasUtils.isProcessor(source)) {
return initializeSourceProcessor(source);
- } else if (canvasUtils.isInputPort(source)) {
+ } else if (nfCanvasUtils.isInputPort(source)) {
return initializeSourceInputPort(source);
- } else if (canvasUtils.isFunnel(source)) {
+ } else if (nfCanvasUtils.isFunnel(source)) {
return initializeSourceFunnel(source);
} else {
return initializeSourceReadOnlyGroup(source);
@@ -734,13 +734,13 @@
* @argument {object} connectionDestination The connection destination object
*/
var initializeDestinationEditConnectionDialog = function (destination, connectionDestination) {
- if (canvasUtils.isProcessor(destination)) {
+ if (nfCanvasUtils.isProcessor(destination)) {
return initializeDestinationProcessor(destination);
- } else if (canvasUtils.isOutputPort(destination)) {
+ } else if (nfCanvasUtils.isOutputPort(destination)) {
return initializeDestinationOutputPort(destination);
- } else if (canvasUtils.isRemoteProcessGroup(destination)) {
+ } else if (nfCanvasUtils.isRemoteProcessGroup(destination)) {
return initializeDestinationRemoteProcessGroup(destination, connectionDestination);
- } else if (canvasUtils.isFunnel(destination)) {
+ } else if (nfCanvasUtils.isFunnel(destination)) {
return initializeDestinationFunnel(destination);
} else {
return initializeDestinationProcessGroup(destination);
@@ -787,8 +787,8 @@
y: sourceData.position.y + (sourceData.dimensions.height / 2)
};
- var xOffset = connection.config.selfLoopXOffset;
- var yOffset = connection.config.selfLoopYOffset;
+ var xOffset = nfConnection.config.selfLoopXOffset;
+ var yOffset = nfConnection.config.selfLoopYOffset;
bends.push({
'x': (rightCenter.x + xOffset),
'y': (rightCenter.y - yOffset)
@@ -801,11 +801,11 @@
var existingConnections = [];
// get all connections for the source component
- var connectionsForSourceComponent = connection.getComponentConnections(sourceComponentId);
+ var connectionsForSourceComponent = nfConnection.getComponentConnections(sourceComponentId);
$.each(connectionsForSourceComponent, function (_, connectionForSourceComponent) {
// get the id for the source/destination component
- var connectionSourceComponentId = canvasUtils.getConnectionSourceComponentId(connectionForSourceComponent);
- var connectionDestinationComponentId = canvasUtils.getConnectionDestinationComponentId(connectionForSourceComponent);
+ var connectionSourceComponentId = nfCanvasUtils.getConnectionSourceComponentId(connectionForSourceComponent);
+ var connectionDestinationComponentId = nfCanvasUtils.getConnectionDestinationComponentId(connectionForSourceComponent);
// if the connection is between these same components, consider it for collisions
if ((connectionSourceComponentId === sourceComponentId && connectionDestinationComponentId === destinationComponentId) ||
@@ -822,7 +822,7 @@
$.each(existingConnections, function (_, existingConnection) {
// only consider multiple connections with no bend points a collision, the existance of
// bend points suggests that the user has placed the connection into a desired location
- if (common.isEmpty(existingConnection.bends)) {
+ if (nfCommon.isEmpty(existingConnection.bends)) {
avoidCollision = true;
return false;
}
@@ -842,7 +842,7 @@
var collides = function (x, y) {
var collides = false;
$.each(existingConnections, function (_, existingConnection) {
- if (!common.isEmpty(existingConnection.bends)) {
+ if (!nfCommon.isEmpty(existingConnection.bends)) {
if (isMoreHorizontal) {
// horizontal lines are adjusted in the y space
if (existingConnection.bends[0].y === y) {
@@ -900,8 +900,8 @@
var destinationGroupId = $('#connection-destination-group-id').val();
// determine the source and destination types
- var sourceType = canvasUtils.getConnectableTypeForSource(source);
- var destinationType = canvasUtils.getConnectableTypeForDestination(destination);
+ var sourceType = nfCanvasUtils.getConnectableTypeForSource(source);
+ var destinationType = nfCanvasUtils.getConnectableTypeForDestination(destination);
// get the settings
var connectionName = $('#connection-name').val();
@@ -912,7 +912,7 @@
if (validateSettings()) {
var connectionEntity = {
- 'revision': client.getRevision({
+ 'revision': nfClient.getRevision({
'revision': {
'version': 0
}
@@ -941,7 +941,7 @@
// create the new connection
$.ajax({
type: 'POST',
- url: config.urls.api + '/process-groups/' + encodeURIComponent(canvasUtils.getGroupId()) + '/connections',
+ url: config.urls.api + '/process-groups/' + encodeURIComponent(nfCanvasUtils.getGroupId()) + '/connections',
data: JSON.stringify(connectionEntity),
dataType: 'json',
contentType: 'application/json'
@@ -954,7 +954,7 @@
});
// reload the connections source/destination components
- canvasUtils.reloadConnectionSourceAndDestination(sourceComponentId, destinationComponentId);
+ nfCanvasUtils.reloadConnectionSourceAndDestination(sourceComponentId, destinationComponentId);
// update component visibility
nfGraph.updateVisibility();
@@ -963,7 +963,7 @@
nfBirdseye.refresh();
}).fail(function (xhr, status, error) {
// handle the error
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
});
}
};
@@ -984,7 +984,7 @@
// get the destination details
var destinationComponentId = $('#connection-destination-component-id').val();
var destination = d3.select('#id-' + destinationComponentId);
- var destinationType = canvasUtils.getConnectableTypeForDestination(destination);
+ var destinationType = nfCanvasUtils.getConnectableTypeForDestination(destination);
// get the destination details
var destinationId = $('#connection-destination-id').val();
@@ -998,9 +998,9 @@
var prioritizers = $('#prioritizer-selected').sortable('toArray');
if (validateSettings()) {
- var d = connection.get(connectionId);
+ var d = nfConnection.get(connectionId);
var connectionEntity = {
- 'revision': client.getRevision(d),
+ 'revision': nfClient.getRevision(d),
'component': {
'id': connectionId,
'name': connectionName,
@@ -1026,18 +1026,18 @@
contentType: 'application/json'
}).done(function (response) {
// update this connection
- connection.set(response);
+ nfConnection.set(response);
// reload the connections source/destination components
- canvasUtils.reloadConnectionSourceAndDestination(sourceComponentId, destinationComponentId);
+ nfCanvasUtils.reloadConnectionSourceAndDestination(sourceComponentId, destinationComponentId);
}).fail(function (xhr, status, error) {
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Connection Configuration',
- dialogContent: common.escapeHtml(xhr.responseText),
+ dialogContent: nfCommon.escapeHtml(xhr.responseText),
});
} else {
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
}
});
} else {
@@ -1078,20 +1078,20 @@
var errors = [];
// validate the settings
- if (common.isBlank($('#flow-file-expiration').val())) {
+ if (nfCommon.isBlank($('#flow-file-expiration').val())) {
errors.push('File expiration must be specified');
}
if (!$.isNumeric($('#back-pressure-object-threshold').val())) {
errors.push('Back pressure object threshold must be an integer value');
}
- if (common.isBlank($('#back-pressure-data-size-threshold').val())) {
+ if (nfCommon.isBlank($('#back-pressure-data-size-threshold').val())) {
errors.push('Back pressure data size threshold must be specified');
}
if (errors.length > 0) {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Connection Configuration',
- dialogContent: common.formatUnorderedList(errors)
+ dialogContent: nfCommon.formatUnorderedList(errors)
});
return false;
} else {
@@ -1130,7 +1130,7 @@
$('#relationship-names-container').hide();
// clear the id field
- common.clearField('connection-id');
+ nfCommon.clearField('connection-id');
// hide all the connection source panels
$('#processor-source').hide();
@@ -1168,12 +1168,12 @@
/**
* Initialize the connection configuration.
*
- * @param birdseye The reference to the birdseye controller.
- * @param graph The reference to the graph controller.
+ * @param nfBirdseyeRef The nfBirdseye module.
+ * @param nfGraphRef The nfGraph module.
*/
- init: function (birdseye, graph) {
- nfBirdseye = birdseye;
- nfGraph = graph;
+ init: function (nfBirdseyeRef, nfGraphRef) {
+ nfBirdseye = nfBirdseyeRef;
+ nfGraph = nfGraphRef;
// initially hide the relationship names container
$('#relationship-names-container').hide();
@@ -1188,7 +1188,7 @@
resetDialog();
},
open: function () {
- common.toggleScrollable($('#' + this.find('.tab-container').attr('id') + '-content').get(0));
+ nfCommon.toggleScrollable($('#' + this.find('.tab-container').attr('id') + '-content').get(0));
}
}
});
@@ -1226,7 +1226,7 @@
opacity: 0.6
});
$('#prioritizer-available, #prioritizer-selected').disableSelection();
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
},
/**
@@ -1237,17 +1237,17 @@
*/
addAvailablePrioritizer: function (prioritizerContainer, prioritizerType) {
var type = prioritizerType.type;
- var name = common.substringAfterLast(type, '.');
+ var name = nfCommon.substringAfterLast(type, '.');
// add the prioritizers to the available list
var prioritizerList = $(prioritizerContainer);
var prioritizer = $('
').append($('
').text(name)).attr('id', type).addClass('ui-state-default').appendTo(prioritizerList);
// add the description if applicable
- if (common.isDefinedAndNotNull(prioritizerType.description)) {
+ if (nfCommon.isDefinedAndNotNull(prioritizerType.description)) {
$('
').appendTo(prioritizer).qtip($.extend({
- content: common.escapeHtml(prioritizerType.description)
- }, common.config.tooltipConfig));
+ content: nfCommon.escapeHtml(prioritizerType.description)
+ }, nfCommon.config.tooltipConfig));
}
},
@@ -1283,7 +1283,7 @@
$('#connection-configuration div.relationship-name').ellipsis();
// fill in the connection id
- common.populateField('connection-id', null);
+ nfCommon.populateField('connection-id', null);
// show the border if necessary
var relationshipNames = $('#relationship-names');
@@ -1309,12 +1309,12 @@
var connection = connectionEntry.component;
// identify the source component
- var sourceComponentId = canvasUtils.getConnectionSourceComponentId(connectionEntry);
+ var sourceComponentId = nfCanvasUtils.getConnectionSourceComponentId(connectionEntry);
var source = d3.select('#id-' + sourceComponentId);
// identify the destination component
- if (common.isUndefinedOrNull(destination)) {
- var destinationComponentId = canvasUtils.getConnectionDestinationComponentId(connectionEntry);
+ if (nfCommon.isUndefinedOrNull(destination)) {
+ var destinationComponentId = nfCanvasUtils.getConnectionDestinationComponentId(connectionEntry);
destination = d3.select('#id-' + destinationComponentId);
}
@@ -1324,7 +1324,7 @@
var selectedRelationships = connection.selectedRelationships;
// show the available relationship if applicable
- if (common.isDefinedAndNotNull(availableRelationships) || common.isDefinedAndNotNull(selectedRelationships)) {
+ if (nfCommon.isDefinedAndNotNull(availableRelationships) || nfCommon.isDefinedAndNotNull(selectedRelationships)) {
// populate the available connections
$.each(availableRelationships, function (i, name) {
createRelationshipOption(name);
@@ -1351,14 +1351,14 @@
}
// if the source is a process group or remote process group, select the appropriate port if applicable
- if (canvasUtils.isProcessGroup(source) || canvasUtils.isRemoteProcessGroup(source)) {
+ if (nfCanvasUtils.isProcessGroup(source) || nfCanvasUtils.isRemoteProcessGroup(source)) {
// populate the connection source details
$('#connection-source-id').val(connection.source.id);
$('#read-only-output-port-name').text(connection.source.name).attr('title', connection.source.name);
}
// if the destination is a process gorup or remote process group, select the appropriate port if applicable
- if (canvasUtils.isProcessGroup(destination) || canvasUtils.isRemoteProcessGroup(destination)) {
+ if (nfCanvasUtils.isProcessGroup(destination) || nfCanvasUtils.isRemoteProcessGroup(destination)) {
var destinationData = destination.datum();
// when the group ids differ, its a new destination component so we don't want to preselect any port
@@ -1376,7 +1376,7 @@
$('#back-pressure-data-size-threshold').val(connection.backPressureDataSizeThreshold);
// format the connection id
- common.populateField('connection-id', connection.id);
+ nfCommon.populateField('connection-id', connection.id);
// handle each prioritizer
$.each(connection.prioritizers, function (i, type) {
@@ -1400,7 +1400,7 @@
var selectedRelationships = getSelectedRelationships();
// see if we're working with a processor as the source
- if (canvasUtils.isProcessor(source)) {
+ if (nfCanvasUtils.isProcessor(source)) {
if (selectedRelationships.length > 0) {
// if there are relationships selected update
updateConnection(selectedRelationships).done(function () {
@@ -1410,7 +1410,7 @@
});
} else {
// inform users that no relationships were selected and the source is a processor
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Connection Configuration',
dialogContent: 'The connection must have at least one relationship selected.'
});
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js
index 2dbb5131a0..759860b3b4 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js
@@ -26,8 +26,8 @@
'nf.ErrorHandler',
'nf.Client',
'nf.CanvasUtils'],
- function ($, d3, common, dialog, errorHandler, client, canvasUtils) {
- return (nf.Connection = factory($, d3, common, dialog, errorHandler, client, canvasUtils));
+ function ($, d3, nfCommon, nfDialog, nfErrorHandler, nfClient, nfCanvasUtils) {
+ return (nf.Connection = factory($, d3, nfCommon, nfDialog, nfErrorHandler, nfClient, nfCanvasUtils));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.Connection =
@@ -47,7 +47,7 @@
root.nf.Client,
root.nf.CanvasUtils);
}
-}(this, function ($, d3, common, dialog, errorHandler, client, canvasUtils) {
+}(this, function ($, d3, nfCommon, nfDialog, nfErrorHandler, nfClient, nfCanvasUtils) {
'use strict';
var nfCanvas;
@@ -197,7 +197,7 @@
for (var i = 0; i < line.length; i++) {
if (i + 1 < line.length) {
var distance = distanceToSegment(p, line[i], line[i + 1]);
- if (common.isUndefined(minimumDistance) || distance < minimumDistance) {
+ if (nfCommon.isUndefined(minimumDistance) || distance < minimumDistance) {
minimumDistance = distance;
index = i;
}
@@ -232,7 +232,7 @@
* @param {object} terminal
*/
var isGroup = function (terminal) {
- return terminal.groupId !== canvasUtils.getGroupId() && (isInputPortType(terminal.type) || isOutputPortType(terminal.type));
+ return terminal.groupId !== nfCanvasUtils.getGroupId() && (isInputPortType(terminal.type) || isOutputPortType(terminal.type));
};
/**
@@ -242,7 +242,7 @@
* @return {boolean} Whether expiration is configured
*/
var isExpirationConfigured = function (connection) {
- if (common.isDefinedAndNotNull(connection.flowFileExpiration)) {
+ if (nfCommon.isDefinedAndNotNull(connection.flowFileExpiration)) {
var match = connection.flowFileExpiration.match(/^(\d+).*/);
if (match !== null && match.length > 0) {
if (parseInt(match[0], 10) > 0) {
@@ -319,7 +319,7 @@
var unavailable = false;
// verify each selected relationship is still available
- if (common.isDefinedAndNotNull(d.component.selectedRelationships) && common.isDefinedAndNotNull(d.component.availableRelationships)) {
+ if (nfCommon.isDefinedAndNotNull(d.component.selectedRelationships) && nfCommon.isDefinedAndNotNull(d.component.availableRelationships)) {
$.each(d.component.selectedRelationships, function (_, selectedRelationship) {
if ($.inArray(selectedRelationship, d.component.availableRelationships) === -1) {
unavailable = true;
@@ -366,7 +366,7 @@
// determines whether the connection is in warning based on the object count threshold
var isWarningCount = function (d) {
var percentUseCount = d.status.aggregateSnapshot.percentUseCount;
- if (common.isDefinedAndNotNull(percentUseCount)) {
+ if (nfCommon.isDefinedAndNotNull(percentUseCount)) {
return percentUseCount >= 61 && percentUseCount <= 85;
}
@@ -376,7 +376,7 @@
// determines whether the connection is in error based on the object count threshold
var isErrorCount = function (d) {
var percentUseCount = d.status.aggregateSnapshot.percentUseCount;
- if (common.isDefinedAndNotNull(percentUseCount)) {
+ if (nfCommon.isDefinedAndNotNull(percentUseCount)) {
return percentUseCount > 85;
}
@@ -391,7 +391,7 @@
// determines whether the connection is in warning based on the data size threshold
var isWarningBytes = function (d) {
var percentUseBytes = d.status.aggregateSnapshot.percentUseBytes;
- if (common.isDefinedAndNotNull(percentUseBytes)) {
+ if (nfCommon.isDefinedAndNotNull(percentUseBytes)) {
return percentUseBytes >= 61 && percentUseBytes <= 85;
}
@@ -401,7 +401,7 @@
// determines whether the connection is in error based on the data size threshold
var isErrorBytes = function (d) {
var percentUseBytes = d.status.aggregateSnapshot.percentUseBytes;
- if (common.isDefinedAndNotNull(percentUseBytes)) {
+ if (nfCommon.isDefinedAndNotNull(percentUseBytes)) {
return percentUseBytes > 85;
}
@@ -419,10 +419,10 @@
var transition = false;
// extract the options if specified
- if (common.isDefinedAndNotNull(options)) {
- updatePath = common.isDefinedAndNotNull(options.updatePath) ? options.updatePath : updatePath;
- updateLabel = common.isDefinedAndNotNull(options.updateLabel) ? options.updateLabel : updateLabel;
- transition = common.isDefinedAndNotNull(options.transition) ? options.transition : transition;
+ if (nfCommon.isDefinedAndNotNull(options)) {
+ updatePath = nfCommon.isDefinedAndNotNull(options.updatePath) ? options.updatePath : updatePath;
+ updateLabel = nfCommon.isDefinedAndNotNull(options.updateLabel) ? options.updateLabel : updateLabel;
+ transition = nfCommon.isDefinedAndNotNull(options.transition) ? options.transition : transition;
}
if (updatePath === true) {
@@ -432,7 +432,7 @@
if (d.permissions.canRead) {
// if there are more than one selected relationship, mark this as grouped
- if (common.isDefinedAndNotNull(d.component.selectedRelationships) && d.component.selectedRelationships.length > 1) {
+ if (nfCommon.isDefinedAndNotNull(d.component.selectedRelationships) && d.component.selectedRelationships.length > 1) {
grouped = true;
}
}
@@ -507,7 +507,7 @@
if (updatePath === true) {
// calculate the start and end points
- var sourceComponentId = canvasUtils.getConnectionSourceComponentId(d);
+ var sourceComponentId = nfCanvasUtils.getConnectionSourceComponentId(d);
var sourceData = d3.select('#id-' + sourceComponentId).datum();
var end;
@@ -524,7 +524,7 @@
// if we are currently dragging the endpoint to a new target, use that
// position, otherwise we need to calculate it for the current target
- if (common.isDefinedAndNotNull(d.end) && d.end.dragging === true) {
+ if (nfCommon.isDefinedAndNotNull(d.end) && d.end.dragging === true) {
// since we're dragging, use the same object thats bound to the endpoint drag event
end = d.end;
@@ -534,7 +534,7 @@
var newDestinationData = newDestination.datum();
// get the position on the new destination perimeter
- var newEnd = canvasUtils.getPerimeterPoint(endAnchor, {
+ var newEnd = nfCanvasUtils.getPerimeterPoint(endAnchor, {
'x': newDestinationData.position.x,
'y': newDestinationData.position.y,
'width': newDestinationData.dimensions.width,
@@ -546,11 +546,11 @@
end.y = newEnd.y;
}
} else {
- var destinationComponentId = canvasUtils.getConnectionDestinationComponentId(d);
+ var destinationComponentId = nfCanvasUtils.getConnectionDestinationComponentId(d);
var destinationData = d3.select('#id-' + destinationComponentId).datum();
// get the position on the destination perimeter
- end = canvasUtils.getPerimeterPoint(endAnchor, {
+ end = nfCanvasUtils.getPerimeterPoint(endAnchor, {
'x': destinationData.position.x,
'y': destinationData.position.y,
'width': destinationData.dimensions.width,
@@ -567,7 +567,7 @@
}
// get the position on the source perimeter
- var start = canvasUtils.getPerimeterPoint(startAnchor, {
+ var start = nfCanvasUtils.getPerimeterPoint(startAnchor, {
'x': sourceData.position.x,
'y': sourceData.position.y,
'width': sourceData.dimensions.width,
@@ -579,21 +579,21 @@
d.end = end;
// update the connection paths
- canvasUtils.transition(connection.select('path.connection-path'), transition)
+ nfCanvasUtils.transition(connection.select('path.connection-path'), transition)
.attr({
'd': function () {
var datum = [d.start].concat(d.bends, [d.end]);
return lineGenerator(datum);
}
});
- canvasUtils.transition(connection.select('path.connection-selection-path'), transition)
+ nfCanvasUtils.transition(connection.select('path.connection-selection-path'), transition)
.attr({
'd': function () {
var datum = [d.start].concat(d.bends, [d.end]);
return lineGenerator(datum);
}
});
- canvasUtils.transition(connection.select('path.connection-path-selectable'), transition)
+ nfCanvasUtils.transition(connection.select('path.connection-path-selectable'), transition)
.attr({
'd': function () {
var datum = [d.start].concat(d.bends, [d.end]);
@@ -634,7 +634,7 @@
.call(nfContextMenu.activate);
// update the start point
- canvasUtils.transition(startpoints, transition)
+ nfCanvasUtils.transition(startpoints, transition)
.attr('transform', function (p) {
return 'translate(' + (p.x - 4) + ', ' + (p.y - 4) + ')';
});
@@ -664,7 +664,7 @@
.call(nfContextMenu.activate);
// update the end point
- canvasUtils.transition(endpoints, transition)
+ nfCanvasUtils.transition(endpoints, transition)
.attr('transform', function (p) {
return 'translate(' + (p.x - 4) + ', ' + (p.y - 4) + ')';
});
@@ -695,10 +695,10 @@
var connectionData = connection.datum();
// if this is a self loop prevent removing the last two bends
- var sourceComponentId = canvasUtils.getConnectionSourceComponentId(connectionData);
- var destinationComponentId = canvasUtils.getConnectionDestinationComponentId(connectionData);
+ var sourceComponentId = nfCanvasUtils.getConnectionSourceComponentId(connectionData);
+ var destinationComponentId = nfCanvasUtils.getConnectionDestinationComponentId(connectionData);
if (sourceComponentId === destinationComponentId && d.component.bends.length <= 2) {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Connection',
dialogContent: 'Looping connections must have at least two bend points.'
});
@@ -744,7 +744,7 @@
.call(nfContextMenu.activate);
// update the midpoints
- canvasUtils.transition(midpoints, transition)
+ nfCanvasUtils.transition(midpoints, transition)
.attr('transform', function (p) {
return 'translate(' + (p.x - 4) + ', ' + (p.y - 4) + ')';
});
@@ -881,7 +881,7 @@
connectionFromLabel.text(null).selectAll('title').remove();
// apply ellipsis to the label as necessary
- canvasUtils.ellipsis(connectionFromLabel, d.component.source.name);
+ nfCanvasUtils.ellipsis(connectionFromLabel, d.component.source.name);
}).append('title').text(function () {
return d.component.source.name;
});
@@ -990,7 +990,7 @@
connectionToLabel.text(null).selectAll('title').remove();
// apply ellipsis to the label as necessary
- canvasUtils.ellipsis(connectionToLabel, d.component.destination.name);
+ nfCanvasUtils.ellipsis(connectionToLabel, d.component.destination.name);
}).append('title').text(function (d) {
return d.component.destination.name;
});
@@ -1033,10 +1033,10 @@
// -----------------------
// get the connection name
- var connectionNameValue = canvasUtils.formatConnectionName(d.component);
+ var connectionNameValue = nfCanvasUtils.formatConnectionName(d.component);
// is there a name to render
- if (!common.isBlank(connectionNameValue)) {
+ if (!nfCommon.isBlank(connectionNameValue)) {
// see if the connection name label is already rendered
if (connectionName.empty()) {
connectionName = connectionLabelContainer.append('g')
@@ -1095,7 +1095,7 @@
connectionToLabel.text(null).selectAll('title').remove();
// apply ellipsis to the label as necessary
- canvasUtils.ellipsis(connectionToLabel, connectionNameValue);
+ nfCanvasUtils.ellipsis(connectionToLabel, connectionNameValue);
}).append('title').text(function () {
return connectionNameValue;
});
@@ -1333,21 +1333,21 @@
// update backpressure object fill
connectionLabelContainer.select('rect.backpressure-object')
.classed('not-configured', function () {
- return common.isUndefinedOrNull(d.status.aggregateSnapshot.percentUseCount);
+ return nfCommon.isUndefinedOrNull(d.status.aggregateSnapshot.percentUseCount);
});
connectionLabelContainer.selectAll('rect.backpressure-tick.object')
.classed('not-configured', function () {
- return common.isUndefinedOrNull(d.status.aggregateSnapshot.percentUseCount);
+ return nfCommon.isUndefinedOrNull(d.status.aggregateSnapshot.percentUseCount);
});
// update backpressure data size fill
connectionLabelContainer.select('rect.backpressure-data-size')
.classed('not-configured', function () {
- return common.isUndefinedOrNull(d.status.aggregateSnapshot.percentUseBytes);
+ return nfCommon.isUndefinedOrNull(d.status.aggregateSnapshot.percentUseBytes);
});
connectionLabelContainer.selectAll('rect.backpressure-tick.data-size')
.classed('not-configured', function () {
- return common.isUndefinedOrNull(d.status.aggregateSnapshot.percentUseBytes);
+ return nfCommon.isUndefinedOrNull(d.status.aggregateSnapshot.percentUseBytes);
});
if (d.permissions.canWrite) {
@@ -1365,7 +1365,7 @@
}
// update the position of the label if possible
- canvasUtils.transition(connection.select('g.connection-label-container'), transition)
+ nfCanvasUtils.transition(connection.select('g.connection-label-container'), transition)
.attr('transform', function () {
var label = d3.select(this).select('rect.body');
var position = getLabelPosition(label);
@@ -1389,7 +1389,7 @@
// queued count value
updated.select('text.queued tspan.count')
.text(function (d) {
- return common.substringBeforeFirst(d.status.aggregateSnapshot.queued, ' ');
+ return nfCommon.substringBeforeFirst(d.status.aggregateSnapshot.queued, ' ');
});
var backpressurePercentDataSize = updated.select('rect.backpressure-percent.data-size');
@@ -1397,7 +1397,7 @@
.duration(400)
.attr({
'width': function (d) {
- if (common.isDefinedAndNotNull(d.status.aggregateSnapshot.percentUseBytes)) {
+ if (nfCommon.isDefinedAndNotNull(d.status.aggregateSnapshot.percentUseBytes)) {
return (backpressureBarWidth * d.status.aggregateSnapshot.percentUseBytes) / 100;
} else {
return 0;
@@ -1416,7 +1416,7 @@
});
updated.select('rect.backpressure-data-size').select('title').text(function (d) {
- if (common.isDefinedAndNotNull(d.status.aggregateSnapshot.percentUseBytes)) {
+ if (nfCommon.isDefinedAndNotNull(d.status.aggregateSnapshot.percentUseBytes)) {
return 'Queue is ' + d.status.aggregateSnapshot.percentUseBytes + '% full based on Back Pressure Data Size Threshold';
} else {
return 'Back Pressure Data Size Threshold is not configured';
@@ -1429,7 +1429,7 @@
// queued size value
updated.select('text.queued tspan.size')
.text(function (d) {
- return ' ' + common.substringAfterFirst(d.status.aggregateSnapshot.queued, ' ');
+ return ' ' + nfCommon.substringAfterFirst(d.status.aggregateSnapshot.queued, ' ');
});
var backpressurePercentObject = updated.select('rect.backpressure-percent.object');
@@ -1437,7 +1437,7 @@
.duration(400)
.attr({
'width': function (d) {
- if (common.isDefinedAndNotNull(d.status.aggregateSnapshot.percentUseCount)) {
+ if (nfCommon.isDefinedAndNotNull(d.status.aggregateSnapshot.percentUseCount)) {
return (backpressureBarWidth * d.status.aggregateSnapshot.percentUseCount) / 100;
} else {
return 0;
@@ -1456,7 +1456,7 @@
});
updated.select('rect.backpressure-object').select('title').text(function (d) {
- if (common.isDefinedAndNotNull(d.status.aggregateSnapshot.percentUseCount)) {
+ if (nfCommon.isDefinedAndNotNull(d.status.aggregateSnapshot.percentUseCount)) {
return 'Queue is ' + d.status.aggregateSnapshot.percentUseCount + '% full based on Back Pressure Object Threshold';
} else {
return 'Back Pressure Object Threshold is not configured';
@@ -1498,7 +1498,7 @@
*/
var save = function (d, connection) {
var entity = {
- 'revision': client.getRevision(d),
+ 'revision': nfClient.getRevision(d),
'component': connection
};
@@ -1513,12 +1513,12 @@
nfConnection.set(response);
}).fail(function (xhr, status, error) {
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Connection',
- dialogContent: common.escapeHtml(xhr.responseText)
+ dialogContent: nfCommon.escapeHtml(xhr.responseText)
});
} else {
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
}
});
};
@@ -1527,7 +1527,7 @@
var removeConnections = function (removed) {
// consider reloading source/destination of connection being removed
removed.each(function (d) {
- canvasUtils.reloadConnectionSourceAndDestination(d.sourceId, d.destinationId);
+ nfCanvasUtils.reloadConnectionSourceAndDestination(d.sourceId, d.destinationId);
});
// remove the connection
@@ -1540,9 +1540,15 @@
selfLoopYOffset: 25
},
- init: function (selectable, contextMenu) {
- nfSelectable = selectable;
- nfContextMenu = contextMenu;
+ /**
+ * Initializes the connection.
+ *
+ * @param nfSelectableRef The nfSelectable module.
+ * @param nfContextMenuRef The nfContextMenu module.
+ */
+ init: function (nfSelectableRef, nfContextMenuRef) {
+ nfSelectable = nfSelectableRef;
+ nfContextMenu = nfContextMenuRef;
connectionMap = d3.map();
removedCache = d3.map();
@@ -1638,7 +1644,7 @@
// ensure the new destination is valid
d3.select('g.hover').classed('connectable-destination', function () {
- return canvasUtils.isValidConnectionDestination(d3.select(this));
+ return nfCanvasUtils.isValidConnectionDestination(d3.select(this));
});
// redraw this connection
@@ -1667,11 +1673,11 @@
});
} else {
// prompt for the new port if appropriate
- if (canvasUtils.isProcessGroup(destination) || canvasUtils.isRemoteProcessGroup(destination)) {
+ if (nfCanvasUtils.isProcessGroup(destination) || nfCanvasUtils.isRemoteProcessGroup(destination)) {
// user will select new port and updated connect details will be set accordingly
nfConnectionConfiguration.showConfiguration(connection, destination).done(function () {
// reload the previous destination
- canvasUtils.reloadConnectionSourceAndDestination(null, previousDestinationId);
+ nfCanvasUtils.reloadConnectionSourceAndDestination(null, previousDestinationId);
}).fail(function () {
// reset the connection
connection.call(updateConnections, {
@@ -1682,15 +1688,15 @@
} else {
// get the destination details
var destinationData = destination.datum();
- var destinationType = canvasUtils.getConnectableTypeForDestination(destination);
+ var destinationType = nfCanvasUtils.getConnectableTypeForDestination(destination);
var connectionEntity = {
- 'revision': client.getRevision(connectionData),
+ 'revision': nfClient.getRevision(connectionData),
'component': {
'id': connectionData.id,
'destination': {
'id': destinationData.id,
- 'groupId': canvasUtils.getGroupId(),
+ 'groupId': nfCanvasUtils.getGroupId(),
'type': destinationType
}
}
@@ -1729,13 +1735,13 @@
nfConnection.set(response);
// reload the previous destination and the new source/destination
- canvasUtils.reloadConnectionSourceAndDestination(null, previousDestinationId);
- canvasUtils.reloadConnectionSourceAndDestination(response.sourceId, response.destinationId);
+ nfCanvasUtils.reloadConnectionSourceAndDestination(null, previousDestinationId);
+ nfCanvasUtils.reloadConnectionSourceAndDestination(response.sourceId, response.destinationId);
}).fail(function (xhr, status, error) {
if (xhr.status === 400 || xhr.status === 401 || xhr.status === 403 || xhr.status === 404 || xhr.status === 409) {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Connection',
- dialogContent: common.escapeHtml(xhr.responseText)
+ dialogContent: nfCommon.escapeHtml(xhr.responseText)
});
// reset the connection
@@ -1744,7 +1750,7 @@
'updateLabel': false
});
} else {
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
}
});
}
@@ -1781,10 +1787,10 @@
.attr('width', width)
.attr('height', height)
.attr('stroke-width', function () {
- return 1 / canvasUtils.scaleCanvasView();
+ return 1 / nfCanvasUtils.scaleCanvasView();
})
.attr('stroke-dasharray', function () {
- return 4 / canvasUtils.scaleCanvasView();
+ return 4 / nfCanvasUtils.scaleCanvasView();
})
.datum({
x: position.x,
@@ -1885,8 +1891,8 @@
*/
add: function (connectionEntities, options) {
var selectAll = false;
- if (common.isDefinedAndNotNull(options)) {
- selectAll = common.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
+ if (nfCommon.isDefinedAndNotNull(options)) {
+ selectAll = nfCommon.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
}
// get the current time
@@ -1906,7 +1912,7 @@
$.each(connectionEntities, function (_, connectionEntity) {
add(connectionEntity);
});
- } else if (common.isDefinedAndNotNull(connectionEntities)) {
+ } else if (nfCommon.isDefinedAndNotNull(connectionEntities)) {
add(connectionEntities);
}
@@ -1962,7 +1968,7 @@
if (isDisconnected) {

// determine whether this connection and its components are included within the selection
- isDisconnected = components.has(canvasUtils.getConnectionSourceComponentId(connection)) && components.has(canvasUtils.getConnectionDestinationComponentId(connection));
+ isDisconnected = components.has(nfCanvasUtils.getConnectionSourceComponentId(connection)) && components.has(nfCanvasUtils.getConnectionDestinationComponentId(connection));
}
});
}
@@ -1978,16 +1984,16 @@
set: function (connectionEntities, options) {
var selectAll = false;
var transition = false;
- if (common.isDefinedAndNotNull(options)) {
- selectAll = common.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
- transition = common.isDefinedAndNotNull(options.transition) ? options.transition : transition;
+ if (nfCommon.isDefinedAndNotNull(options)) {
+ selectAll = nfCommon.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
+ transition = nfCommon.isDefinedAndNotNull(options.transition) ? options.transition : transition;
}
var set = function (proposedConnectionEntity) {
var currentConnectionEntity = connectionMap.get(proposedConnectionEntity.id);
// set the connection if appropriate due to revision and wasn't previously removed
- if (client.isNewerRevision(currentConnectionEntity, proposedConnectionEntity) && !removedCache.has(proposedConnectionEntity.id)) {
+ if (nfClient.isNewerRevision(currentConnectionEntity, proposedConnectionEntity) && !removedCache.has(proposedConnectionEntity.id)) {
connectionMap.set(proposedConnectionEntity.id, $.extend({
type: 'Connection'
}, proposedConnectionEntity));
@@ -2010,7 +2016,7 @@
$.each(connectionEntities, function (_, connectionEntity) {
set(connectionEntity);
});
- } else if (common.isDefinedAndNotNull(connectionEntities)) {
+ } else if (nfCommon.isDefinedAndNotNull(connectionEntities)) {
set(connectionEntities);
}
@@ -2031,7 +2037,7 @@
* @param {string} connectionId
*/
refresh: function (connectionId) {
- if (common.isDefinedAndNotNull(connectionId)) {
+ if (nfCommon.isDefinedAndNotNull(connectionId)) {
d3.select('#id-' + connectionId).call(updateConnections, {
'updatePath': true,
'updateLabel': true
@@ -2134,7 +2140,7 @@
var connections = [];
connectionMap.forEach(function (_, entry) {
// see if this component is the source or destination of this connection
- if (canvasUtils.getConnectionSourceComponentId(entry) === id || canvasUtils.getConnectionDestinationComponentId(entry) === id) {
+ if (nfCanvasUtils.getConnectionSourceComponentId(entry) === id || nfCanvasUtils.getConnectionDestinationComponentId(entry) === id) {
connections.push(entry);
}
});
@@ -2148,7 +2154,7 @@
* @param {string} id
*/
get: function (id) {
- if (common.isUndefined(id)) {
+ if (nfCommon.isUndefined(id)) {
return connectionMap.values();
} else {
return connectionMap.get(id);
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-context-menu.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-context-menu.js
index 092297f4ee..4013167c4f 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-context-menu.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-context-menu.js
@@ -21,30 +21,27 @@
if (typeof define === 'function' && define.amd) {
define(['jquery',
'd3',
- 'nf.ErrorHandler',
'nf.Common',
'nf.CanvasUtils',
'nf.ng.Bridge'],
- function ($, d3, errorHandler, common, canvasUtils, angularBridge) {
- return (nf.ContextMenu = factory($, d3, errorHandler, common, canvasUtils, angularBridge));
+ function ($, d3, nfCommon, nfCanvasUtils, nfNgBridge) {
+ return (nf.ContextMenu = factory($, d3, nfCommon, nfCanvasUtils, nfNgBridge));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ContextMenu =
factory(require('jquery'),
require('d3'),
- require('nf.ErrorHandler'),
require('nf.Common'),
require('nf.CanvasUtils'),
require('nf.ng.Bridge')));
} else {
nf.ContextMenu = factory(root.$,
root.d3,
- root.nf.ErrorHandler,
root.nf.Common,
root.nf.CanvasUtils,
root.nf.ng.Bridge);
}
-}(this, function ($, d3, errorHandler, common, canvasUtils, angularBridge) {
+}(this, function ($, d3, nfCommon, nfCanvasUtils, nfNgBridge) {
'use strict';
var nfActions;
@@ -55,7 +52,7 @@
* @param {selection} selection The selection of currently selected components
*/
var isNotRootGroup = function (selection) {
- return canvasUtils.getParentGroupId() !== null && selection.empty();
+ return nfCanvasUtils.getParentGroupId() !== null && selection.empty();
};
/**
@@ -64,7 +61,7 @@
* @param {selection} selection The selection of currently selected components
*/
var isConfigurable = function (selection) {
- return canvasUtils.isConfigurable(selection);
+ return nfCanvasUtils.isConfigurable(selection);
};
/**
@@ -73,7 +70,7 @@
* @param {selection} selection The selection of currently selected components
*/
var hasDetails = function (selection) {
- return canvasUtils.hasDetails(selection);
+ return nfCanvasUtils.hasDetails(selection);
};
/**
@@ -82,7 +79,7 @@
* @param {selection} selection The selection of currently selected components
*/
var isDeletable = function (selection) {
- return canvasUtils.areDeletable(selection);
+ return nfCanvasUtils.areDeletable(selection);
};
/**
@@ -91,7 +88,7 @@
* @param {selection} selection The selection of currently selected components
*/
var canCreateTemplate = function (selection) {
- return canvasUtils.canWrite() && (selection.empty() && canvasUtils.canRead(selection));
+ return nfCanvasUtils.canWrite() && (selection.empty() && nfCanvasUtils.canRead(selection));
};
/**
@@ -100,7 +97,7 @@
* @param {selection} selection The selection of currently selected components
*/
var canUploadTemplate = function (selection) {
- return canvasUtils.canWrite() && selection.empty();
+ return nfCanvasUtils.canWrite() && selection.empty();
};
/**
@@ -109,7 +106,7 @@
* @param {selection} selection The selection of currently selected components
*/
var canGroup = function (selection) {
- return canvasUtils.getComponentByType('Connection').isDisconnected(selection) && canvasUtils.canModify(selection);
+ return nfCanvasUtils.getComponentByType('Connection').isDisconnected(selection) && nfCanvasUtils.canModify(selection);
};
/**
@@ -118,7 +115,7 @@
* @param {selection} selection The selection of currently selected components
*/
var canEnable = function (selection) {
- return canvasUtils.canEnable(selection);
+ return nfCanvasUtils.canEnable(selection);
};
/**
@@ -127,7 +124,7 @@
* @param {selection} selection The selection of currently selected components
*/
var canDisable = function (selection) {
- return canvasUtils.canDisable(selection);
+ return nfCanvasUtils.canDisable(selection);
};
/**
@@ -136,7 +133,7 @@
* @param {selection} selection The selection of currently selected components
*/
var canManagePolicies = function (selection) {
- return canvasUtils.isConfigurableAuthorizer() && canvasUtils.canManagePolicies(selection);
+ return nfCanvasUtils.isConfigurableAuthorizer() && nfCanvasUtils.canManagePolicies(selection);
};
/**
@@ -145,7 +142,7 @@
* @param {selection} selection The selection of currently selected components
*/
var isRunnable = function (selection) {
- return canvasUtils.areRunnable(selection);
+ return nfCanvasUtils.areRunnable(selection);
};
/**
@@ -154,7 +151,7 @@
* @param {selection} selection The selection of currently selected components
*/
var isStoppable = function (selection) {
- return canvasUtils.areStoppable(selection);
+ return nfCanvasUtils.areStoppable(selection);
};
/**
@@ -168,7 +165,7 @@
return false;
}
- return canvasUtils.isProcessor(selection) || canvasUtils.isProcessGroup(selection) || canvasUtils.isRemoteProcessGroup(selection) || canvasUtils.isConnection(selection);
+ return nfCanvasUtils.isProcessor(selection) || nfCanvasUtils.isProcessGroup(selection) || nfCanvasUtils.isRemoteProcessGroup(selection) || nfCanvasUtils.isConnection(selection);
};
/**
@@ -181,11 +178,11 @@
if (selection.size() !== 1) {
return false;
}
- if (canvasUtils.canRead(selection) === false) {
+ if (nfCanvasUtils.canRead(selection) === false) {
return false;
}
- return canvasUtils.isProcessor(selection);
+ return nfCanvasUtils.isProcessor(selection);
};
/**
@@ -194,7 +191,7 @@
* @param {selection} selection The selection of currently selected components
*/
var isNotConnection = function (selection) {
- return selection.size() === 1 && !canvasUtils.isConnection(selection);
+ return selection.size() === 1 && !nfCanvasUtils.isConnection(selection);
};
/**
@@ -203,7 +200,7 @@
* @param {selection} selection The selection of currently selected components
*/
var isCopyable = function (selection) {
- return canvasUtils.isCopyable(selection);
+ return nfCanvasUtils.isCopyable(selection);
};
/**
@@ -212,7 +209,7 @@
* @param {selection} selection The selection of currently selected components
*/
var isPastable = function (selection) {
- return canvasUtils.isPastable();
+ return nfCanvasUtils.isPastable();
};
/**
@@ -234,11 +231,11 @@
if (selection.size() !== 1) {
return false;
}
- if (canvasUtils.canModify(selection) === false) {
+ if (nfCanvasUtils.canModify(selection) === false) {
return false;
}
- return canvasUtils.isConnection(selection);
+ return nfCanvasUtils.isConnection(selection);
};
/**
@@ -247,7 +244,7 @@
* @param {selection} selection The selection
*/
var canAlign = function (selection) {
- return canvasUtils.canAlign(selection);
+ return nfCanvasUtils.canAlign(selection);
};
/**
@@ -256,7 +253,7 @@
* @param {selection} selection The selection
*/
var isColorable = function (selection) {
- return canvasUtils.isColorable(selection);
+ return nfCanvasUtils.isColorable(selection);
};
/**
@@ -270,7 +267,7 @@
return false;
}
- return canvasUtils.isConnection(selection);
+ return nfCanvasUtils.isConnection(selection);
};
/**
@@ -284,9 +281,9 @@
return false;
}
- return canvasUtils.isFunnel(selection) || canvasUtils.isProcessor(selection) || canvasUtils.isProcessGroup(selection) ||
- canvasUtils.isRemoteProcessGroup(selection) || canvasUtils.isInputPort(selection) ||
- (canvasUtils.isOutputPort(selection) && canvasUtils.getParentGroupId() !== null);
+ return nfCanvasUtils.isFunnel(selection) || nfCanvasUtils.isProcessor(selection) || nfCanvasUtils.isProcessGroup(selection) ||
+ nfCanvasUtils.isRemoteProcessGroup(selection) || nfCanvasUtils.isInputPort(selection) ||
+ (nfCanvasUtils.isOutputPort(selection) && nfCanvasUtils.getParentGroupId() !== null);
};
/**
@@ -300,9 +297,9 @@
return false;
}
- return canvasUtils.isFunnel(selection) || canvasUtils.isProcessor(selection) || canvasUtils.isProcessGroup(selection) ||
- canvasUtils.isRemoteProcessGroup(selection) || canvasUtils.isOutputPort(selection) ||
- (canvasUtils.isInputPort(selection) && canvasUtils.getParentGroupId() !== null);
+ return nfCanvasUtils.isFunnel(selection) || nfCanvasUtils.isProcessor(selection) || nfCanvasUtils.isProcessGroup(selection) ||
+ nfCanvasUtils.isRemoteProcessGroup(selection) || nfCanvasUtils.isOutputPort(selection) ||
+ (nfCanvasUtils.isInputPort(selection) && nfCanvasUtils.getParentGroupId() !== null);
};
/**
@@ -315,11 +312,11 @@
if (selection.size() !== 1) {
return false;
}
- if (canvasUtils.canRead(selection) === false || canvasUtils.canModify(selection) === false) {
+ if (nfCanvasUtils.canRead(selection) === false || nfCanvasUtils.canModify(selection) === false) {
return false;
}
- if (canvasUtils.isProcessor(selection)) {
+ if (nfCanvasUtils.isProcessor(selection)) {
var processorData = selection.datum();
return processorData.component.persistsState === true;
} else {
@@ -338,7 +335,7 @@
return false;
}
- return canvasUtils.isProcessGroup(selection);
+ return nfCanvasUtils.isProcessGroup(selection);
};
/**
@@ -352,8 +349,8 @@
return false;
}
- return !canvasUtils.isLabel(selection) && !canvasUtils.isConnection(selection) && !canvasUtils.isProcessGroup(selection)
- && !canvasUtils.isRemoteProcessGroup(selection) && common.canAccessProvenance();
+ return !nfCanvasUtils.isLabel(selection) && !nfCanvasUtils.isConnection(selection) && !nfCanvasUtils.isProcessGroup(selection)
+ && !nfCanvasUtils.isRemoteProcessGroup(selection) && nfCommon.canAccessProvenance();
};
/**
@@ -366,11 +363,11 @@
if (selection.size() !== 1) {
return false;
}
- if (canvasUtils.canRead(selection) === false) {
+ if (nfCanvasUtils.canRead(selection) === false) {
return false;
}
- return canvasUtils.isRemoteProcessGroup(selection);
+ return nfCanvasUtils.isRemoteProcessGroup(selection);
};
/**
@@ -379,11 +376,11 @@
* @param {selection} selection
*/
var canStartTransmission = function (selection) {
- if (canvasUtils.canModify(selection) === false) {
+ if (nfCanvasUtils.canModify(selection) === false) {
return false;
}
- return canvasUtils.canAllStartTransmitting(selection);
+ return nfCanvasUtils.canAllStartTransmitting(selection);
};
/**
@@ -392,11 +389,11 @@
* @param {selection} selection
*/
var canStopTransmission = function (selection) {
- if (canvasUtils.canModify(selection) === false) {
+ if (nfCanvasUtils.canModify(selection) === false) {
return false;
}
- return canvasUtils.canAllStopTransmitting(selection);
+ return nfCanvasUtils.canAllStopTransmitting(selection);
};
/**
@@ -423,13 +420,13 @@
* @param {type} selection
*/
var canMoveToParent = function (selection) {
- if (canvasUtils.canModify(selection) === false) {
+ if (nfCanvasUtils.canModify(selection) === false) {
return false;
}
// TODO - also check can modify in parent
- return !selection.empty() && canvasUtils.getComponentByType('Connection').isDisconnected(selection) && canvasUtils.getParentGroupId() !== null;
+ return !selection.empty() && nfCanvasUtils.getComponentByType('Connection').isDisconnected(selection) && nfCanvasUtils.getParentGroupId() !== null;
};
/**
@@ -461,7 +458,7 @@
// create the img and conditionally add the style
var img = $('').addClass(item['clazz']).appendTo(menuItem);
- if (common.isDefinedAndNotNull(item['imgStyle'])) {
+ if (nfCommon.isDefinedAndNotNull(item['imgStyle'])) {
img.addClass(item['imgStyle']);
}
@@ -544,10 +541,10 @@
/**
* Initialize the context menu.
*
- * @param actions The reference to the actions controller.
+ * @param nfActionsRef The nfActions module.
*/
- init: function (actions) {
- nfActions = actions;
+ init: function (nfActionsRef) {
+ nfActions = nfActionsRef;
$('#context-menu').on('contextmenu', function (evt) {
// stop propagation and prevent default
@@ -566,12 +563,12 @@
var breadCrumb = $('#breadcrumbs').get(0);
// get the current selection
- var selection = canvasUtils.getSelection();
+ var selection = nfCanvasUtils.getSelection();
// consider each component action for the current selection
$.each(actions, function (_, action) {
// determine if this action is application for this selection
- if (action.condition(selection, canvasUtils.getComponentByType('Connection'))) {
+ if (action.condition(selection, nfCanvasUtils.getComponentByType('Connection'))) {
var menuItem = action.menuItem;
addMenuItem(contextMenu, {
@@ -603,7 +600,7 @@
});
// inform Angular app incase we've click on the canvas
- angularBridge.digest();
+ nfNgBridge.digest();
},
/**
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
index 45ddec51df..2bbc8c2172 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
@@ -32,8 +32,8 @@
'nf.CanvasUtils',
'nf.ReportingTask',
'nf.Processor'],
- function ($, d3, errorHandler, common, dialog, client, controllerServices, settings, universalCapture, customUi, canvasUtils, reportingTask, processor) {
- return (nf.ControllerService = factory($, d3, errorHandler, common, dialog, client, controllerServices, settings, universalCapture, customUi, canvasUtils, reportingTask, processor));
+ function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfControllerServices, nfSettings, nfUniversalCapture, nfCustomUi, nfCanvasUtils, nfReportingTask, nfProcessor) {
+ return (nf.ControllerService = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfControllerServices, nfSettings, nfUniversalCapture, nfCustomUi, nfCanvasUtils, nfReportingTask, nfProcessor));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ControllerService =
@@ -65,7 +65,7 @@
root.nf.ReportingTask,
root.nf.Processor);
}
-}(this, function ($, d3, errorHandler, common, dialog, client, controllerServices, settings, universalCapture, customUi, canvasUtils, reportingTask, processor) {
+}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfControllerServices, nfSettings, nfUniversalCapture, nfCustomUi, nfCanvasUtils, nfReportingTask, nfProcessor) {
'use strict';
var config = {
@@ -93,15 +93,15 @@
if (errors.length === 1) {
content = $('
').text(errors[0]);
} else {
- content = common.formatUnorderedList(errors);
+ content = nfCommon.formatUnorderedList(errors);
}
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
dialogContent: content,
headerText: 'Controller Service'
});
} else {
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
}
};
@@ -177,7 +177,7 @@
// service B that has been removed. attempting to enable/disable/remove A
// will attempt to reload B which is no longer a known service. also ensure
// we have permissions to reload the service
- if (common.isUndefined(controllerServiceEntity) || controllerServiceEntity.permissions.canRead === false) {
+ if (nfCommon.isUndefined(controllerServiceEntity) || controllerServiceEntity.permissions.canRead === false) {
return $.Deferred(function (deferred) {
deferred.reject();
}).promise();
@@ -189,7 +189,7 @@
dataType: 'json'
}).done(function (response) {
renderControllerService(serviceTable, response);
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
};
/**
@@ -239,8 +239,8 @@
var reference = referencingComponentEntity.component;
if (reference.referenceType === 'Processor') {
// reload the processor on the canvas if appropriate
- if (canvasUtils.getGroupId() === reference.groupId) {
- processor.reload(reference.id);
+ if (nfCanvasUtils.getGroupId() === reference.groupId) {
+ nfProcessor.reload(reference.id);
}
// update the current active thread count
@@ -253,7 +253,7 @@
}
} else if (reference.referenceType === 'ReportingTask') {
// reload the referencing reporting tasks
- reportingTask.reload(reference.id);
+ nfReportingTask.reload(reference.id);
// update the current active thread count
$('div.' + reference.id + '-active-threads').text(reference.activeThreadCount);
@@ -313,22 +313,22 @@
var currentBulletins = bulletinIcon.data('bulletins');
// update the bulletins if necessary
- if (common.doBulletinsDiffer(currentBulletins, bulletins)) {
+ if (nfCommon.doBulletinsDiffer(currentBulletins, bulletins)) {
bulletinIcon.data('bulletins', bulletins);
// format the new bulletins
- var formattedBulletins = common.getFormattedBulletins(bulletins);
+ var formattedBulletins = nfCommon.getFormattedBulletins(bulletins);
// if there are bulletins update them
if (bulletins.length > 0) {
- var list = common.formatUnorderedList(formattedBulletins);
+ var list = nfCommon.formatUnorderedList(formattedBulletins);
// update existing tooltip or initialize a new one if appropriate
if (bulletinIcon.data('qtip')) {
bulletinIcon.qtip('option', 'content.text', list);
} else {
bulletinIcon.addClass('has-bulletins').show().qtip($.extend({},
- canvasUtils.config.systemTooltipConfig,
+ nfCanvasUtils.config.systemTooltipConfig,
{
content: list
}));
@@ -350,16 +350,16 @@
var icon = $(this);
var state = referencingComponent.state.toLowerCase();
- if (state === 'stopped' && !common.isEmpty(referencingComponent.validationErrors)) {
+ if (state === 'stopped' && !nfCommon.isEmpty(referencingComponent.validationErrors)) {
state = 'invalid';
// add tooltip for the warnings
- var list = common.formatUnorderedList(referencingComponent.validationErrors);
+ var list = nfCommon.formatUnorderedList(referencingComponent.validationErrors);
if (icon.data('qtip')) {
icon.qtip('option', 'content.text', list);
} else {
icon.qtip($.extend({},
- canvasUtils.config.systemTooltipConfig,
+ nfCanvasUtils.config.systemTooltipConfig,
{
content: list
}));
@@ -382,16 +382,16 @@
var icon = $(this);
var state = referencingService.state === 'ENABLED' ? 'enabled' : 'disabled';
- if (state === 'disabled' && !common.isEmpty(referencingService.validationErrors)) {
+ if (state === 'disabled' && !nfCommon.isEmpty(referencingService.validationErrors)) {
state = 'invalid';
// add tooltip for the warnings
- var list = common.formatUnorderedList(referencingService.validationErrors);
+ var list = nfCommon.formatUnorderedList(referencingService.validationErrors);
if (icon.data('qtip')) {
icon.qtip('option', 'content.text', list);
} else {
icon.qtip($.extend({},
- canvasUtils.config.systemTooltipConfig,
+ nfCanvasUtils.config.systemTooltipConfig,
{
content: list
}));
@@ -430,7 +430,7 @@
* @param {array} referencingComponents
*/
var createReferencingComponents = function (serviceTable, referenceContainer, referencingComponents) {
- if (common.isEmpty(referencingComponents)) {
+ if (nfCommon.isEmpty(referencingComponents)) {
referenceContainer.append('
No referencing components.
');
return;
}
@@ -463,7 +463,7 @@
if (referencingComponent.referenceType === 'Processor') {
var processorLink = $('
').text(referencingComponent.name).on('click', function () {
// show the component
- canvasUtils.showComponent(referencingComponent.groupId, referencingComponent.id);
+ nfCanvasUtils.showComponent(referencingComponent.groupId, referencingComponent.id);
// close the dialog and shell
referenceContainer.closest('.dialog').modal('hide');
@@ -478,11 +478,11 @@
var processorBulletins = $('
').addClass(referencingComponent.id + '-bulletins');
// type
- var processorType = $('
').text(common.substringAfterLast(referencingComponent.type, '.'));
+ var processorType = $('
').text(nfCommon.substringAfterLast(referencingComponent.type, '.'));
// active thread count
var processorActiveThreadCount = $('
').addClass(referencingComponent.id + '-active-threads');
- if (common.isDefinedAndNotNull(referencingComponent.activeThreadCount) && referencingComponent.activeThreadCount > 0) {
+ if (nfCommon.isDefinedAndNotNull(referencingComponent.activeThreadCount) && referencingComponent.activeThreadCount > 0) {
processorActiveThreadCount.text('(' + referencingComponent.activeThreadCount + ')');
}
@@ -533,7 +533,7 @@
var serviceBulletins = $('
').addClass(referencingComponent.id + '-bulletins');
// type
- var serviceType = $('
').text(common.substringAfterLast(referencingComponent.type, '.'));
+ var serviceType = $('
').text(nfCommon.substringAfterLast(referencingComponent.type, '.'));
// service
var serviceItem = $('
').append(serviceTwist).append(serviceState).append(serviceBulletins).append(serviceLink).append(serviceType).append(referencingServiceReferencesContainer);
@@ -564,11 +564,11 @@
var reportingTaskBulletins = $('
').addClass(referencingComponent.id + '-bulletins');
// type
- var reportingTaskType = $('
').text(common.substringAfterLast(referencingComponent.type, '.'));
+ var reportingTaskType = $('
').text(nfCommon.substringAfterLast(referencingComponent.type, '.'));
// active thread count
var reportingTaskActiveThreadCount = $('
').addClass(referencingComponent.id + '-active-threads');
- if (common.isDefinedAndNotNull(referencingComponent.activeThreadCount) && referencingComponent.activeThreadCount > 0) {
+ if (nfCommon.isDefinedAndNotNull(referencingComponent.activeThreadCount) && referencingComponent.activeThreadCount > 0) {
reportingTaskActiveThreadCount.text('(' + referencingComponent.activeThreadCount + ')');
}
@@ -632,7 +632,7 @@
sourceId: ids
},
dataType: 'json'
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
};
/**
@@ -646,7 +646,7 @@
var setEnabled = function (serviceTable, controllerServiceEntity, enabled, pollCondition) {
// build the request entity
var updateControllerServiceEntity = {
- 'revision': client.getRevision(controllerServiceEntity),
+ 'revision': nfClient.getRevision(controllerServiceEntity),
'component': {
'id': controllerServiceEntity.id,
'state': enabled ? 'ENABLED' : 'DISABLED'
@@ -661,7 +661,7 @@
contentType: 'application/json'
}).done(function (response) {
renderControllerService(serviceTable, response);
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
// wait until the polling of each service finished
return $.Deferred(function (deferred) {
@@ -740,11 +740,11 @@
if (serviceOnly) {
if (referencingComponent.referenceType === 'ControllerService') {
- referencingComponentRevisions[referencingComponentEntity.id] = client.getRevision(referencingComponentEntity);
+ referencingComponentRevisions[referencingComponentEntity.id] = nfClient.getRevision(referencingComponentEntity);
}
} else {
if (referencingComponent.referenceType !== 'ControllerService') {
- referencingComponentRevisions[referencingComponentEntity.id] = client.getRevision(referencingComponentEntity);
+ referencingComponentRevisions[referencingComponentEntity.id] = nfClient.getRevision(referencingComponentEntity);
}
}
@@ -779,7 +779,7 @@
data: JSON.stringify(referenceEntity),
dataType: 'json',
contentType: 'application/json'
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
// Note: updated revisions will be retrieved after updateReferencingSchedulableComponents is invoked
@@ -859,7 +859,7 @@
conditionMet(serviceResponse.component, bulletinResponse.bulletinBoard.bulletins);
}).fail(function (xhr, status, error) {
deferred.reject();
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
});
};
@@ -881,7 +881,7 @@
conditionMet(controllerService, response.bulletinBoard.bulletins);
}).fail(function (xhr, status, error) {
deferred.reject();
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
});
}).promise();
};
@@ -1051,7 +1051,7 @@
data: JSON.stringify(referenceEntity),
dataType: 'json',
contentType: 'application/json'
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
// Note: updated revisions will be retrieved after updateReferencingServices is invoked
@@ -1263,7 +1263,7 @@
if (hasUnauthorizedReferencingComponent(controllerService.referencingComponents)) {
setCloseButton();
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Controller Service',
dialogContent: 'Unable to disable due to unauthorized referencing components.'
});
@@ -1312,7 +1312,7 @@
// inform the user if the action was canceled
if (canceled === true && $('#nf-ok-dialog').not(':visible')) {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Controller Service',
dialogContent: 'The request to disable has been canceled. Parts of this request may have already completed. Please verify the state of this service and all referencing components.'
});
@@ -1416,7 +1416,7 @@
if (scope === config.serviceAndReferencingComponents && hasUnauthorizedReferencingComponent(controllerService.referencingComponents)) {
setCloseButton();
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Controller Service',
dialogContent: 'Unable to enable due to unauthorized referencing components.'
});
@@ -1475,7 +1475,7 @@
// inform the user if the action was canceled
if (canceled === true && $('#nf-ok-dialog').not(':visible')) {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Controller Service',
dialogContent: 'The request to enable has been canceled. Parts of this request may have already completed. Please verify the state of this service and all referencing components.'
});
@@ -1497,7 +1497,7 @@
propertyName: propertyName
},
dataType: 'json'
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
};
/**
@@ -1513,7 +1513,7 @@
// determine if changes have been made
if (isSaveRequired()) {
// see if those changes should be saved
- dialog.showYesNoDialog({
+ nfDialog.showYesNoDialog({
headerText: 'Save',
dialogContent: 'Save changes before going to this Controller Service?',
noHandler: function () {
@@ -1540,12 +1540,12 @@
// ensure details are valid as far as we can tell
if (validateDetails(updatedControllerService)) {
- updatedControllerService['revision'] = client.getRevision(controllerServiceEntity);
+ updatedControllerService['revision'] = nfClient.getRevision(controllerServiceEntity);
var previouslyReferencedServiceIds = [];
$.each(identifyReferencedServiceDescriptors(controllerServiceEntity.component), function (_, descriptor) {
- var modifyingService = !common.isUndefined(updatedControllerService.component.properties) && !common.isUndefined(updatedControllerService.component.properties[descriptor.name]);
- var isCurrentlyConfigured = common.isDefinedAndNotNull(controllerServiceEntity.component.properties[descriptor.name]);
+ var modifyingService = !nfCommon.isUndefined(updatedControllerService.component.properties) && !nfCommon.isUndefined(updatedControllerService.component.properties[descriptor.name]);
+ var isCurrentlyConfigured = nfCommon.isDefinedAndNotNull(controllerServiceEntity.component.properties[descriptor.name]);
// if we are attempting to update a controller service reference
if (modifyingService && isCurrentlyConfigured) {
@@ -1587,7 +1587,7 @@
var referencedServiceDescriptors = [];
$.each(component.descriptors, function (_, descriptor) {
- if (common.isDefinedAndNotNull(descriptor.identifiesControllerService)) {
+ if (nfCommon.isDefinedAndNotNull(descriptor.identifiesControllerService)) {
referencedServiceDescriptors.push(descriptor);
}
});
@@ -1607,7 +1607,7 @@
var referencedServiceId = component.properties[descriptor.name];
// ensure the property is configured
- if (common.isDefinedAndNotNull(referencedServiceId) && $.trim(referencedServiceId).length > 0) {
+ if (nfCommon.isDefinedAndNotNull(referencedServiceId) && $.trim(referencedServiceId).length > 0) {
referencedServices.push(referencedServiceId);
}
});
@@ -1642,7 +1642,7 @@
}],
select: function () {
// remove all property detail dialogs
- universalCapture.removeAllPropertyDetailDialogs();
+ nfUniversalCapture.removeAllPropertyDetailDialogs();
// update the property table size in case this is the first time its rendered
if ($(this).text() === 'Properties') {
@@ -1666,8 +1666,8 @@
close: function () {
// empty the referencing components list
var referencingComponents = $('#controller-service-referencing-components');
- common.cleanUpTooltips(referencingComponents, 'div.referencing-component-state');
- common.cleanUpTooltips(referencingComponents, 'div.referencing-component-bulletins');
+ nfCommon.cleanUpTooltips(referencingComponents, 'div.referencing-component-state');
+ nfCommon.cleanUpTooltips(referencingComponents, 'div.referencing-component-bulletins');
referencingComponents.css('border-width', '0').empty();
// cancel any active edits
@@ -1677,13 +1677,13 @@
$('#controller-service-properties').propertytable('clear');
// clear the comments
- common.clearField('read-only-controller-service-comments');
+ nfCommon.clearField('read-only-controller-service-comments');
// removed the cached controller service details
$('#controller-service-configuration').removeData('controllerServiceDetails');
},
open: function () {
- common.toggleScrollable($('#' + this.find('.tab-container').attr('id') + '-content').get(0));
+ nfCommon.toggleScrollable($('#' + this.find('.tab-container').attr('id') + '-content').get(0));
}
}
});
@@ -1706,15 +1706,15 @@
// bulletins
$('#disable-controller-service-bulletins').removeClass('has-bulletins').removeData('bulletins').hide();
- common.cleanUpTooltips($('#disable-controller-service-service-container'), '#disable-controller-service-bulletins');
+ nfCommon.cleanUpTooltips($('#disable-controller-service-service-container'), '#disable-controller-service-bulletins');
// reset progress
$('div.disable-referencing-components').removeClass('ajax-loading ajax-complete ajax-error');
// referencing components
var referencingComponents = $('#disable-controller-service-referencing-components');
- common.cleanUpTooltips(referencingComponents, 'div.referencing-component-state');
- common.cleanUpTooltips(referencingComponents, 'div.referencing-component-bulletins');
+ nfCommon.cleanUpTooltips(referencingComponents, 'div.referencing-component-state');
+ nfCommon.cleanUpTooltips(referencingComponents, 'div.referencing-component-bulletins');
referencingComponents.css('border-width', '0').empty();
}
}
@@ -1752,15 +1752,15 @@
// bulletins
$('#enable-controller-service-bulletins').removeClass('has-bulletins').removeData('bulletins').hide();
- common.cleanUpTooltips($('#enable-controller-service-service-container'), '#enable-controller-service-bulletins');
+ nfCommon.cleanUpTooltips($('#enable-controller-service-service-container'), '#enable-controller-service-bulletins');
// reset progress
$('div.enable-referencing-components').removeClass('ajax-loading ajax-complete ajax-error');
// referencing components
var referencingComponents = $('#enable-controller-service-referencing-components');
- common.cleanUpTooltips(referencingComponents, 'div.referencing-component-state');
- common.cleanUpTooltips(referencingComponents, 'div.referencing-component-bulletins');
+ nfCommon.cleanUpTooltips(referencingComponents, 'div.referencing-component-state');
+ nfCommon.cleanUpTooltips(referencingComponents, 'div.referencing-component-bulletins');
referencingComponents.css('border-width', '0').empty();
}
}
@@ -1774,7 +1774,7 @@
* @argument {object} controllerServiceEntity The controller service
*/
showConfiguration: function (serviceTable, controllerServiceEntity) {
- if (common.isUndefined(currentTable)) {
+ if (nfCommon.isUndefined(currentTable)) {
currentTable = serviceTable;
}
var controllerServiceDialog = $('#controller-service-configuration');
@@ -1795,14 +1795,14 @@
// calculate the correct uri
var createdControllerService = response.component;
- if (common.isDefinedAndNotNull(createdControllerService.parentGroupId)) {
+ if (nfCommon.isDefinedAndNotNull(createdControllerService.parentGroupId)) {
controllerServicesUri = config.urls.api + '/flow/process-groups/' + encodeURIComponent(createdControllerService.parentGroupId) + '/controller-services';
} else {
controllerServicesUri = config.urls.api + '/flow/controller/controller-services';
}
// load the controller services accordingly
- return controllerServices.loadControllerServices(controllerServicesUri, serviceTable);
+ return nfControllerServices.loadControllerServices(controllerServicesUri, serviceTable);
},
goToServiceDeferred: function () {
return goToServiceFromProperty(serviceTable);
@@ -1843,8 +1843,8 @@
controllerServiceDialog.data('controllerServiceDetails', controllerServiceEntity);
// populate the controller service settings
- common.populateField('controller-service-id', controllerService['id']);
- common.populateField('controller-service-type', common.substringAfterLast(controllerService['type'], '.'));
+ nfCommon.populateField('controller-service-id', controllerService['id']);
+ nfCommon.populateField('controller-service-type', nfCommon.substringAfterLast(controllerService['type'], '.'));
$('#controller-service-name').val(controllerService['name']);
$('#controller-service-comments').val(controllerService['comments']);
@@ -1890,7 +1890,7 @@
}];
// determine if we should show the advanced button
- if (common.isDefinedAndNotNull(controllerService.customUiUrl) && controllerService.customUiUrl !== '') {
+ if (nfCommon.isDefinedAndNotNull(controllerService.customUiUrl) && controllerService.customUiUrl !== '') {
buttons.push({
buttonText: 'Advanced',
clazz: 'fa fa-cog button-icon',
@@ -1909,12 +1909,12 @@
$('#shell-close-button').click();
// show the custom ui
- customUi.showCustomUi(controllerServiceEntity, controllerService.customUiUrl, true).done(function () {
+ nfCustomUi.showCustomUi(controllerServiceEntity, controllerService.customUiUrl, true).done(function () {
// once the custom ui is closed, reload the controller service
reloadControllerServiceAndReferencingComponents(serviceTable, controllerService);
// show the settings
- settings.showSettings();
+ nfSettings.showSettings();
});
};
@@ -1924,7 +1924,7 @@
// determine if changes have been made
if (isSaveRequired()) {
// see if those changes should be saved
- dialog.showYesNoDialog({
+ nfDialog.showYesNoDialog({
headerText: 'Save',
dialogContent: 'Save changes before opening the advanced configuration?',
noHandler: openCustomUi,
@@ -1959,7 +1959,7 @@
updateReferencingComponentsBorder(referenceContainer);
$('#controller-service-properties').propertytable('resetTableSize');
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
},
/**
@@ -2012,10 +2012,10 @@
controllerServiceDialog.data('controllerServiceDetails', controllerServiceEntity);
// populate the controller service settings
- common.populateField('controller-service-id', controllerService['id']);
- common.populateField('controller-service-type', common.substringAfterLast(controllerService['type'], '.'));
- common.populateField('read-only-controller-service-name', controllerService['name']);
- common.populateField('read-only-controller-service-comments', controllerService['comments']);
+ nfCommon.populateField('controller-service-id', controllerService['id']);
+ nfCommon.populateField('controller-service-type', nfCommon.substringAfterLast(controllerService['type'], '.'));
+ nfCommon.populateField('read-only-controller-service-name', controllerService['name']);
+ nfCommon.populateField('read-only-controller-service-comments', controllerService['comments']);
// get the reference container
var referenceContainer = $('#controller-service-referencing-components');
@@ -2039,7 +2039,7 @@
}];
// determine if we should show the advanced button
- if (common.isDefinedAndNotNull(customUi) && common.isDefinedAndNotNull(controllerService.customUiUrl) && controllerService.customUiUrl !== '') {
+ if (nfCommon.isDefinedAndNotNull(nfCustomUi) && nfCommon.isDefinedAndNotNull(controllerService.customUiUrl) && controllerService.customUiUrl !== '') {
buttons.push({
buttonText: 'Advanced',
clazz: 'fa fa-cog button-icon',
@@ -2057,8 +2057,8 @@
$('#shell-close-button').click();
// show the custom ui
- customUi.showCustomUi(controllerServiceEntity, controllerService.customUiUrl, false).done(function () {
- settings.showSettings();
+ nfCustomUi.showCustomUi(controllerServiceEntity, controllerService.customUiUrl, false).done(function () {
+ nfSettings.showSettings();
});
}
}
@@ -2123,9 +2123,9 @@
*/
promptToDeleteController: function (serviceTable, controllerServiceEntity) {
// prompt for deletion
- dialog.showYesNoDialog({
+ nfDialog.showYesNoDialog({
headerText: 'Delete Controller Service',
- dialogContent: 'Delete controller service \'' + common.escapeHtml(controllerServiceEntity.component.name) + '\'?',
+ dialogContent: 'Delete controller service \'' + nfCommon.escapeHtml(controllerServiceEntity.component.name) + '\'?',
yesHandler: function () {
nfControllerService.remove(serviceTable, controllerServiceEntity);
}
@@ -2141,7 +2141,7 @@
remove: function (serviceTable, controllerServiceEntity) {
// prompt for removal?
- var revision = client.getRevision(controllerServiceEntity);
+ var revision = nfClient.getRevision(controllerServiceEntity);
$.ajax({
type: 'DELETE',
url: controllerServiceEntity.uri + '?' + $.param({
@@ -2159,7 +2159,7 @@
if (controllerServiceEntity.permissions.canRead) {
reloadControllerServiceReferences(serviceTable, controllerServiceEntity.component);
}
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
}
};
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-services.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-services.js
index 0bc5f60637..e3c4b62cb7 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-services.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-services.js
@@ -34,8 +34,8 @@
'nf.PolicyManagement',
'nf.ComponentState',
'nf.ng.Bridge'],
- function ($, d3, Slick, client, shell, processGroupConfiguration, canvasUtils, errorHandler, dialog, common, controllerService, processGroup, policyManagement, componentState, angularBridge) {
- return (nf.ControllerServices = factory($, d3, Slick, client, shell, processGroupConfiguration, canvasUtils, errorHandler, dialog, common, controllerService, processGroup, policyManagement, componentState, angularBridge));
+ function ($, d3, Slick, nfClient, nfShell, nfProcessGroupConfiguration, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon, nfControllerService, nfProcessGroup, nfPolicyManagement, nfComponentState, nfNgBridge) {
+ return (nf.ControllerServices = factory($, d3, Slick, nfClient, nfShell, nfProcessGroupConfiguration, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon, nfControllerService, nfProcessGroup, nfPolicyManagement, nfComponentState, nfNgBridge));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ControllerServices =
@@ -71,7 +71,7 @@
root.nf.ComponentState,
root.nf.ng.Bridge);
}
-}(this, function ($, d3, Slick, client, shell, processGroupConfiguration, canvasUtils, errorHandler, dialog, common, controllerService, processGroup, policyManagement, componentState, angularBridge) {
+}(this, function ($, d3, Slick, nfClient, nfShell, nfProcessGroupConfiguration, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon, nfControllerService, nfProcessGroup, nfPolicyManagement, nfComponentState, nfNgBridge) {
'use strict';
var dblClick = null;
@@ -100,7 +100,7 @@
* @param item controller service type
*/
var isSelectable = function (item) {
- return common.isBlank(item.usageRestriction) || common.canAccessRestrictedComponents();
+ return nfCommon.isBlank(item.usageRestriction) || nfCommon.canAccessRestrictedComponents();
};
/**
@@ -120,7 +120,7 @@
var controllerServiceTypesGrid = $('#controller-service-types-table').data('gridInstance');
// ensure the grid has been initialized
- if (common.isDefinedAndNotNull(controllerServiceTypesGrid)) {
+ if (nfCommon.isDefinedAndNotNull(controllerServiceTypesGrid)) {
var controllerServiceTypesData = controllerServiceTypesGrid.getData();
// update the search criteria
@@ -257,7 +257,7 @@
// ensure something was selected
if (selectedServiceType === '') {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Controller Service',
dialogContent: 'The type of controller service to create must be selected.'
});
@@ -276,7 +276,7 @@
var addControllerService = function (controllerServicesUri, serviceTable, controllerServiceType) {
// build the controller service entity
var controllerServiceEntity = {
- 'revision': client.getRevision({
+ 'revision': nfClient.getRevision({
'revision': {
'version': 0
}
@@ -307,7 +307,7 @@
var row = controllerServicesData.getRowById(controllerServiceEntity.id);
controllerServicesGrid.setSelectedRows([row]);
controllerServicesGrid.scrollRowIntoView(row);
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
// hide the dialog
$('#new-controller-service-dialog').modal('hide');
@@ -325,7 +325,7 @@
id: 'type',
name: 'Type',
field: 'label',
- formatter: common.typeFormatter,
+ formatter: nfCommon.typeFormatter,
sortable: false,
resizable: true
},
@@ -359,11 +359,11 @@
var controllerServiceType = controllerServiceTypesGrid.getDataItem(controllerServiceTypeIndex);
// set the controller service type description
- if (common.isDefinedAndNotNull(controllerServiceType)) {
+ if (nfCommon.isDefinedAndNotNull(controllerServiceType)) {
// show the selected controller service
$('#controller-service-description-container').show();
- if (common.isBlank(controllerServiceType.description)) {
+ if (nfCommon.isBlank(controllerServiceType.description)) {
$('#controller-service-type-description')
.attr('title', '')
.html('
No description specified');
@@ -385,7 +385,7 @@
}
});
controllerServiceTypesGrid.onViewportChanged.subscribe(function (e, args) {
- common.cleanUpTooltips($('#controller-service-types-table'), 'div.view-usage-restriction');
+ nfCommon.cleanUpTooltips($('#controller-service-types-table'), 'div.view-usage-restriction');
});
// wire up the dataview to the grid
@@ -412,8 +412,8 @@
var item = controllerServiceTypesData.getItemById(rowId);
// show the tooltip
- if (common.isDefinedAndNotNull(item.usageRestriction)) {
- usageRestriction.qtip($.extend({}, common.config.tooltipConfig, {
+ if (nfCommon.isDefinedAndNotNull(item.usageRestriction)) {
+ usageRestriction.qtip($.extend({}, nfCommon.config.tooltipConfig, {
content: item.usageRestriction,
position: {
container: $('#summary'),
@@ -446,10 +446,10 @@
// add the documented type
controllerServiceTypesData.addItem({
id: id++,
- label: common.substringAfterLast(documentedType.type, '.'),
+ label: nfCommon.substringAfterLast(documentedType.type, '.'),
type: documentedType.type,
- description: common.escapeHtml(documentedType.description),
- usageRestriction: common.escapeHtml(documentedType.usageRestriction),
+ description: nfCommon.escapeHtml(documentedType.description),
+ usageRestriction: nfCommon.escapeHtml(documentedType.usageRestriction),
tags: documentedType.tags.join(', ')
});
@@ -471,7 +471,7 @@
select: applyControllerServiceTypeFilter,
remove: applyControllerServiceTypeFilter
});
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
// initialize the controller service dialog
$('#new-controller-service-dialog').modal({
@@ -539,7 +539,7 @@
return '';
}
- return common.substringAfterLast(dataContext.component.type, '.');
+ return nfCommon.substringAfterLast(dataContext.component.type, '.');
};
/**
@@ -557,7 +557,7 @@
return '';
}
- if (common.isDefinedAndNotNull(dataContext.component.parentGroupId)) {
+ if (nfCommon.isDefinedAndNotNull(dataContext.component.parentGroupId)) {
return dataContext.component.parentGroupId;
} else {
return 'Controller';
@@ -574,7 +574,7 @@
// we know the process group for this controller service is part
// of the current breadcrumb trail
var canWriteProcessGroupParent = function (processGroupId) {
- var breadcrumbs = angularBridge.injector.get('breadcrumbsCtrl').getBreadcrumbs();
+ var breadcrumbs = nfNgBridge.injector.get('breadcrumbsCtrl').getBreadcrumbs();
var isAuthorized = false;
$.each(breadcrumbs, function (_, breadcrumbEntity) {
@@ -587,10 +587,10 @@
return isAuthorized;
};
- if (common.isDefinedAndNotNull(dataContext.component.parentGroupId)) {
+ if (nfCommon.isDefinedAndNotNull(dataContext.component.parentGroupId)) {
return canWriteProcessGroupParent(dataContext.component.parentGroupId);
} else {
- return common.canModifyController();
+ return nfCommon.canModifyController();
}
};
@@ -606,31 +606,31 @@
if(a.permissions.canRead && b.permissions.canRead) {
if (sortDetails.columnId === 'moreDetails') {
var aBulletins = 0;
- if (!common.isEmpty(a.bulletins)) {
+ if (!nfCommon.isEmpty(a.bulletins)) {
aBulletins = a.bulletins.length;
}
var bBulletins = 0;
- if (!common.isEmpty(b.bulletins)) {
+ if (!nfCommon.isEmpty(b.bulletins)) {
bBulletins = b.bulletins.length;
}
return aBulletins - bBulletins;
} else if (sortDetails.columnId === 'type') {
- var aType = common.isDefinedAndNotNull(a.component[sortDetails.columnId]) ? common.substringAfterLast(a.component[sortDetails.columnId], '.') : '';
- var bType = common.isDefinedAndNotNull(b.component[sortDetails.columnId]) ? common.substringAfterLast(b.component[sortDetails.columnId], '.') : '';
+ var aType = nfCommon.isDefinedAndNotNull(a.component[sortDetails.columnId]) ? nfCommon.substringAfterLast(a.component[sortDetails.columnId], '.') : '';
+ var bType = nfCommon.isDefinedAndNotNull(b.component[sortDetails.columnId]) ? nfCommon.substringAfterLast(b.component[sortDetails.columnId], '.') : '';
return aType === bType ? 0 : aType > bType ? 1 : -1;
} else if (sortDetails.columnId === 'state') {
var aState = 'Invalid';
- if (common.isEmpty(a.component.validationErrors)) {
- aState = common.isDefinedAndNotNull(a.component[sortDetails.columnId]) ? a.component[sortDetails.columnId] : '';
+ if (nfCommon.isEmpty(a.component.validationErrors)) {
+ aState = nfCommon.isDefinedAndNotNull(a.component[sortDetails.columnId]) ? a.component[sortDetails.columnId] : '';
}
var bState = 'Invalid';
- if (common.isEmpty(b.component.validationErrors)) {
- bState = common.isDefinedAndNotNull(b.component[sortDetails.columnId]) ? b.component[sortDetails.columnId] : '';
+ if (nfCommon.isEmpty(b.component.validationErrors)) {
+ bState = nfCommon.isDefinedAndNotNull(b.component[sortDetails.columnId]) ? b.component[sortDetails.columnId] : '';
}
return aState === bState ? 0 : aState > bState ? 1 : -1;
} else {
- var aString = common.isDefinedAndNotNull(a.component[sortDetails.columnId]) ? a.component[sortDetails.columnId] : '';
- var bString = common.isDefinedAndNotNull(b.component[sortDetails.columnId]) ? b.component[sortDetails.columnId] : '';
+ var aString = nfCommon.isDefinedAndNotNull(a.component[sortDetails.columnId]) ? a.component[sortDetails.columnId] : '';
+ var bString = nfCommon.isDefinedAndNotNull(b.component[sortDetails.columnId]) ? b.component[sortDetails.columnId] : '';
return aString === bString ? 0 : aString > bString ? 1 : -1;
}
} else {
@@ -667,8 +667,8 @@
// always include a button to view the usage
markup += '
';
- var hasErrors = !common.isEmpty(dataContext.component.validationErrors);
- var hasBulletins = !common.isEmpty(dataContext.bulletins);
+ var hasErrors = !nfCommon.isEmpty(dataContext.component.validationErrors);
+ var hasBulletins = !nfCommon.isEmpty(dataContext.bulletins);
if (hasErrors) {
markup += '
';
@@ -679,7 +679,7 @@
}
if (hasErrors || hasBulletins) {
- markup += '
' + common.escapeHtml(dataContext.id) + '';
+ markup += '
' + nfCommon.escapeHtml(dataContext.id) + '';
}
return markup;
@@ -692,7 +692,7 @@
// determine the appropriate label
var icon = '', label = '';
- if (!common.isEmpty(dataContext.component.validationErrors)) {
+ if (!nfCommon.isEmpty(dataContext.component.validationErrors)) {
icon = 'invalid fa fa-warning';
label = 'Invalid';
} else {
@@ -726,7 +726,7 @@
markup += '
';
// if there are no validation errors allow enabling
- if (common.isEmpty(dataContext.component.validationErrors)) {
+ if (nfCommon.isEmpty(dataContext.component.validationErrors)) {
markup += '
';
}
}
@@ -741,7 +741,7 @@
}
// allow policy configuration conditionally
- if (canvasUtils.isConfigurableAuthorizer() && common.canAccessTenants()) {
+ if (nfCanvasUtils.isConfigurableAuthorizer() && nfCommon.canAccessTenants()) {
markup += '
';
}
@@ -827,44 +827,44 @@
// determine the desired action
if (controllerServicesGrid.getColumns()[args.cell].id === 'actions') {
if (target.hasClass('edit-controller-service')) {
- controllerService.showConfiguration(serviceTable, controllerServiceEntity);
+ nfControllerService.showConfiguration(serviceTable, controllerServiceEntity);
} else if (target.hasClass('enable-controller-service')) {
- controllerService.enable(serviceTable, controllerServiceEntity);
+ nfControllerService.enable(serviceTable, controllerServiceEntity);
} else if (target.hasClass('disable-controller-service')) {
- controllerService.disable(serviceTable, controllerServiceEntity);
+ nfControllerService.disable(serviceTable, controllerServiceEntity);
} else if (target.hasClass('delete-controller-service')) {
- controllerService.promptToDeleteController(serviceTable, controllerServiceEntity);
+ nfControllerService.promptToDeleteController(serviceTable, controllerServiceEntity);
} else if (target.hasClass('view-state-controller-service')) {
- componentState.showState(controllerServiceEntity, controllerServiceEntity.state === 'DISABLED');
+ nfComponentState.showState(controllerServiceEntity, controllerServiceEntity.state === 'DISABLED');
} else if (target.hasClass('edit-access-policies')) {
// show the policies for this service
- policyManagement.showControllerServicePolicy(controllerServiceEntity);
+ nfPolicyManagement.showControllerServicePolicy(controllerServiceEntity);
// close the settings dialog
$('#shell-close-button').click();
}
} else if (controllerServicesGrid.getColumns()[args.cell].id === 'moreDetails') {
if (target.hasClass('view-controller-service')) {
- controllerService.showDetails(serviceTable, controllerServiceEntity);
+ nfControllerService.showDetails(serviceTable, controllerServiceEntity);
} else if (target.hasClass('controller-service-usage')) {
// close the settings dialog
$('#shell-close-button').click();
// open the documentation for this controller service
- shell.showPage('../nifi-docs/documentation?' + $.param({
- select: common.substringAfterLast(controllerServiceEntity.component.type, '.')
+ nfShell.showPage('../nifi-docs/documentation?' + $.param({
+ select: nfCommon.substringAfterLast(controllerServiceEntity.component.type, '.')
})).done(function() {
- if (common.isDefinedAndNotNull(controllerServiceEntity.component.parentGroupId)) {
+ if (nfCommon.isDefinedAndNotNull(controllerServiceEntity.component.parentGroupId)) {
var groupId;
- var processGroup = processGroup.get(controllerServiceEntity.component.parentGroupId);
- if (common.isDefinedAndNotNull(processGroup)) {
+ var processGroup = nfProcessGroup.get(controllerServiceEntity.component.parentGroupId);
+ if (nfCommon.isDefinedAndNotNull(processGroup)) {
groupId = processGroup.id;
} else {
- groupId = canvasUtils.getGroupId();
+ groupId = nfCanvasUtils.getGroupId();
}
// reload the corresponding group
- processGroupConfiguration.showConfiguration(groupId);
+ nfProcessGroupConfiguration.showConfiguration(groupId);
} else {
showSettings();
}
@@ -894,12 +894,12 @@
var controllerServiceEntity = controllerServicesData.getItemById(serviceId);
// format the errors
- var tooltip = common.formatUnorderedList(controllerServiceEntity.component.validationErrors);
+ var tooltip = nfCommon.formatUnorderedList(controllerServiceEntity.component.validationErrors);
// show the tooltip
- if (common.isDefinedAndNotNull(tooltip)) {
+ if (nfCommon.isDefinedAndNotNull(tooltip)) {
errorIcon.qtip($.extend({},
- common.config.tooltipConfig,
+ nfCommon.config.tooltipConfig,
{
content: tooltip,
position: {
@@ -923,13 +923,13 @@
var controllerServiceEntity = controllerServicesData.getItemById(taskId);
// format the tooltip
- var bulletins = common.getFormattedBulletins(controllerServiceEntity.bulletins);
- var tooltip = common.formatUnorderedList(bulletins);
+ var bulletins = nfCommon.getFormattedBulletins(controllerServiceEntity.bulletins);
+ var tooltip = nfCommon.formatUnorderedList(bulletins);
// show the tooltip
- if (common.isDefinedAndNotNull(tooltip)) {
+ if (nfCommon.isDefinedAndNotNull(tooltip)) {
bulletinIcon.qtip($.extend({},
- common.config.tooltipConfig,
+ nfCommon.config.tooltipConfig,
{
content: tooltip,
position: {
@@ -966,8 +966,8 @@
}, service));
});
- common.cleanUpTooltips(serviceTable, 'div.has-errors');
- common.cleanUpTooltips(serviceTable, 'div.has-bulletins');
+ nfCommon.cleanUpTooltips(serviceTable, 'div.has-errors');
+ nfCommon.cleanUpTooltips(serviceTable, 'div.has-bulletins');
var controllerServicesGrid = serviceTable.data('gridInstance');
var controllerServicesData = controllerServicesGrid.getData();
@@ -1084,7 +1084,7 @@
controllerServiceTypesGrid.onDblClick.subscribe(dblClick);
// reset the canvas size after the dialog is shown
- if (common.isDefinedAndNotNull(controllerServiceTypesGrid)) {
+ if (nfCommon.isDefinedAndNotNull(controllerServiceTypesGrid)) {
controllerServiceTypesGrid.setSelectedRows([0]);
controllerServiceTypesGrid.resizeCanvas();
}
@@ -1100,7 +1100,7 @@
*/
resetTableSize: function (serviceTable) {
var controllerServicesGrid = serviceTable.data('gridInstance');
- if (common.isDefinedAndNotNull(controllerServicesGrid)) {
+ if (nfCommon.isDefinedAndNotNull(controllerServicesGrid)) {
controllerServicesGrid.resizeCanvas();
}
},
@@ -1128,14 +1128,14 @@
controllerServicesData.beginUpdate();
// if there are some bulletins process them
- if (!common.isEmpty(controllerServiceBulletins)) {
+ if (!nfCommon.isEmpty(controllerServiceBulletins)) {
var controllerServiceBulletinsBySource = d3.nest()
.key(function(d) { return d.sourceId; })
.map(controllerServiceBulletins, d3.map);
controllerServiceBulletinsBySource.forEach(function(sourceId, sourceBulletins) {
var controllerService = controllerServicesData.getItemById(sourceId);
- if (common.isDefinedAndNotNull(controllerService)) {
+ if (nfCommon.isDefinedAndNotNull(controllerService)) {
controllerServicesData.updateItem(sourceId, $.extend(controllerService, {
bulletins: sourceBulletins
}));
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-custom-ui.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-custom-ui.js
index fc4cbba9c1..f54268aa13 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-custom-ui.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-custom-ui.js
@@ -23,8 +23,8 @@
'nf.Common',
'nf.Shell',
'nf.Dialog',
- 'nf.Client'], function ($, common, shell, dialog, client) {
- return (nf.CustomUi = factory($, common, shell, dialog, client));
+ 'nf.Client'], function ($, nfCommon, nfShell, nfDialog, nfClient) {
+ return (nf.CustomUi = factory($, nfCommon, nfShell, nfDialog, nfClient));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.CustomUi = factory(require('jquery'),
@@ -39,7 +39,7 @@
root.nf.Dialog,
root.nf.Client);
}
-}(this, function ($, common, shell, dialog, client) {
+}(this, function ($, nfCommon, nfShell, nfDialog, nfClient) {
'use strict';
return {
@@ -52,11 +52,11 @@
*/
showCustomUi: function (entity, uri, editable) {
return $.Deferred(function (deferred) {
- common.getAccessToken('../nifi-api/access/ui-extension-token').done(function (uiExtensionToken) {
+ nfCommon.getAccessToken('../nifi-api/access/ui-extension-token').done(function (uiExtensionToken) {
// record the processor id
$('#shell-close-button');
- var revision = client.getRevision(entity);
+ var revision = nfClient.getRevision(entity);
// build the customer ui params
var customUiParams = {
@@ -67,16 +67,16 @@
};
// conditionally include the ui extension token
- if (!common.isBlank(uiExtensionToken)) {
+ if (!nfCommon.isBlank(uiExtensionToken)) {
customUiParams['access_token'] = uiExtensionToken;
}
// show the shell
- shell.showPage('..' + uri + '?' + $.param(customUiParams), false).done(function () {
+ nfShell.showPage('..' + uri + '?' + $.param(customUiParams), false).done(function () {
deferred.resolve();
});
}).fail(function () {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Advanced Configuration',
dialogContent: 'Unable to generate access token for accessing the advanced configuration dialog.'
});
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-draggable.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-draggable.js
index f4adb92d0a..b9a6ab9782 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-draggable.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-draggable.js
@@ -28,8 +28,8 @@
'nf.Dialog',
'nf.Client',
'nf.ErrorHandler'],
- function ($, d3, nfConnection, birdseye, canvasUtils, common, dialog, client, errorHandler) {
- return (nf.Draggable = factory($, d3, nfConnection, birdseye, canvasUtils, common, dialog, client, errorHandler));
+ function ($, d3, nfConnection, nfBirdseye, nfCanvasUtils, nfCommon, nfDialog, nfClient, nfErrorHandler) {
+ return (nf.Draggable = factory($, d3, nfConnection, nfBirdseye, nfCanvasUtils, nfCommon, nfDialog, nfClient, nfErrorHandler));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.Draggable =
@@ -53,7 +53,7 @@
root.nf.Client,
root.nf.ErrorHandler);
}
-}(this, function ($, d3, nfConnection, birdseye, canvasUtils, common, dialog, client, errorHandler) {
+}(this, function ($, d3, nfConnection, nfBirdseye, nfCanvasUtils, nfCommon, nfDialog, nfClient, nfErrorHandler) {
'use strict';
var nfCanvas;
@@ -83,8 +83,8 @@
var selectedComponents = d3.selectAll('g.component.selected');
// ensure every component is writable
- if (canvasUtils.canModify(selectedConnections) === false || canvasUtils.canModify(selectedComponents) === false) {
- dialog.showOkDialog({
+ if (nfCanvasUtils.canModify(selectedConnections) === false || nfCanvasUtils.canModify(selectedComponents) === false) {
+ nfDialog.showOkDialog({
headerText: 'Component Position',
dialogContent: 'Must be authorized to modify every component selected.'
});
@@ -104,7 +104,7 @@
// consider any self looping connections
var connections = nfConnection.getComponentConnections(d.id);
$.each(connections, function (_, connection) {
- if (!updates.has(connection.id) && canvasUtils.getConnectionSourceComponentId(connection) === canvasUtils.getConnectionDestinationComponentId(connection)) {
+ if (!updates.has(connection.id) && nfCanvasUtils.getConnectionSourceComponentId(connection) === nfCanvasUtils.getConnectionDestinationComponentId(connection)) {
var connectionUpdate = nfDraggable.updateConnectionPosition(nfConnection.get(connection.id), delta);
if (connectionUpdate !== null) {
updates.set(connection.id, connectionUpdate);
@@ -126,15 +126,15 @@
var selection = d3.selectAll('g.component.selected, g.connection.selected');
var group = d3.select('g.drop');
- if (canvasUtils.canModify(selection) === false) {
- dialog.showOkDialog({
+ if (nfCanvasUtils.canModify(selection) === false) {
+ nfDialog.showOkDialog({
headerText: 'Component Position',
dialogContent: 'Must be authorized to modify every component selected.'
});
return;
}
- if (canvasUtils.canModify(group) === false) {
- dialog.showOkDialog({
+ if (nfCanvasUtils.canModify(group) === false) {
+ nfDialog.showOkDialog({
headerText: 'Component Position',
dialogContent: 'Not authorized to modify the destination group.'
});
@@ -142,7 +142,7 @@
}
// move the seleciton into the group
- canvasUtils.moveComponents(selection, group);
+ nfCanvasUtils.moveComponents(selection, group);
};
var nfDraggable = {
@@ -193,10 +193,10 @@
.attr('width', maxX - minX)
.attr('height', maxY - minY)
.attr('stroke-width', function () {
- return 1 / canvasUtils.scaleCanvasView();
+ return 1 / nfCanvasUtils.scaleCanvasView();
})
.attr('stroke-dasharray', function () {
- return 4 / canvasUtils.scaleCanvasView();
+ return 4 / nfCanvasUtils.scaleCanvasView();
})
.datum({
original: {
@@ -257,7 +257,7 @@
// build the entity
var entity = {
- 'revision': client.getRevision(d),
+ 'revision': nfClient.getRevision(d),
'component': {
'id': d.id,
'position': newPosition
@@ -274,7 +274,7 @@
contentType: 'application/json'
}).done(function (response) {
// update the component
- canvasUtils.getComponentByType(d.type).set(response);
+ nfCanvasUtils.getComponentByType(d.type).set(response);
// resolve with an object so we can refresh when finished
deferred.resolve({
@@ -283,12 +283,12 @@
});
}).fail(function (xhr, status, error) {
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Component Position',
- dialogContent: common.escapeHtml(xhr.responseText)
+ dialogContent: nfCommon.escapeHtml(xhr.responseText)
});
} else {
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
}
deferred.reject();
@@ -318,7 +318,7 @@
});
var entity = {
- 'revision': client.getRevision(d),
+ 'revision': nfClient.getRevision(d),
'component': {
id: d.id,
bends: newBends
@@ -344,12 +344,12 @@
});
}).fail(function (xhr, status, error) {
if (xhr.status === 400 || xhr.status === 404 || xhr.status === 409) {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Component Position',
- dialogContent: common.escapeHtml(xhr.responseText)
+ dialogContent: nfCommon.escapeHtml(xhr.responseText)
});
} else {
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
}
deferred.reject();
@@ -388,7 +388,7 @@
nfConnection.refresh(connectionId);
});
}).always(function () {
- birdseye.refresh();
+ nfBirdseye.refresh();
});
}
},
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-funnel.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-funnel.js
index 0488314acb..44ff136124 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-funnel.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-funnel.js
@@ -24,8 +24,8 @@
'nf.Common',
'nf.Client',
'nf.CanvasUtils'],
- function ($, d3, common, client, canvasUtils) {
- return (nf.Funnel = factory($, d3, common, client, canvasUtils));
+ function ($, d3, nfCommon, nfClient, nfCanvasUtils) {
+ return (nf.Funnel = factory($, d3, nfCommon, nfClient, nfCanvasUtils));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.Funnel =
@@ -41,7 +41,7 @@
root.nf.Client,
root.nf.CanvasUtils);
}
-}(this, function ($, d3, common, client, canvasUtils) {
+}(this, function ($, d3, nfCommon, nfClient, nfCanvasUtils) {
'use strict';
var nfConnectable;
@@ -105,7 +105,7 @@
'class': 'funnel component'
})
.classed('selected', selected)
- .call(canvasUtils.position);
+ .call(nfCanvasUtils.position);
// funnel border
funnel.append('rect')
@@ -178,7 +178,7 @@
var funnel = d3.select(this);
// update the component behavior as appropriate
- canvasUtils.editable(funnel, nfConnectable, nfDraggable);
+ nfCanvasUtils.editable(funnel, nfConnectable, nfDraggable);
});
};
@@ -194,12 +194,17 @@
var nfFunnel = {
/**
* Initializes of the Processor handler.
+ *
+ * @param nfConnectableRef The nfConnectable module.
+ * @param nfDraggableRef The nfDraggable module.
+ * @param nfSelectableRef The nfSelectable module.
+ * @param nfContextMenuRef The nfContextMenu module.
*/
- init: function (connectable, draggable, selectable, contextMenu) {
- nfConnectable = connectable;
- nfDraggable = draggable;
- nfSelectable = selectable;
- nfContextMenu = contextMenu;
+ init: function (nfConnectableRef, nfDraggableRef, nfSelectableRef, nfContextMenuRef) {
+ nfConnectable = nfConnectableRef;
+ nfDraggable = nfDraggableRef;
+ nfSelectable = nfSelectableRef;
+ nfContextMenu = nfContextMenuRef;
funnelMap = d3.map();
removedCache = d3.map();
@@ -221,8 +226,8 @@
*/
add: function (funnelEntities, options) {
var selectAll = false;
- if (common.isDefinedAndNotNull(options)) {
- selectAll = common.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
+ if (nfCommon.isDefinedAndNotNull(options)) {
+ selectAll = nfCommon.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
}
// get the current time
@@ -243,7 +248,7 @@
$.each(funnelEntities, function (_, funnelEntity) {
add(funnelEntity);
});
- } else if (common.isDefinedAndNotNull(funnelEntities)) {
+ } else if (nfCommon.isDefinedAndNotNull(funnelEntities)) {
add(funnelEntities);
}
@@ -262,16 +267,16 @@
set: function (funnelEntities, options) {
var selectAll = false;
var transition = false;
- if (common.isDefinedAndNotNull(options)) {
- selectAll = common.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
- transition = common.isDefinedAndNotNull(options.transition) ? options.transition : transition;
+ if (nfCommon.isDefinedAndNotNull(options)) {
+ selectAll = nfCommon.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
+ transition = nfCommon.isDefinedAndNotNull(options.transition) ? options.transition : transition;
}
var set = function (proposedFunnelEntity) {
var currentFunnelEntity = funnelMap.get(proposedFunnelEntity.id);
// set the funnel if appropriate due to revision and wasn't previously removed
- if (client.isNewerRevision(currentFunnelEntity, proposedFunnelEntity) && !removedCache.has(proposedFunnelEntity.id)) {
+ if (nfClient.isNewerRevision(currentFunnelEntity, proposedFunnelEntity) && !removedCache.has(proposedFunnelEntity.id)) {
funnelMap.set(proposedFunnelEntity.id, $.extend({
type: 'Funnel',
dimensions: dimensions
@@ -294,14 +299,14 @@
$.each(funnelEntities, function (_, funnelEntity) {
set(funnelEntity);
});
- } else if (common.isDefinedAndNotNull(funnelEntities)) {
+ } else if (nfCommon.isDefinedAndNotNull(funnelEntities)) {
set(funnelEntities);
}
// apply the selection and handle all new processors
var selection = select();
selection.enter().call(renderFunnels, selectAll);
- selection.call(updateFunnels).call(canvasUtils.position, transition);
+ selection.call(updateFunnels).call(nfCanvasUtils.position, transition);
selection.exit().call(removeFunnels);
},
@@ -312,7 +317,7 @@
* @param {string} id
*/
get: function (id) {
- if (common.isUndefined(id)) {
+ if (nfCommon.isUndefined(id)) {
return funnelMap.values();
} else {
return funnelMap.get(id);
@@ -326,7 +331,7 @@
* @param {string} id Optional
*/
refresh: function (id) {
- if (common.isDefinedAndNotNull(id)) {
+ if (nfCommon.isDefinedAndNotNull(id)) {
d3.select('#id-' + id).call(updateFunnels);
} else {
d3.selectAll('g.funnel').call(updateFunnels);
@@ -358,7 +363,7 @@
* @param {string} id The id
*/
position: function (id) {
- d3.select('#id-' + id).call(canvasUtils.position);
+ d3.select('#id-' + id).call(nfCanvasUtils.position);
},
/**
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-go-to.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-go-to.js
index b69f143f32..8faf92d0bb 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-go-to.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-go-to.js
@@ -25,8 +25,8 @@
define(['jquery',
'nf.ErrorHandler',
'nf.CanvasUtils'],
- function ($, errorHandler, canvasUtils) {
- return (nf.GoTo = factory($, errorHandler, canvasUtils));
+ function ($, nfErrorHandler, nfCanvasUtils) {
+ return (nf.GoTo = factory($, nfErrorHandler, nfCanvasUtils));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.GoTo =
@@ -38,7 +38,7 @@
root.nf.ErrorHandler,
root.nf.CanvasUtils);
}
-}(this, function ($, errorHandler, canvasUtils) {
+}(this, function ($, nfErrorHandler, nfCanvasUtils) {
'use strict';
var config = {
@@ -76,7 +76,7 @@
var connectionStyle = 'unset';
var connectionName = 'Connection';
if (connectionEntity.permissions.canRead === true) {
- var formattedConnectionName = canvasUtils.formatConnectionName(connectionEntity.component);
+ var formattedConnectionName = nfCanvasUtils.formatConnectionName(connectionEntity.component);
if (formattedConnectionName !== '') {
connectionStyle = '';
connectionName = formattedConnectionName;
@@ -87,7 +87,7 @@
$('
').appendTo(connectionEntry);
$('
').attr('title', connectionName).addClass(connectionStyle).text(connectionName).on('click', function () {
// go to the connection
- canvasUtils.showComponent(parentProcessGroupId, connectionEntity.id);
+ nfCanvasUtils.showComponent(parentProcessGroupId, connectionEntity.id);
// close the dialog
$('#connections-dialog').modal('hide');
@@ -136,7 +136,7 @@
$('
').addClass(smallIconClass).appendTo(downstreamComponent);
$('
').attr('title', destinationName).text(destinationName).on('click', function () {
// go to the component
- canvasUtils.showComponent(connectionEntity.destinationGroupId, connectionEntity.destinationId);
+ nfCanvasUtils.showComponent(connectionEntity.destinationGroupId, connectionEntity.destinationId);
// close the dialog
$('#connections-dialog').modal('hide');
@@ -171,7 +171,7 @@
$('
').appendTo(downstreamComponent);
$('
').attr('title', groupLabel).text(groupLabel).on('click', function () {
// go to the remote process group
- canvasUtils.showComponent(parentProcessGroupId, processGroupEntity.id);
+ nfCanvasUtils.showComponent(parentProcessGroupId, processGroupEntity.id);
// close the dialog
$('#connections-dialog').modal('hide');
@@ -193,7 +193,7 @@
$('
').appendTo(downstreamInputPort);
$('
').attr('title', portLabel).text(portLabel).on('click', function () {
// go to the remote process group
- canvasUtils.showComponent(connectionEntity.destinationGroupId, connectionEntity.destinationId);
+ nfCanvasUtils.showComponent(connectionEntity.destinationGroupId, connectionEntity.destinationId);
// close the dialog
$('#connections-dialog').modal('hide');
@@ -228,7 +228,7 @@
$('
').appendTo(downstreamComponent);
$('
').attr('title', remoteGroupLabel).text(remoteGroupLabel).on('click', function () {
// go to the remote process group
- canvasUtils.showComponent(parentProcessGroupId, remoteProcessGroupEntity.id);
+ nfCanvasUtils.showComponent(parentProcessGroupId, remoteProcessGroupEntity.id);
// close the dialog
$('#connections-dialog').modal('hide');
@@ -282,7 +282,7 @@
$('
').addClass(smallIconClass).appendTo(sourceComponent);
$('
').attr('title', sourceName).text(sourceName).on('click', function () {
// go to the component
- canvasUtils.showComponent(connectionEntity.sourceGroupId, connectionEntity.sourceId);
+ nfCanvasUtils.showComponent(connectionEntity.sourceGroupId, connectionEntity.sourceId);
// close the dialog
$('#connections-dialog').modal('hide');
@@ -317,7 +317,7 @@
$('
').appendTo(sourceComponent);
$('
').attr('title', groupLabel).text(groupLabel).on('click', function () {
// go to the process group
- canvasUtils.showComponent(parentProcessGroupId, processGroupEntity.id);
+ nfCanvasUtils.showComponent(parentProcessGroupId, processGroupEntity.id);
// close the dialog
$('#connections-dialog').modal('hide');
@@ -338,7 +338,7 @@
$('
').appendTo(sourceOutputPort);
$('
').attr('title', portLabel).text(portLabel).on('click', function () {
// go to the output port
- canvasUtils.showComponent(connectionEntity.sourceGroupId, connectionEntity.sourceId);
+ nfCanvasUtils.showComponent(connectionEntity.sourceGroupId, connectionEntity.sourceId);
// close the dialog
$('#connections-dialog').modal('hide');
@@ -373,7 +373,7 @@
$('
').appendTo(sourceComponent);
$('
').attr('title', remoteGroupLabel).text(remoteGroupLabel).on('click', function () {
// go to the remote process group
- canvasUtils.showComponent(parentProcessGroupId, remoteProcessGroupEntity.id);
+ nfCanvasUtils.showComponent(parentProcessGroupId, remoteProcessGroupEntity.id);
// close the dialog
$('#connections-dialog').modal('hide');
@@ -451,9 +451,9 @@
*/
showDownstreamFromProcessor: function (selection) {
var processorEntity = selection.datum();
- var connections = canvasUtils.getComponentByType('Connection').get();
- var processGroups = canvasUtils.getComponentByType('ProcessGroup').get();
- var remoteProcessGroups = canvasUtils.getComponentByType('RemoteProcessGroup').get();
+ var connections = nfCanvasUtils.getComponentByType('Connection').get();
+ var processGroups = nfCanvasUtils.getComponentByType('ProcessGroup').get();
+ var remoteProcessGroups = nfCanvasUtils.getComponentByType('RemoteProcessGroup').get();
var processorLabel = getDisplayName(processorEntity);
@@ -471,7 +471,7 @@
$.each(connections, function (_, connectionEntity) {
// only show connections for which this selection is the source
if (connectionEntity.sourceId === processorEntity.id) {
- addConnection(canvasUtils.getGroupId(), connectionEntity, processGroups, remoteProcessGroups);
+ addConnection(nfCanvasUtils.getGroupId(), connectionEntity, processGroups, remoteProcessGroups);
}
});
@@ -491,9 +491,9 @@
*/
showUpstreamFromProcessor: function (selection) {
var processorEntity = selection.datum();
- var connections = canvasUtils.getComponentByType('Connection').get();
- var processGroups = canvasUtils.getComponentByType('ProcessGroup').get();
- var remoteProcessGroups = canvasUtils.getComponentByType('RemoteProcessGroup').get();
+ var connections = nfCanvasUtils.getComponentByType('Connection').get();
+ var processGroups = nfCanvasUtils.getComponentByType('ProcessGroup').get();
+ var remoteProcessGroups = nfCanvasUtils.getComponentByType('RemoteProcessGroup').get();
var processorLabel = getDisplayName(processorEntity);
@@ -511,7 +511,7 @@
$.each(connections, function (_, connectionEntity) {
// only show connections for which this selection is the destination
if (connectionEntity.destinationId === processorEntity.id) {
- addConnection(canvasUtils.getGroupId(), connectionEntity, processGroups, remoteProcessGroups);
+ addConnection(nfCanvasUtils.getGroupId(), connectionEntity, processGroups, remoteProcessGroups);
}
});
@@ -531,12 +531,12 @@
*/
showDownstreamFromGroup: function (selection) {
var groupEntity = selection.datum();
- var connections = canvasUtils.getComponentByType('Connection').get();
- var processGroups = canvasUtils.getComponentByType('ProcessGroup').get();
- var remoteProcessGroups = canvasUtils.getComponentByType('RemoteProcessGroup').get();
+ var connections = nfCanvasUtils.getComponentByType('Connection').get();
+ var processGroups = nfCanvasUtils.getComponentByType('ProcessGroup').get();
+ var remoteProcessGroups = nfCanvasUtils.getComponentByType('RemoteProcessGroup').get();
var iconStyle = 'icon-group';
- if (canvasUtils.isRemoteProcessGroup(selection)) {
+ if (nfCanvasUtils.isRemoteProcessGroup(selection)) {
iconStyle = 'icon-group-remote';
}
@@ -556,7 +556,7 @@
$.each(connections, function (_, connectionEntity) {
// only show connections for which this selection is the source
if (connectionEntity.sourceGroupId === groupEntity.id) {
- addConnection(canvasUtils.getGroupId(), connectionEntity, processGroups, remoteProcessGroups);
+ addConnection(nfCanvasUtils.getGroupId(), connectionEntity, processGroups, remoteProcessGroups);
}
});
@@ -576,12 +576,12 @@
*/
showUpstreamFromGroup: function (selection) {
var groupEntity = selection.datum();
- var connections = canvasUtils.getComponentByType('Connection').get();
- var processGroups = canvasUtils.getComponentByType('ProcessGroup').get();
- var remoteProcessGroups = canvasUtils.getComponentByType('RemoteProcessGroup').get();
+ var connections = nfCanvasUtils.getComponentByType('Connection').get();
+ var processGroups = nfCanvasUtils.getComponentByType('ProcessGroup').get();
+ var remoteProcessGroups = nfCanvasUtils.getComponentByType('RemoteProcessGroup').get();
var iconStyle = 'icon-group';
- if (canvasUtils.isRemoteProcessGroup(selection)) {
+ if (nfCanvasUtils.isRemoteProcessGroup(selection)) {
iconStyle = 'icon-group-remote';
}
@@ -601,7 +601,7 @@
$.each(connections, function (_, connectionEntity) {
// only show connections for which this selection is the destination
if (connectionEntity.destinationGroupId === groupEntity.id) {
- addConnection(canvasUtils.getGroupId(), connectionEntity, processGroups, remoteProcessGroups);
+ addConnection(nfCanvasUtils.getGroupId(), connectionEntity, processGroups, remoteProcessGroups);
}
});
@@ -621,9 +621,9 @@
*/
showDownstreamFromInputPort: function (selection) {
var portEntity = selection.datum();
- var connections = canvasUtils.getComponentByType('Connection').get();
- var processGroups = canvasUtils.getComponentByType('ProcessGroup').get();
- var remoteProcessGroups = canvasUtils.getComponentByType('RemoteProcessGroup').get();
+ var connections = nfCanvasUtils.getComponentByType('Connection').get();
+ var processGroups = nfCanvasUtils.getComponentByType('ProcessGroup').get();
+ var remoteProcessGroups = nfCanvasUtils.getComponentByType('RemoteProcessGroup').get();
var portLabel = getDisplayName(portEntity);
@@ -641,7 +641,7 @@
$.each(connections, function (_, connectionEntity) {
// only show connections for which this selection is the source
if (connectionEntity.sourceId === portEntity.id) {
- addConnection(canvasUtils.getGroupId(), connectionEntity, processGroups, remoteProcessGroups);
+ addConnection(nfCanvasUtils.getGroupId(), connectionEntity, processGroups, remoteProcessGroups);
}
});
@@ -664,7 +664,7 @@
$.ajax({
type: 'GET',
- url: config.urls.processGroups + encodeURIComponent(canvasUtils.getParentGroupId()),
+ url: config.urls.processGroups + encodeURIComponent(nfCanvasUtils.getParentGroupId()),
dataType: 'json'
}).done(function (response) {
var flow = response.processGroupFlow.flow;
@@ -681,7 +681,7 @@
// populate the upstream dialog
$('#connections-context')
.append('
')
- .append($('
').text(canvasUtils.getGroupName()))
+ .append($('
').text(nfCanvasUtils.getGroupName()))
.append('
')
.append('
')
.append($('
').text(portLabel))
@@ -691,7 +691,7 @@
$.each(connections, function (_, connectionEntity) {
// only show connections for which this selection is the destination
if (connectionEntity.destinationId === portEntity.id) {
- addConnection(canvasUtils.getParentGroupId(), connectionEntity, processGroups, remoteProcessGroups);
+ addConnection(nfCanvasUtils.getParentGroupId(), connectionEntity, processGroups, remoteProcessGroups);
}
});
@@ -702,7 +702,7 @@
// show the upstream dialog
$('#connections-dialog').modal('setHeaderText', 'Upstream Connections').modal('show');
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
},
/**
@@ -715,7 +715,7 @@
$.ajax({
type: 'GET',
- url: config.urls.processGroups + encodeURIComponent(canvasUtils.getParentGroupId()),
+ url: config.urls.processGroups + encodeURIComponent(nfCanvasUtils.getParentGroupId()),
dataType: 'json'
}).done(function (response) {
var flow = response.processGroupFlow.flow;
@@ -732,7 +732,7 @@
// populate the downstream dialog
$('#connections-context')
.append('
')
- .append($('
').text(canvasUtils.getGroupName()))
+ .append($('
').text(nfCanvasUtils.getGroupName()))
.append('
')
.append('
')
.append($('
').text(portLabel))
@@ -742,7 +742,7 @@
$.each(connections, function (_, connectionEntity) {
// only show connections for which this selection is the source
if (connectionEntity.sourceId === portEntity.id) {
- addConnection(canvasUtils.getParentGroupId(), connectionEntity, processGroups, remoteProcessGroups);
+ addConnection(nfCanvasUtils.getParentGroupId(), connectionEntity, processGroups, remoteProcessGroups);
}
});
@@ -753,7 +753,7 @@
// show the downstream dialog
$('#connections-dialog').modal('setHeaderText', 'Downstream Connections').modal('show');
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
},
/**
@@ -763,9 +763,9 @@
*/
showUpstreamFromOutputPort: function (selection) {
var portEntity = selection.datum();
- var connections = canvasUtils.getComponentByType('Connection').get();
- var processGroups = canvasUtils.getComponentByType('ProcessGroup').get();
- var remoteProcessGroups = canvasUtils.getComponentByType('RemoteProcessGroup').get();
+ var connections = nfCanvasUtils.getComponentByType('Connection').get();
+ var processGroups = nfCanvasUtils.getComponentByType('ProcessGroup').get();
+ var remoteProcessGroups = nfCanvasUtils.getComponentByType('RemoteProcessGroup').get();
var portLabel = getDisplayName(portEntity);
@@ -783,7 +783,7 @@
$.each(connections, function (_, connectionEntity) {
// only show connections for which this selection is the destination
if (connectionEntity.destinationId === portEntity.id) {
- addConnection(canvasUtils.getGroupId(), connectionEntity, processGroups, remoteProcessGroups);
+ addConnection(nfCanvasUtils.getGroupId(), connectionEntity, processGroups, remoteProcessGroups);
}
});
@@ -803,9 +803,9 @@
*/
showDownstreamFromFunnel: function (selection) {
var funnelEntity = selection.datum();
- var connections = canvasUtils.getComponentByType('Connection').get();
- var processGroups = canvasUtils.getComponentByType('ProcessGroup').get();
- var remoteProcessGroups = canvasUtils.getComponentByType('RemoteProcessGroup').get();
+ var connections = nfCanvasUtils.getComponentByType('Connection').get();
+ var processGroups = nfCanvasUtils.getComponentByType('ProcessGroup').get();
+ var remoteProcessGroups = nfCanvasUtils.getComponentByType('RemoteProcessGroup').get();
// record details of the current component
currentComponentId = funnelEntity.id;
@@ -821,7 +821,7 @@
$.each(connections, function (_, connectionEntity) {
// only show connections for which this selection is the source
if (connectionEntity.sourceId === funnelEntity.id) {
- addConnection(canvasUtils.getGroupId(), connectionEntity, processGroups, remoteProcessGroups);
+ addConnection(nfCanvasUtils.getGroupId(), connectionEntity, processGroups, remoteProcessGroups);
}
});
@@ -841,9 +841,9 @@
*/
showUpstreamFromFunnel: function (selection) {
var funnelEntity = selection.datum();
- var connections = canvasUtils.getComponentByType('Connection').get();
- var processGroups = canvasUtils.getComponentByType('ProcessGroup').get();
- var remoteProcessGroups = canvasUtils.getComponentByType('RemoteProcessGroup').get();
+ var connections = nfCanvasUtils.getComponentByType('Connection').get();
+ var processGroups = nfCanvasUtils.getComponentByType('ProcessGroup').get();
+ var remoteProcessGroups = nfCanvasUtils.getComponentByType('RemoteProcessGroup').get();
// record details of the current component
currentComponentId = funnelEntity.id;
@@ -859,7 +859,7 @@
$.each(connections, function (_, connectionEntity) {
// only show connections for which this selection is the destination
if (connectionEntity.destinationId === funnelEntity.id) {
- addConnection(canvasUtils.getGroupId(), connectionEntity, processGroups, remoteProcessGroups);
+ addConnection(nfCanvasUtils.getGroupId(), connectionEntity, processGroups, remoteProcessGroups);
}
});
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-graph.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-graph.js
index bf21846f09..e5c8e22b22 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-graph.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-graph.js
@@ -35,8 +35,8 @@
'nf.Draggable',
'nf.Selectable',
'nf.ContextMenu'],
- function ($, d3, common, angularBridge, nfLabel, nfFunnel, nfPort, nfRemoteProcessGroup, nfProcessGroup, nfProcessor, nfConnection, canvasUtils, connectable, draggable, selectable, contextMenu) {
- return (nf.Graph = factory($, d3, common, angularBridge, nfLabel, nfFunnel, nfPort, nfRemoteProcessGroup, nfProcessGroup, nfProcessor, nfConnection, canvasUtils, connectable, draggable, selectable, contextMenu));
+ function ($, d3, nfCommon, nfNgBridge, nfLabel, nfFunnel, nfPort, nfRemoteProcessGroup, nfProcessGroup, nfProcessor, nfConnection, nfCanvasUtils, nfConnectable, nfDraggable, nfSelectable, nfContextMenu) {
+ return (nf.Graph = factory($, d3, nfCommon, nfNgBridge, nfLabel, nfFunnel, nfPort, nfRemoteProcessGroup, nfProcessGroup, nfProcessor, nfConnection, nfCanvasUtils, nfConnectable, nfDraggable, nfSelectable, nfContextMenu));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.Graph =
@@ -74,15 +74,15 @@
root.nf.Selectable,
root.nf.ContextMenu);
}
-}(this, function ($, d3, common, angularBridge, nfLabel, nfFunnel, nfPort, nfRemoteProcessGroup, nfProcessGroup, nfProcessor, nfConnection, canvasUtils, connectable, draggable, selectable, contextMenu) {
+}(this, function ($, d3, nfCommon, nfNgBridge, nfLabel, nfFunnel, nfPort, nfRemoteProcessGroup, nfProcessGroup, nfProcessor, nfConnection, nfCanvasUtils, nfConnectable, nfDraggable, nfSelectable, nfContextMenu) {
'use strict';
var combinePorts = function (contents) {
- if (common.isDefinedAndNotNull(contents.inputPorts) && common.isDefinedAndNotNull(contents.outputPorts)) {
+ if (nfCommon.isDefinedAndNotNull(contents.inputPorts) && nfCommon.isDefinedAndNotNull(contents.outputPorts)) {
return contents.inputPorts.concat(contents.outputPorts);
- } else if (common.isDefinedAndNotNull(contents.inputPorts)) {
+ } else if (nfCommon.isDefinedAndNotNull(contents.inputPorts)) {
return contents.inputPorts;
- } else if (common.isDefinedAndNotNull(contents.outputPorts)) {
+ } else if (nfCommon.isDefinedAndNotNull(contents.outputPorts)) {
return contents.outputPorts;
} else {
return [];
@@ -90,11 +90,11 @@
};
var combinePortStatus = function (status) {
- if (common.isDefinedAndNotNull(status.inputPortStatusSnapshots) && common.isDefinedAndNotNull(status.outputPortStatusSnapshots)) {
+ if (nfCommon.isDefinedAndNotNull(status.inputPortStatusSnapshots) && nfCommon.isDefinedAndNotNull(status.outputPortStatusSnapshots)) {
return status.inputPortStatusSnapshots.concat(status.outputPortStatusSnapshots);
- } else if (common.isDefinedAndNotNull(status.inputPortStatusSnapshots)) {
+ } else if (nfCommon.isDefinedAndNotNull(status.inputPortStatusSnapshots)) {
return status.inputPortStatusSnapshots;
- } else if (common.isDefinedAndNotNull(status.outputPortStatusSnapshots)) {
+ } else if (nfCommon.isDefinedAndNotNull(status.outputPortStatusSnapshots)) {
return status.outputPortStatusSnapshots;
} else {
return [];
@@ -106,8 +106,8 @@
*/
var updateComponentVisibility = function () {
var canvasContainer = $('#canvas-container');
- var translate = canvasUtils.translateCanvasView();
- var scale = canvasUtils.scaleCanvasView();
+ var translate = nfCanvasUtils.translateCanvasView();
+ var scale = nfCanvasUtils.scaleCanvasView();
// scale the translation
translate = [translate[0] / scale, translate[1] / scale];
@@ -124,7 +124,7 @@
// detects whether a component is visible and should be rendered
var isComponentVisible = function (d) {
- if (!canvasUtils.shouldRenderPerScale()) {
+ if (!nfCanvasUtils.shouldRenderPerScale()) {
return false;
}
@@ -139,7 +139,7 @@
// detects whether a connection is visible and should be rendered
var isConnectionVisible = function (d) {
- if (!canvasUtils.shouldRenderPerScale()) {
+ if (!nfCanvasUtils.shouldRenderPerScale()) {
return false;
}
@@ -195,16 +195,16 @@
var nfGraph = {
init: function () {
// initialize the object responsible for each type of component
- nfLabel.init(connectable, draggable, selectable, contextMenu);
- nfFunnel.init(connectable, draggable, selectable, contextMenu);
- nfPort.init(connectable, draggable, selectable, contextMenu);
- nfRemoteProcessGroup.init(connectable, draggable, selectable, contextMenu);
- nfProcessGroup.init(connectable, draggable, selectable, contextMenu);
- nfProcessor.init(connectable, draggable, selectable, contextMenu);
- nfConnection.init(selectable, contextMenu);
+ nfLabel.init(nfConnectable, nfDraggable, nfSelectable, nfContextMenu);
+ nfFunnel.init(nfConnectable, nfDraggable, nfSelectable, nfContextMenu);
+ nfPort.init(nfConnectable, nfDraggable, nfSelectable, nfContextMenu);
+ nfRemoteProcessGroup.init(nfConnectable, nfDraggable, nfSelectable, nfContextMenu);
+ nfProcessGroup.init(nfConnectable, nfDraggable, nfSelectable, nfContextMenu);
+ nfProcessor.init(nfConnectable, nfDraggable, nfSelectable, nfContextMenu);
+ nfConnection.init(nfSelectable, nfContextMenu);
// load the graph
- return nfProcessGroup.enterGroup(canvasUtils.getGroupId());
+ return nfProcessGroup.enterGroup(nfCanvasUtils.getGroupId());
},
/**
@@ -215,13 +215,13 @@
*/
add: function (processGroupContents, options) {
var selectAll = false;
- if (common.isDefinedAndNotNull(options)) {
- selectAll = common.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
+ if (nfCommon.isDefinedAndNotNull(options)) {
+ selectAll = nfCommon.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
}
// if we are going to select the new components, deselect the previous selection
if (selectAll) {
- canvasUtils.getSelection().classed('selected', false);
+ nfCanvasUtils.getSelection().classed('selected', false);
}
// merge the ports together
@@ -238,7 +238,7 @@
// inform Angular app if the selection is changing
if (selectAll) {
- angularBridge.digest();
+ nfNgBridge.digest();
}
},
@@ -250,13 +250,13 @@
*/
set: function (processGroupContents, options) {
var selectAll = false;
- if (common.isDefinedAndNotNull(options)) {
- selectAll = common.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
+ if (nfCommon.isDefinedAndNotNull(options)) {
+ selectAll = nfCommon.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
}
// if we are going to select the new components, deselect the previous selection
if (selectAll) {
- canvasUtils.getSelection().classed('selected', false);
+ nfCanvasUtils.getSelection().classed('selected', false);
}
// merge the ports together
@@ -273,7 +273,7 @@
// inform Angular app if the selection is changing
if (selectAll) {
- angularBridge.digest();
+ nfNgBridge.digest();
}
},
@@ -405,11 +405,11 @@
reload: function (component) {
var componentData = component.datum();
if (componentData.permissions.canRead) {
- if (canvasUtils.isProcessor(component)) {
+ if (nfCanvasUtils.isProcessor(component)) {
nfProcessor.reload(componentData.id);
- } else if (canvasUtils.isInputPort(component)) {
+ } else if (nfCanvasUtils.isInputPort(component)) {
nfPort.reload(componentData.id);
- } else if (canvasUtils.isRemoteProcessGroup(component)) {
+ } else if (nfCanvasUtils.isRemoteProcessGroup(component)) {
nfRemoteProcessGroup.reload(componentData.id);
}
}
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label-configuration.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label-configuration.js
index 4c22c56cc7..66ffe3bc38 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label-configuration.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label-configuration.js
@@ -27,8 +27,8 @@
'nf.CanvasUtils',
'nf.ng.Bridge',
'nf.Label'],
- function ($, d3, errorHandler, common, client, canvasUtils, angularBridge, label) {
- return (nf.LabelConfiguration = factory($, d3, errorHandler, common, client, canvasUtils, angularBridge, label));
+ function ($, d3, nfErrorHandler, nfCommon, nfClient, nfCanvasUtils, nfNgBridge, nfLabel) {
+ return (nf.LabelConfiguration = factory($, d3, nfErrorHandler, nfCommon, nfClient, nfCanvasUtils, nfNgBridge, nfLabel));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.LabelConfiguration =
@@ -50,7 +50,7 @@
root.nf.ng.Bridge,
root.nf.Label);
}
-}(this, function ($, d3, errorHandler, common, client, canvasUtils, angularBridge, label) {
+}(this, function ($, d3, nfErrorHandler, nfCommon, nfClient, nfCanvasUtils, nfNgBridge, nfLabel) {
'use strict';
var labelId = '';
@@ -82,7 +82,7 @@
// build the label entity
var labelEntity = {
- 'revision': client.getRevision(labelData),
+ 'revision': nfClient.getRevision(labelData),
'component': {
'id': labelId,
'label': labelValue,
@@ -101,11 +101,11 @@
contentType: 'application/json'
}).done(function (response) {
// get the label out of the response
- label.set(response);
+ nfLabel.set(response);
// inform Angular app values have changed
- angularBridge.digest();
- }).fail(errorHandler.handleAjaxError);
+ nfNgBridge.digest();
+ }).fail(nfErrorHandler.handleAjaxError);
// reset and hide the dialog
this.modal('hide');
@@ -166,18 +166,18 @@
* @argument {selection} selection The selection
*/
showConfiguration: function (selection) {
- if (canvasUtils.isLabel(selection)) {
+ if (nfCanvasUtils.isLabel(selection)) {
var selectionData = selection.datum();
// get the label value
var labelValue = '';
- if (common.isDefinedAndNotNull(selectionData.component.label)) {
+ if (nfCommon.isDefinedAndNotNull(selectionData.component.label)) {
labelValue = selectionData.component.label;
}
// get the font size
var fontSize = '12px';
- if (common.isDefinedAndNotNull(selectionData.component.style['font-size'])) {
+ if (nfCommon.isDefinedAndNotNull(selectionData.component.style['font-size'])) {
fontSize = selectionData.component.style['font-size'];
}
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label.js
index fcec19deb8..382b7e0bfc 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label.js
@@ -24,8 +24,8 @@
'nf.Common',
'nf.Client',
'nf.CanvasUtils'],
- function ($, d3, common, client, canvasUtils) {
- return (nf.Label = factory($, d3, common, client, canvasUtils));
+ function ($, d3, nfCommon, nfClient, nfCanvasUtils) {
+ return (nf.Label = factory($, d3, nfCommon, nfClient, nfCanvasUtils));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.Label =
@@ -41,7 +41,7 @@
root.nf.Client,
root.nf.CanvasUtils);
}
-}(this, function ($, d3, common, client, canvasUtils) {
+}(this, function ($, d3, nfCommon, nfClient, nfCanvasUtils) {
'use strict';
var nfConnectable;
@@ -114,7 +114,7 @@
'class': 'label component'
})
.classed('selected', selected)
- .call(canvasUtils.position);
+ .call(nfCanvasUtils.position);
// label border
label.append('rect')
@@ -187,7 +187,7 @@
var color = nfLabel.defaultColor();
// use the specified color if appropriate
- if (common.isDefinedAndNotNull(d.component.style['background-color'])) {
+ if (nfCommon.isDefinedAndNotNull(d.component.style['background-color'])) {
color = d.component.style['background-color'];
}
@@ -202,7 +202,7 @@
var label = d3.select(this);
// update the component behavior as appropriate
- canvasUtils.editable(label, nfConnectable, nfDraggable);
+ nfCanvasUtils.editable(label, nfConnectable, nfDraggable);
// update the label
var labelText = label.select('text.label-value');
@@ -213,7 +213,7 @@
var fontSize = '12px';
// use the specified color if appropriate
- if (common.isDefinedAndNotNull(d.component.style['font-size'])) {
+ if (nfCommon.isDefinedAndNotNull(d.component.style['font-size'])) {
fontSize = d.component.style['font-size'];
}
@@ -225,7 +225,7 @@
// parse the lines in this label
var lines = [];
- if (common.isDefinedAndNotNull(d.component.label)) {
+ if (nfCommon.isDefinedAndNotNull(d.component.label)) {
lines = d.component.label.split('\n');
} else {
lines.push('');
@@ -234,7 +234,7 @@
var color = nfLabel.defaultColor();
// use the specified color if appropriate
- if (common.isDefinedAndNotNull(d.component.style['background-color'])) {
+ if (nfCommon.isDefinedAndNotNull(d.component.style['background-color'])) {
color = d.component.style['background-color'];
}
@@ -247,8 +247,8 @@
return line;
})
.style('fill', function (d) {
- return common.determineContrastColor(
- common.substringAfterLast(
+ return nfCommon.determineContrastColor(
+ nfCommon.substringAfterLast(
color, '#'));
});
});
@@ -308,12 +308,17 @@
/**
* Initializes of the Processor handler.
+ *
+ * @param nfConnectableRef The nfConnectable module.
+ * @param nfDraggableRef The nfDraggable module.
+ * @param nfSelectableRef The nfSelectable module.
+ * @param nfContextMenuRef The nfContextMenu module.
*/
- init: function (connectable, draggable, selectable, contextMenu) {
- nfConnectable = connectable;
- nfDraggable = draggable;
- nfSelectable = selectable;
- nfContextMenu = contextMenu;
+ init: function (nfConnectableRef, nfDraggableRef, nfSelectableRef, nfContextMenuRef) {
+ nfConnectable = nfConnectableRef;
+ nfDraggable = nfDraggableRef;
+ nfSelectable = nfSelectableRef;
+ nfContextMenu = nfContextMenuRef;
labelMap = d3.map();
removedCache = d3.map();
@@ -349,19 +354,19 @@
// determine if the width has changed
var different = false;
- if (common.isDefinedAndNotNull(labelData.component.width) || labelData.dimensions.width !== labelData.component.width) {
+ if (nfCommon.isDefinedAndNotNull(labelData.component.width) || labelData.dimensions.width !== labelData.component.width) {
different = true;
}
// determine if the height has changed
- if (!different && common.isDefinedAndNotNull(labelData.component.height) || labelData.dimensions.height !== labelData.component.height) {
+ if (!different && nfCommon.isDefinedAndNotNull(labelData.component.height) || labelData.dimensions.height !== labelData.component.height) {
different = true;
}
// only save the updated bends if necessary
if (different) {
var labelEntity = {
- 'revision': client.getRevision(labelData),
+ 'revision': nfClient.getRevision(labelData),
'component': {
'id': labelData.id,
'width': labelData.dimensions.width,
@@ -381,13 +386,13 @@
}).fail(function () {
// determine the previous width
var width = dimensions.width;
- if (common.isDefinedAndNotNull(labelData.component.width)) {
+ if (nfCommon.isDefinedAndNotNull(labelData.component.width)) {
width = labelData.component.width;
}
// determine the previous height
var height = dimensions.height;
- if (common.isDefinedAndNotNull(labelData.component.height)) {
+ if (nfCommon.isDefinedAndNotNull(labelData.component.height)) {
height = labelData.component.height;
}
@@ -415,8 +420,8 @@
*/
add: function (labelEntities, options) {
var selectAll = false;
- if (common.isDefinedAndNotNull(options)) {
- selectAll = common.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
+ if (nfCommon.isDefinedAndNotNull(options)) {
+ selectAll = nfCommon.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
}
// get the current time
@@ -436,7 +441,7 @@
$.each(labelEntities, function (_, labelEntity) {
add(labelEntity);
});
- } else if (common.isDefinedAndNotNull(labelEntities)) {
+ } else if (nfCommon.isDefinedAndNotNull(labelEntities)) {
add(labelEntities);
}
@@ -455,16 +460,16 @@
set: function (labelEntities, options) {
var selectAll = false;
var transition = false;
- if (common.isDefinedAndNotNull(options)) {
- selectAll = common.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
- transition = common.isDefinedAndNotNull(options.transition) ? options.transition : transition;
+ if (nfCommon.isDefinedAndNotNull(options)) {
+ selectAll = nfCommon.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
+ transition = nfCommon.isDefinedAndNotNull(options.transition) ? options.transition : transition;
}
var set = function (proposedLabelEntity) {
var currentLabelEntity = labelMap.get(proposedLabelEntity.id);
// set the processor if appropriate due to revision and wasn't previously removed
- if (client.isNewerRevision(currentLabelEntity, proposedLabelEntity) && !removedCache.has(proposedLabelEntity.id)) {
+ if (nfClient.isNewerRevision(currentLabelEntity, proposedLabelEntity) && !removedCache.has(proposedLabelEntity.id)) {
labelMap.set(proposedLabelEntity.id, $.extend({
type: 'Label'
}, proposedLabelEntity));
@@ -486,14 +491,14 @@
$.each(labelEntities, function (_, labelEntity) {
set(labelEntity);
});
- } else if (common.isDefinedAndNotNull(labelEntities)) {
+ } else if (nfCommon.isDefinedAndNotNull(labelEntities)) {
set(labelEntities);
}
// apply the selection and handle all new labels
var selection = select();
selection.enter().call(renderLabels, selectAll);
- selection.call(updateLabels).call(canvasUtils.position, transition);
+ selection.call(updateLabels).call(nfCanvasUtils.position, transition);
selection.exit().call(removeLabels);
},
@@ -504,7 +509,7 @@
* @param {string} id
*/
get: function (id) {
- if (common.isUndefined(id)) {
+ if (nfCommon.isUndefined(id)) {
return labelMap.values();
} else {
return labelMap.get(id);
@@ -518,7 +523,7 @@
* @param {string} id Optional
*/
refresh: function (id) {
- if (common.isDefinedAndNotNull(id)) {
+ if (nfCommon.isDefinedAndNotNull(id)) {
d3.select('#id-' + id).call(updateLabels);
} else {
d3.selectAll('g.label').call(updateLabels);
@@ -550,7 +555,7 @@
* @param {string} id The id
*/
position: function (id) {
- d3.select('#id-' + id).call(canvasUtils.position);
+ d3.select('#id-' + id).call(nfCanvasUtils.position);
},
/**
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-policy-management.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-policy-management.js
index acc499ac2f..1fdf181a17 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-policy-management.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-policy-management.js
@@ -28,8 +28,8 @@
'nf.ng.Bridge',
'nf.Dialog',
'nf.Shell'],
- function ($, Slick, errorHandler, common, client, canvasUtils, angularBridge, dialog, shell) {
- return (nf.PolicyManagement = factory($, Slick, errorHandler, common, client, canvasUtils, angularBridge, dialog, shell));
+ function ($, Slick, nfErrorHandler, nfCommon, nfClient, nfCanvasUtils, nfNgBridge, nfDialog, nfShell) {
+ return (nf.PolicyManagement = factory($, Slick, nfErrorHandler, nfCommon, nfClient, nfCanvasUtils, nfNgBridge, nfDialog, nfShell));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.PolicyManagement =
@@ -53,7 +53,7 @@
root.nf.Dialog,
root.nf.Shell);
}
-}(this, function ($, Slick, errorHandler, common, client, canvasUtils, angularBridge, dialog, shell) {
+}(this, function ($, Slick, nfErrorHandler, nfCommon, nfClient, nfCanvasUtils, nfNgBridge, nfDialog, nfShell) {
'use strict';
var config = {
@@ -277,7 +277,7 @@
// also consider groups already selected in the search users dialog
container.children('li').each(function (_, allowedTenant) {
var tenant = $(allowedTenant).data('tenant');
- if (common.isDefinedAndNotNull(tenant)) {
+ if (nfCommon.isDefinedAndNotNull(tenant)) {
tenants.push(tenant);
}
});
@@ -381,16 +381,16 @@
// policy type listing
$('#policy-type-list').combo({
options: [
- common.getPolicyTypeListing('flow'),
- common.getPolicyTypeListing('controller'),
- common.getPolicyTypeListing('provenance'),
- common.getPolicyTypeListing('restricted-components'),
- common.getPolicyTypeListing('policies'),
- common.getPolicyTypeListing('tenants'),
- common.getPolicyTypeListing('site-to-site'),
- common.getPolicyTypeListing('system'),
- common.getPolicyTypeListing('proxy'),
- common.getPolicyTypeListing('counters')],
+ nfCommon.getPolicyTypeListing('flow'),
+ nfCommon.getPolicyTypeListing('controller'),
+ nfCommon.getPolicyTypeListing('provenance'),
+ nfCommon.getPolicyTypeListing('restricted-components'),
+ nfCommon.getPolicyTypeListing('policies'),
+ nfCommon.getPolicyTypeListing('tenants'),
+ nfCommon.getPolicyTypeListing('site-to-site'),
+ nfCommon.getPolicyTypeListing('system'),
+ nfCommon.getPolicyTypeListing('proxy'),
+ nfCommon.getPolicyTypeListing('counters')],
select: function (option) {
if (initialized) {
// record the policy type
@@ -636,8 +636,8 @@
// defines a function for sorting
var comparer = function (a, b) {
if(a.permissions.canRead && b.permissions.canRead) {
- var aString = common.isDefinedAndNotNull(a.component[sortDetails.columnId]) ? a.component[sortDetails.columnId] : '';
- var bString = common.isDefinedAndNotNull(b.component[sortDetails.columnId]) ? b.component[sortDetails.columnId] : '';
+ var aString = nfCommon.isDefinedAndNotNull(a.component[sortDetails.columnId]) ? a.component[sortDetails.columnId] : '';
+ var bString = nfCommon.isDefinedAndNotNull(b.component[sortDetails.columnId]) ? b.component[sortDetails.columnId] : '';
return aString === bString ? 0 : aString > bString ? 1 : -1;
} else {
if (!a.permissions.canRead && !b.permissions.canRead){
@@ -661,9 +661,9 @@
* @param item
*/
var promptToRemoveUserFromPolicy = function (item) {
- dialog.showYesNoDialog({
+ nfDialog.showYesNoDialog({
headerText: 'Update Policy',
- dialogContent: 'Remove \'' + common.escapeHtml(item.component.identity) + '\' from this policy?',
+ dialogContent: 'Remove \'' + nfCommon.escapeHtml(item.component.identity) + '\' from this policy?',
yesHandler: function () {
removeUserFromPolicy(item);
}
@@ -696,7 +696,7 @@
* Prompts for the deletion of the selected policy.
*/
var promptToDeletePolicy = function () {
- dialog.showYesNoDialog({
+ nfDialog.showYesNoDialog({
headerText: 'Delete Policy',
dialogContent: 'By deleting this policy, the permissions for this component will revert to the inherited policy if applicable.',
yesText: 'Delete',
@@ -713,20 +713,20 @@
var deletePolicy = function () {
var currentEntity = $('#policy-table').data('policy');
- if (common.isDefinedAndNotNull(currentEntity)) {
+ if (nfCommon.isDefinedAndNotNull(currentEntity)) {
$.ajax({
type: 'DELETE',
- url: currentEntity.uri + '?' + $.param(client.getRevision(currentEntity)),
+ url: currentEntity.uri + '?' + $.param(nfClient.getRevision(currentEntity)),
dataType: 'json'
}).done(function () {
loadPolicy();
}).fail(function (xhr, status, error) {
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
resetPolicy();
loadPolicy();
});
} else {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Delete Policy',
dialogContent: 'No policy selected'
});
@@ -802,11 +802,11 @@
return $('
Showing effective policy inherited from the controller.');
} else {
// extract the group id
- var processGroupId = common.substringAfterLast(resource, '/');
+ var processGroupId = nfCommon.substringAfterLast(resource, '/');
var processGroupName = processGroupId;
// attempt to resolve the group name
- var breadcrumbs = angularBridge.injector.get('breadcrumbsCtrl').getBreadcrumbs();
+ var breadcrumbs = nfNgBridge.injector.get('breadcrumbsCtrl').getBreadcrumbs();
$.each(breadcrumbs, function (_, breadcrumbEntity) {
if (breadcrumbEntity.id === processGroupId) {
processGroupName = breadcrumbEntity.label;
@@ -824,11 +824,11 @@
$('#shell-close-button').click();
// load the correct group and unselect everything if necessary
- canvasUtils.getComponentByType('ProcessGroup').enterGroup(processGroupId).done(function () {
- canvasUtils.getSelection().classed('selected', false);
+ nfCanvasUtils.getComponentByType('ProcessGroup').enterGroup(processGroupId).done(function () {
+ nfCanvasUtils.getSelection().classed('selected', false);
// inform Angular app that values have changed
- angularBridge.digest();
+ nfNgBridge.digest();
});
})
).append('
.');
@@ -948,7 +948,7 @@
resetPolicy();
deferred.reject();
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
}
});
}).promise();
@@ -1006,7 +1006,7 @@
resetPolicy();
deferred.reject();
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
}
});
}).promise();
@@ -1045,7 +1045,7 @@
}
var entity = {
- 'revision': client.getRevision({
+ 'revision': nfClient.getRevision({
'revision': {
'version': 0
}
@@ -1074,7 +1074,7 @@
resetPolicy();
loadPolicy();
}
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
};
/**
@@ -1102,9 +1102,9 @@
});
var currentEntity = $('#policy-table').data('policy');
- if (common.isDefinedAndNotNull(currentEntity)) {
+ if (nfCommon.isDefinedAndNotNull(currentEntity)) {
var entity = {
- 'revision': client.getRevision(currentEntity),
+ 'revision': nfClient.getRevision(currentEntity),
'component': {
'id': currentEntity.id,
'users': users,
@@ -1129,16 +1129,16 @@
loadPolicy();
}
}).fail(function (xhr, status, error) {
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
resetPolicy();
loadPolicy();
}).always(function () {
- canvasUtils.reload({
+ nfCanvasUtils.reload({
'transition': true
});
});
} else {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Update Policy',
dialogContent: 'No policy selected'
});
@@ -1150,7 +1150,7 @@
*/
var showPolicy = function () {
// show the configuration dialog
- shell.showContent('#policy-management').always(function () {
+ nfShell.showContent('#policy-management').always(function () {
reset();
});
@@ -1227,7 +1227,7 @@
var policyTable = $('#policy-table');
if (policyTable.is(':visible')) {
var policyGrid = policyTable.data('gridInstance');
- if (common.isDefinedAndNotNull(policyGrid)) {
+ if (nfCommon.isDefinedAndNotNull(policyGrid)) {
policyGrid.resizeCanvas();
}
}
@@ -1381,7 +1381,7 @@
var resource;
if (selection.empty()) {
- $('#selected-policy-component-id').text(canvasUtils.getGroupId());
+ $('#selected-policy-component-id').text(nfCanvasUtils.getGroupId());
resource = 'process-groups';
// disable site to site option
@@ -1402,19 +1402,19 @@
var d = selection.datum();
$('#selected-policy-component-id').text(d.id);
- if (canvasUtils.isProcessor(selection)) {
+ if (nfCanvasUtils.isProcessor(selection)) {
resource = 'processors';
- } else if (canvasUtils.isProcessGroup(selection)) {
+ } else if (nfCanvasUtils.isProcessGroup(selection)) {
resource = 'process-groups';
- } else if (canvasUtils.isInputPort(selection)) {
+ } else if (nfCanvasUtils.isInputPort(selection)) {
resource = 'input-ports';
- } else if (canvasUtils.isOutputPort(selection)) {
+ } else if (nfCanvasUtils.isOutputPort(selection)) {
resource = 'output-ports';
- } else if (canvasUtils.isRemoteProcessGroup(selection)) {
+ } else if (nfCanvasUtils.isRemoteProcessGroup(selection)) {
resource = 'remote-process-groups';
- } else if (canvasUtils.isLabel(selection)) {
+ } else if (nfCanvasUtils.isLabel(selection)) {
resource = 'labels';
- } else if (canvasUtils.isFunnel(selection)) {
+ } else if (nfCanvasUtils.isFunnel(selection)) {
resource = 'funnels';
}
@@ -1422,16 +1422,16 @@
$('#component-policy-target')
.combo('setOptionEnabled', {
value: 'write-receive-data'
- }, canvasUtils.isInputPort(selection) && canvasUtils.getParentGroupId() === null)
+ }, nfCanvasUtils.isInputPort(selection) && nfCanvasUtils.getParentGroupId() === null)
.combo('setOptionEnabled', {
value: 'write-send-data'
- }, canvasUtils.isOutputPort(selection) && canvasUtils.getParentGroupId() === null)
+ }, nfCanvasUtils.isOutputPort(selection) && nfCanvasUtils.getParentGroupId() === null)
.combo('setOptionEnabled', {
value: 'read-data'
- }, !canvasUtils.isLabel(selection))
+ }, !nfCanvasUtils.isLabel(selection))
.combo('setOptionEnabled', {
value: 'write-data'
- }, !canvasUtils.isLabel(selection));
+ }, !nfCanvasUtils.isLabel(selection));
}
// populate the initial resource
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-configuration.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-configuration.js
index 25d99beeb9..083b8cdeb7 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-configuration.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-configuration.js
@@ -28,8 +28,8 @@
'nf.CanvasUtils',
'nf.ng.Bridge',
'nf.Port'],
- function ($, d3, errorHandler, common, dialog, client, canvasUtils, angularBridge, port) {
- return (nf.PortConfiguration = factory($, d3, errorHandler, common, dialog, client, canvasUtils, angularBridge, port));
+ function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfPort) {
+ return (nf.PortConfiguration = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfPort));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.PortConfiguration =
@@ -53,7 +53,7 @@
root.nf.ng.Bridge,
root.nf.Port);
}
-}(this, function ($, d3, errorHandler, common, dialog, client, canvasUtils, angularBridge, port) {
+}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfPort) {
'use strict';
/**
@@ -97,7 +97,7 @@
// build the port entity
var portEntity = {
- 'revision': client.getRevision(portData),
+ 'revision': nfClient.getRevision(portData),
'component': port
};
@@ -110,10 +110,10 @@
contentType: 'application/json'
}).done(function (response) {
// refresh the port component
- port.set(response);
+ nfPort.set(response);
// inform Angular app values have changed
- angularBridge.digest();
+ nfNgBridge.digest();
// close the details panel
$('#port-configuration').modal('hide');
@@ -128,10 +128,10 @@
if (errors.length === 1) {
content = $('
').text(errors[0]);
} else {
- content = common.formatUnorderedList(errors);
+ content = nfCommon.formatUnorderedList(errors);
}
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
dialogContent: content,
headerText: 'Port Configuration'
});
@@ -140,7 +140,7 @@
$('#port-configuration').modal('hide');
// handle the error
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
}
});
}
@@ -184,7 +184,7 @@
*/
showConfiguration: function (selection) {
// if the specified component is a port, load its properties
- if (canvasUtils.isInputPort(selection) || canvasUtils.isOutputPort(selection)) {
+ if (nfCanvasUtils.isInputPort(selection) || nfCanvasUtils.isOutputPort(selection)) {
var selectionData = selection.datum();
// determine if the enabled checkbox is checked or not
@@ -194,7 +194,7 @@
}
// show concurrent tasks for root groups only
- if (canvasUtils.getParentGroupId() === null) {
+ if (nfCanvasUtils.getParentGroupId() === null) {
$('#port-concurrent-task-container').show();
} else {
$('#port-concurrent-task-container').hide();
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-details.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-details.js
index ac60e7edaa..9c3c452338 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-details.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-details.js
@@ -22,8 +22,8 @@
define(['jquery',
'nf.Common',
'nf.CanvasUtils'],
- function ($, common, canvasUtils) {
- return (nf.PortDetails = factory($, common, canvasUtils));
+ function ($, nfCommon, nfCanvasUtils) {
+ return (nf.PortDetails = factory($, nfCommon, nfCanvasUtils));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.PortDetails =
@@ -35,7 +35,7 @@
root.nf.Common,
root.nf.CanvasUtils);
}
-}(this, function ($, common, canvasUtils) {
+}(this, function ($, nfCommon, nfCanvasUtils) {
'use strict';
return {
@@ -61,9 +61,9 @@
handler: {
close: function () {
// clear the processor details
- common.clearField('read-only-port-name');
- common.clearField('read-only-port-id');
- common.clearField('read-only-port-comments');
+ nfCommon.clearField('read-only-port-name');
+ nfCommon.clearField('read-only-port-id');
+ nfCommon.clearField('read-only-port-comments');
}
}
});
@@ -71,13 +71,13 @@
showDetails: function (selection) {
// if the specified component is a processor, load its properties
- if (canvasUtils.isInputPort(selection) || canvasUtils.isOutputPort(selection)) {
+ if (nfCanvasUtils.isInputPort(selection) || nfCanvasUtils.isOutputPort(selection)) {
var selectionData = selection.datum();
// populate the port settings
- common.populateField('read-only-port-name', selectionData.component.name);
- common.populateField('read-only-port-id', selectionData.id);
- common.populateField('read-only-port-comments', selectionData.component.comments);
+ nfCommon.populateField('read-only-port-name', selectionData.component.name);
+ nfCommon.populateField('read-only-port-id', selectionData.id);
+ nfCommon.populateField('read-only-port-comments', selectionData.component.comments);
// show the details
$('#port-details').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-port.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port.js
index 129033b670..06820bfc8f 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port.js
@@ -24,8 +24,8 @@
'nf.Common',
'nf.Client',
'nf.CanvasUtils'],
- function ($, d3, common, client, canvasUtils) {
- return (nf.Port = factory($, d3, common, client, canvasUtils));
+ function ($, d3, nfCommon, nfClient, nfCanvasUtils) {
+ return (nf.Port = factory($, d3, nfCommon, nfClient, nfCanvasUtils));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.Port =
@@ -41,7 +41,7 @@
root.nf.Client,
root.nf.CanvasUtils);
}
-}(this, function ($, d3, common, client, canvasUtils) {
+}(this, function ($, d3, nfCommon, nfClient, nfCanvasUtils) {
'use strict';
var nfConnectable;
@@ -118,7 +118,7 @@
}
})
.classed('selected', selected)
- .call(canvasUtils.position);
+ .call(nfCanvasUtils.position);
// port border
port.append('rect')
@@ -151,7 +151,7 @@
var offset = 0;
// conditionally render the remote banner
- if (canvasUtils.getParentGroupId() === null) {
+ if (nfCanvasUtils.getParentGroupId() === null) {
offset = OFFSET_VALUE;
// port remote banner
@@ -227,7 +227,7 @@
var details = port.select('g.port-details');
// update the component behavior as appropriate
- canvasUtils.editable(port, nfConnectable, nfDraggable);
+ nfCanvasUtils.editable(port, nfConnectable, nfDraggable);
// if this process group is visible, render everything
if (port.classed('visible')) {
@@ -235,7 +235,7 @@
details = port.append('g').attr('class', 'port-details');
var offset = 0;
- if (canvasUtils.getParentGroupId() === null) {
+ if (nfCanvasUtils.getParentGroupId() === null) {
offset = OFFSET_VALUE;
// port transmitting icon
@@ -313,9 +313,9 @@
// handle based on the number of tokens in the port name
if (words.length === 1) {
// apply ellipsis to the port name as necessary
- canvasUtils.ellipsis(portName, name);
+ nfCanvasUtils.ellipsis(portName, name);
} else {
- canvasUtils.multilineEllipsis(portName, 2, name);
+ nfCanvasUtils.multilineEllipsis(portName, 2, name);
}
}).append('title').text(function (d) {
return d.component.name;
@@ -407,7 +407,7 @@
var tip = d3.select('#run-status-tip-' + d.id);
// if there are validation errors generate a tooltip
- if (d.permissions.canRead && !common.isEmpty(d.component.validationErrors)) {
+ if (d.permissions.canRead && !nfCommon.isEmpty(d.component.validationErrors)) {
// create the tip if necessary
if (tip.empty()) {
tip = d3.select('#port-tooltips').append('div')
@@ -419,7 +419,7 @@
// update the tip
tip.html(function () {
- var list = common.formatUnorderedList(d.component.validationErrors);
+ var list = nfCommon.formatUnorderedList(d.component.validationErrors);
if (list === null || list.length === 0) {
return '';
} else {
@@ -428,7 +428,7 @@
});
// add the tooltip
- canvasUtils.canvasTooltip(tip, d3.select(this));
+ nfCanvasUtils.canvasTooltip(tip, d3.select(this));
} else {
// remove if necessary
if (!tip.empty()) {
@@ -477,7 +477,7 @@
// active thread count
// -------------------
- canvasUtils.activeThreadCount(port, d, function (off) {
+ nfCanvasUtils.activeThreadCount(port, d, function (off) {
offset = off;
});
@@ -486,10 +486,10 @@
// ---------
port.select('rect.bulletin-background').classed('has-bulletins', function () {
- return !common.isEmpty(d.status.aggregateSnapshot.bulletins);
+ return !nfCommon.isEmpty(d.status.aggregateSnapshot.bulletins);
});
- canvasUtils.bulletins(port, d, function () {
+ nfCanvasUtils.bulletins(port, d, function () {
return d3.select('#port-tooltips');
}, offset);
});
@@ -524,12 +524,17 @@
var nfPort = {
/**
* Initializes of the Port handler.
+ *
+ * @param nfConnectableRef The nfConnectable module.
+ * @param nfDraggableRef The nfDraggable module.
+ * @param nfSelectableRef The nfSelectable module.
+ * @param nfContextMenuRef The nfContextMenu module.
*/
- init: function (connectable, draggable, selectable, contextMenu) {
- nfConnectable = connectable;
- nfDraggable = draggable;
- nfSelectable = selectable;
- nfContextMenu = contextMenu;
+ init: function (nfConnectableRef, nfDraggableRef, nfSelectableRef, nfContextMenuRef) {
+ nfConnectable = nfConnectableRef;
+ nfDraggable = nfDraggableRef;
+ nfSelectable = nfSelectableRef;
+ nfContextMenu = nfContextMenuRef;
portMap = d3.map();
removedCache = d3.map();
@@ -551,13 +556,13 @@
*/
add: function (portEntities, options) {
var selectAll = false;
- if (common.isDefinedAndNotNull(options)) {
- selectAll = common.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
+ if (nfCommon.isDefinedAndNotNull(options)) {
+ selectAll = nfCommon.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
}
// determine the appropriate dimensions for this port
var dimensions = portDimensions;
- if (canvasUtils.getParentGroupId() === null) {
+ if (nfCanvasUtils.getParentGroupId() === null) {
dimensions = remotePortDimensions;
}
@@ -582,7 +587,7 @@
$.each(portEntities, function (_, portNode) {
add(portNode);
});
- } else if (common.isDefinedAndNotNull(portEntities)) {
+ } else if (nfCommon.isDefinedAndNotNull(portEntities)) {
add(portEntities);
}
@@ -601,14 +606,14 @@
set: function (portEntities, options) {
var selectAll = false;
var transition = false;
- if (common.isDefinedAndNotNull(options)) {
- selectAll = common.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
- transition = common.isDefinedAndNotNull(options.transition) ? options.transition : transition;
+ if (nfCommon.isDefinedAndNotNull(options)) {
+ selectAll = nfCommon.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
+ transition = nfCommon.isDefinedAndNotNull(options.transition) ? options.transition : transition;
}
// determine the appropriate dimensions for this port
var dimensions = portDimensions;
- if (canvasUtils.getParentGroupId() === null) {
+ if (nfCanvasUtils.getParentGroupId() === null) {
dimensions = remotePortDimensions;
}
@@ -616,7 +621,7 @@
var currentPortEntity = portMap.get(proposedPortEntity.id);
// set the port if appropriate due to revision and wasn't previously removed
- if (client.isNewerRevision(currentPortEntity, proposedPortEntity) && !removedCache.has(proposedPortEntity.id)) {
+ if (nfClient.isNewerRevision(currentPortEntity, proposedPortEntity) && !removedCache.has(proposedPortEntity.id)) {
// add the port
portMap.set(proposedPortEntity.id, $.extend({
type: 'Port',
@@ -644,14 +649,14 @@
$.each(portEntities, function (_, portNode) {
set(portNode);
});
- } else if (common.isDefinedAndNotNull(portEntities)) {
+ } else if (nfCommon.isDefinedAndNotNull(portEntities)) {
set(portEntities);
}
// apply the selection and handle all new ports
var selection = select();
selection.enter().call(renderPorts, selectAll);
- selection.call(updatePorts).call(canvasUtils.position, transition);
+ selection.call(updatePorts).call(nfCanvasUtils.position, transition);
selection.exit().call(removePorts);
},
@@ -662,7 +667,7 @@
* @param {string} id
*/
get: function (id) {
- if (common.isUndefined(id)) {
+ if (nfCommon.isUndefined(id)) {
return portMap.values();
} else {
return portMap.get(id);
@@ -676,7 +681,7 @@
* @param {string} id Optional
*/
refresh: function (id) {
- if (common.isDefinedAndNotNull(id)) {
+ if (nfCommon.isDefinedAndNotNull(id)) {
d3.select('#id-' + id).call(updatePorts);
} else {
d3.selectAll('g.input-port, g.output-port').call(updatePorts);
@@ -715,7 +720,7 @@
* @param {string} id The id
*/
position: function (id) {
- d3.select('#id-' + id).call(canvasUtils.position);
+ d3.select('#id-' + id).call(nfCanvasUtils.position);
},
/**
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js
index 8658a0275e..157bfe32f8 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js
@@ -28,8 +28,8 @@
'nf.ProcessGroup',
'nf.Shell',
'nf.CanvasUtils'],
- function ($, d3, errorHandler, common, dialog, client, processGroup, shell, canvasUtils) {
- return (nf.ProcessGroupConfiguration = factory($, d3, errorHandler, common, dialog, client, processGroup, shell, canvasUtils));
+ function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfProcessGroup, nfShell, nfCanvasUtils) {
+ return (nf.ProcessGroupConfiguration = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfProcessGroup, nfShell, nfCanvasUtils));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ProcessGroupConfiguration =
@@ -53,7 +53,7 @@
root.nf.Shell,
root.nf.CanvasUtils);
}
-}(this, function ($, d3, errorHandler, common, dialog, client, processGroup, shell, canvasUtils) {
+}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfProcessGroup, nfShell, nfCanvasUtils) {
'use strict';
var nfControllerServices;
@@ -88,7 +88,7 @@
var saveConfiguration = function (version, groupId) {
// build the entity
var entity = {
- 'revision': client.getRevision({
+ 'revision': nfClient.getRevision({
'revision': {
'version': version
}
@@ -109,12 +109,12 @@
contentType: 'application/json'
}).done(function (response) {
// refresh the process group if necessary
- if (response.permissions.canRead && response.component.parentGroupId === canvasUtils.getGroupId()) {
- processGroup.set(response);
+ if (response.permissions.canRead && response.component.parentGroupId === nfCanvasUtils.getGroupId()) {
+ nfProcessGroup.set(response);
}
// show the result dialog
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Process Group Configuration',
dialogContent: 'Process group configuration successfully saved.'
});
@@ -124,8 +124,8 @@
saveConfiguration(response.revision.version, groupId);
});
- canvasUtils.reload();
- }).fail(errorHandler.handleAjaxError);
+ nfCanvasUtils.reload();
+ }).fail(nfErrorHandler.handleAjaxError);
};
/**
@@ -188,15 +188,15 @@
deferred.resolve();
}).fail(function (xhr, status, error) {
if (xhr.status === 403) {
- if (groupId === canvasUtils.getGroupId()) {
+ if (groupId === nfCanvasUtils.getGroupId()) {
$('#process-group-configuration').data('process-group', {
'permissions': {
canRead: false,
- canWrite: canvasUtils.canWrite()
+ canWrite: nfCanvasUtils.canWrite()
}
});
} else {
- $('#process-group-configuration').data('process-group', processGroup.get(groupId));
+ $('#process-group-configuration').data('process-group', nfProcessGroup.get(groupId));
}
setUnauthorizedText();
@@ -218,7 +218,7 @@
// update the current time
$('#process-group-configuration-last-refreshed').text(controllerServicesResponse.currentTime);
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
};
/**
@@ -226,7 +226,7 @@
*/
var showConfiguration = function () {
// show the configuration dialog
- shell.showContent('#process-group-configuration').done(function () {
+ nfShell.showContent('#process-group-configuration').done(function () {
reset();
});
@@ -256,10 +256,10 @@
/**
* Initialize the process group configuration.
*
- * @param controllerServices The reference to the controllerServices controller.
+ * @param nfControllerServicesRef The nfControllerServices module.
*/
- init: function (controllerServices) {
- nfControllerServices = controllerServices;
+ init: function (nfControllerServicesRef) {
+ nfControllerServices = nfControllerServicesRef;
// initialize the process group configuration tabs
$('#process-group-configuration-tabs').tabbs({
@@ -275,7 +275,7 @@
}],
select: function () {
var processGroup = $('#process-group-configuration').data('process-group');
- var canWrite = common.isDefinedAndNotNull(processGroup) ? processGroup.permissions.canWrite : false;
+ var canWrite = nfCommon.isDefinedAndNotNull(processGroup) ? processGroup.permissions.canWrite : false;
var tab = $(this).text();
if (tab === 'General') {
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js
index 38175d55c7..75f1916835 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js
@@ -26,8 +26,8 @@
'nf.Client',
'nf.CanvasUtils',
'nf.Dialog'],
- function ($, d3, connection, common, client, canvasUtils, dialog) {
- return (nf.ProcessGroup = factory($, d3, connection, common, client, canvasUtils, dialog));
+ function ($, d3, nfConnection, nfCommon, nfClient, nfCanvasUtils, nfDialog) {
+ return (nf.ProcessGroup = factory($, d3, nfConnection, nfCommon, nfClient, nfCanvasUtils, nfDialog));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ProcessGroup =
@@ -47,7 +47,7 @@
root.nf.CanvasUtils,
root.nf.Dialog);
}
-}(this, function ($, d3, connection, common, client, canvasUtils, dialog) {
+}(this, function ($, d3, nfConnection, nfCommon, nfClient, nfCanvasUtils, nfDialog) {
'use strict';
var nfConnectable;
@@ -91,7 +91,7 @@
* @param {object} d
*/
var getProcessGroupComments = function (d) {
- if (common.isBlank(d.component.comments)) {
+ if (nfCommon.isBlank(d.component.comments)) {
return 'No comments specified';
} else {
return d.component.comments;
@@ -126,7 +126,7 @@
'class': 'process-group component'
})
.classed('selected', selected)
- .call(canvasUtils.position);
+ .call(nfCanvasUtils.position);
// ----
// body
@@ -203,7 +203,7 @@
var drag = d3.select('rect.drag-selection');
if (!drag.empty()) {
// filter the current selection by this group
- var selection = canvasUtils.getSelection().filter(function (d) {
+ var selection = nfCanvasUtils.getSelection().filter(function (d) {
return targetData.id === d.id;
});
@@ -212,7 +212,7 @@
// mark that we are hovering over a drop area if appropriate
target.classed('drop', function () {
// get the current selection and ensure its disconnected
- return connection.isDisconnected(canvasUtils.getSelection());
+ return nfConnection.isDisconnected(nfCanvasUtils.getSelection());
});
}
}
@@ -257,7 +257,7 @@
var details = processGroup.select('g.process-group-details');
// update the component behavior as appropriate
- canvasUtils.editable(processGroup, nfConnectable, nfDraggable);
+ nfCanvasUtils.editable(processGroup, nfConnectable, nfDraggable);
// if this processor is visible, render everything
if (processGroup.classed('visible')) {
@@ -848,9 +848,9 @@
processGroupComments.text(null).selectAll('tspan, title').remove();
// apply ellipsis to the port name as necessary
- canvasUtils.ellipsis(processGroupComments, getProcessGroupComments(d));
+ nfCanvasUtils.ellipsis(processGroupComments, getProcessGroupComments(d));
}).classed('unset', function (d) {
- return common.isBlank(d.component.comments);
+ return nfCommon.isBlank(d.component.comments);
}).append('title').text(function (d) {
return getProcessGroupComments(d);
});
@@ -864,7 +864,7 @@
processGroupName.text(null).selectAll('title').remove();
// apply ellipsis to the process group name as necessary
- canvasUtils.ellipsis(processGroupName, d.component.name);
+ nfCanvasUtils.ellipsis(processGroupName, d.component.name);
}).append('title').text(function (d) {
return d.component.name;
});
@@ -919,25 +919,25 @@
// queued count value
updated.select('text.process-group-queued tspan.count')
.text(function (d) {
- return common.substringBeforeFirst(d.status.aggregateSnapshot.queued, ' ');
+ return nfCommon.substringBeforeFirst(d.status.aggregateSnapshot.queued, ' ');
});
// queued size value
updated.select('text.process-group-queued tspan.size')
.text(function (d) {
- return ' ' + common.substringAfterFirst(d.status.aggregateSnapshot.queued, ' ');
+ return ' ' + nfCommon.substringAfterFirst(d.status.aggregateSnapshot.queued, ' ');
});
// in count value
updated.select('text.process-group-in tspan.count')
.text(function (d) {
- return common.substringBeforeFirst(d.status.aggregateSnapshot.input, ' ');
+ return nfCommon.substringBeforeFirst(d.status.aggregateSnapshot.input, ' ');
});
// in size value
updated.select('text.process-group-in tspan.size')
.text(function (d) {
- return ' ' + common.substringAfterFirst(d.status.aggregateSnapshot.input, ' ');
+ return ' ' + nfCommon.substringAfterFirst(d.status.aggregateSnapshot.input, ' ');
});
// in ports value
@@ -961,13 +961,13 @@
// out count value
updated.select('text.process-group-out tspan.count')
.text(function (d) {
- return common.substringBeforeFirst(d.status.aggregateSnapshot.output, ' ');
+ return nfCommon.substringBeforeFirst(d.status.aggregateSnapshot.output, ' ');
});
// out size value
updated.select('text.process-group-out tspan.size')
.text(function (d) {
- return ' ' + common.substringAfterFirst(d.status.aggregateSnapshot.output, ' ');
+ return ' ' + nfCommon.substringAfterFirst(d.status.aggregateSnapshot.output, ' ');
});
updated.each(function (d) {
@@ -978,7 +978,7 @@
// active thread count
// -------------------
- canvasUtils.activeThreadCount(processGroup, d, function (off) {
+ nfCanvasUtils.activeThreadCount(processGroup, d, function (off) {
offset = off;
});
@@ -987,10 +987,10 @@
// ---------
processGroup.select('rect.bulletin-background').classed('has-bulletins', function () {
- return !common.isEmpty(d.status.aggregateSnapshot.bulletins);
+ return !nfCommon.isEmpty(d.status.aggregateSnapshot.bulletins);
});
- canvasUtils.bulletins(processGroup, d, function () {
+ nfCanvasUtils.bulletins(processGroup, d, function () {
return d3.select('#process-group-tooltips');
}, offset);
});
@@ -1024,12 +1024,17 @@
var nfProcessGroup = {
/**
* Initializes of the Process Group handler.
+ *
+ * @param nfConnectableRef The nfConnectable module.
+ * @param nfDraggableRef The nfDraggable module.
+ * @param nfSelectableRef The nfSelectable module.
+ * @param nfContextMenuRef The nfContextMenu module.
*/
- init: function (connectable, draggable, selectable, contextMenu) {
- nfConnectable = connectable;
- nfDraggable = draggable;
- nfSelectable = selectable;
- nfContextMenu = contextMenu;
+ init: function (nfConnectableRef, nfDraggableRef, nfSelectableRef, nfContextMenuRef) {
+ nfConnectable = nfConnectableRef;
+ nfDraggable = nfDraggableRef;
+ nfSelectable = nfSelectableRef;
+ nfContextMenu = nfContextMenuRef;
processGroupMap = d3.map();
removedCache = d3.map();
@@ -1051,8 +1056,8 @@
*/
add: function (processGroupEntities, options) {
var selectAll = false;
- if (common.isDefinedAndNotNull(options)) {
- selectAll = common.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
+ if (nfCommon.isDefinedAndNotNull(options)) {
+ selectAll = nfCommon.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
}
// get the current time
@@ -1073,7 +1078,7 @@
$.each(processGroupEntities, function (_, processGroupEntity) {
add(processGroupEntity);
});
- } else if (common.isDefinedAndNotNull(processGroupEntities)) {
+ } else if (nfCommon.isDefinedAndNotNull(processGroupEntities)) {
add(processGroupEntities);
}
@@ -1092,16 +1097,16 @@
set: function (processGroupEntities, options) {
var selectAll = false;
var transition = false;
- if (common.isDefinedAndNotNull(options)) {
- selectAll = common.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
- transition = common.isDefinedAndNotNull(options.transition) ? options.transition : transition;
+ if (nfCommon.isDefinedAndNotNull(options)) {
+ selectAll = nfCommon.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
+ transition = nfCommon.isDefinedAndNotNull(options.transition) ? options.transition : transition;
}
var set = function (proposedProcessGroupEntity) {
var currentProcessGroupEntity = processGroupMap.get(proposedProcessGroupEntity.id);
// set the process group if appropriate due to revision and wasn't previously removed
- if (client.isNewerRevision(currentProcessGroupEntity, proposedProcessGroupEntity) && !removedCache.has(proposedProcessGroupEntity.id)) {
+ if (nfClient.isNewerRevision(currentProcessGroupEntity, proposedProcessGroupEntity) && !removedCache.has(proposedProcessGroupEntity.id)) {
processGroupMap.set(proposedProcessGroupEntity.id, $.extend({
type: 'ProcessGroup',
dimensions: dimensions
@@ -1125,14 +1130,14 @@
$.each(processGroupEntities, function (_, processGroupEntity) {
set(processGroupEntity);
});
- } else if (common.isDefinedAndNotNull(processGroupEntities)) {
+ } else if (nfCommon.isDefinedAndNotNull(processGroupEntities)) {
set(processGroupEntities);
}
// apply the selection and handle all new process group
var selection = select();
selection.enter().call(renderProcessGroups, selectAll);
- selection.call(updateProcessGroups).call(canvasUtils.position, transition);
+ selection.call(updateProcessGroups).call(nfCanvasUtils.position, transition);
selection.exit().call(removeProcessGroups);
},
@@ -1143,7 +1148,7 @@
* @param {string} id
*/
get: function (id) {
- if (common.isUndefined(id)) {
+ if (nfCommon.isUndefined(id)) {
return processGroupMap.values();
} else {
return processGroupMap.get(id);
@@ -1157,7 +1162,7 @@
* @param {string} id Optional
*/
refresh: function (id) {
- if (common.isDefinedAndNotNull(id)) {
+ if (nfCommon.isDefinedAndNotNull(id)) {
d3.select('#id-' + id).call(updateProcessGroups);
} else {
d3.selectAll('g.process-group').call(updateProcessGroups);
@@ -1196,7 +1201,7 @@
* @param {string} id The id
*/
position: function (id) {
- d3.select('#id-' + id).call(canvasUtils.position);
+ d3.select('#id-' + id).call(nfCanvasUtils.position);
},
/**
@@ -1257,25 +1262,25 @@
nfContextMenu.hide();


// set the new group id
- canvasUtils.setGroupId(groupId);


+ nfCanvasUtils.setGroupId(groupId);


// reload the graph
- return canvasUtils.reload().done(function () {

+ return nfCanvasUtils.reload().done(function () {

// attempt to restore the view
- var viewRestored = canvasUtils.restoreUserView();


+ var viewRestored = nfCanvasUtils.restoreUserView();


// if the view was not restore attempt to fit
if (viewRestored === false) {
- canvasUtils.fitCanvasView();


+ nfCanvasUtils.fitCanvasView();


// refresh the canvas
- canvasUtils.refreshCanvasView({
+ nfCanvasUtils.refreshCanvasView({
transition: true
});
}
}).fail(function () {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Process Group',
dialogContent: 'Unable to enter the selected group.'
});
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
index 157f803776..7236da34cb 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
@@ -31,8 +31,8 @@
'nf.CustomUi',
'nf.UniversalCapture',
'nf.Connection'],
- function ($, errorHandler, common, dialog, client, canvasUtils, angularBridge, nfProcessor, clusterSummary, customUi, universalCapture, nfConnection) {
- return (nf.ProcessorConfiguration = factory($, errorHandler, common, dialog, client, canvasUtils, angularBridge, nfProcessor, clusterSummary, customUi, universalCapture, nfConnection));
+ function ($, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfProcessor, nfClusterSummary, nfCustomUi, nfUniversalCapture, nfConnection) {
+ return (nf.ProcessorConfiguration = factory($, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfProcessor, nfClusterSummary, nfCustomUi, nfUniversalCapture, nfConnection));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ProcessorConfiguration =
@@ -62,7 +62,7 @@
root.nf.UniversalCapture,
root.nf.Connection);
}
-}(this, function ($, errorHandler, common, dialog, client, canvasUtils, angularBridge, nfProcessor, clusterSummary, customUi, universalCapture, nfConnection) {
+}(this, function ($, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfProcessor, nfClusterSummary, nfCustomUi, nfUniversalCapture, nfConnection) {
'use strict';
// possible values for a processor's run duration (in millis)
@@ -133,7 +133,7 @@
text: 'Primary node',
value: 'PRIMARY',
description: 'Processor will be scheduled to run only on the primary node',
- disabled: !clusterSummary.isClustered() && processor.config['executionNode'] === 'PRIMARY'
+ disabled: !nfClusterSummary.isClustered() && processor.config['executionNode'] === 'PRIMARY'
}];
};
@@ -152,15 +152,15 @@
if (errors.length === 1) {
content = $('
').text(errors[0]);
} else {
- content = common.formatUnorderedList(errors);
+ content = nfCommon.formatUnorderedList(errors);
}
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
dialogContent: content,
headerText: 'Processor Configuration'
});
} else {
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
}
};
@@ -183,7 +183,7 @@
// build the relationship container element
var relationshipContainerElement = $('
').append(relationshipCheckbox).append(relationshipLabel).append(relationshipValue).appendTo('#auto-terminate-relationship-names');
- if (!common.isBlank(relationship.description)) {
+ if (!nfCommon.isBlank(relationship.description)) {
var relationshipDescription = $('
').text(relationship.description);
relationshipContainerElement.append(relationshipDescription);
}
@@ -255,7 +255,7 @@
}
// check the scheduling period
- if (common.isDefinedAndNotNull(schedulingPeriod) && schedulingPeriod.val() !== (details.config['schedulingPeriod'] + '')) {
+ if (nfCommon.isDefinedAndNotNull(schedulingPeriod) && schedulingPeriod.val() !== (details.config['schedulingPeriod'] + '')) {
return true;
}
@@ -321,7 +321,7 @@
}
// get the scheduling period if appropriate
- if (common.isDefinedAndNotNull(schedulingPeriod)) {
+ if (nfCommon.isDefinedAndNotNull(schedulingPeriod)) {
processorConfigDto['schedulingPeriod'] = schedulingPeriod.val();
}
@@ -405,22 +405,22 @@
var config = processor['config'];
// ensure numeric fields are specified correctly
- if (common.isDefinedAndNotNull(config['concurrentlySchedulableTaskCount']) && !$.isNumeric(config['concurrentlySchedulableTaskCount'])) {
+ if (nfCommon.isDefinedAndNotNull(config['concurrentlySchedulableTaskCount']) && !$.isNumeric(config['concurrentlySchedulableTaskCount'])) {
errors.push('Concurrent tasks must be an integer value');
}
- if (common.isDefinedAndNotNull(config['schedulingPeriod']) && common.isBlank(config['schedulingPeriod'])) {
+ if (nfCommon.isDefinedAndNotNull(config['schedulingPeriod']) && nfCommon.isBlank(config['schedulingPeriod'])) {
errors.push('Run schedule must be specified');
}
- if (common.isBlank(config['penaltyDuration'])) {
+ if (nfCommon.isBlank(config['penaltyDuration'])) {
errors.push('Penalty duration must be specified');
}
- if (common.isBlank(config['yieldDuration'])) {
+ if (nfCommon.isBlank(config['yieldDuration'])) {
errors.push('Yield duration must be specified');
}
if (errors.length > 0) {
- dialog.showOkDialog({
- dialogContent: common.formatUnorderedList(errors),
+ nfDialog.showOkDialog({
+ dialogContent: nfCommon.formatUnorderedList(errors),
headerText: 'Processor Configuration'
});
return false;
@@ -456,7 +456,7 @@
// determine if changes have been made
if (isSaveRequired()) {
// see if those changes should be saved
- dialog.showYesNoDialog({
+ nfDialog.showYesNoDialog({
headerText: 'Processor Configuration',
dialogContent: 'Save changes before going to this Controller Service?',
noHandler: function () {
@@ -490,7 +490,7 @@
if (validateDetails(updatedProcessor)) {
// set the revision
var d = nfProcessor.get(processor.id);
- updatedProcessor['revision'] = client.getRevision(d);
+ updatedProcessor['revision'] = nfClient.getRevision(d);
// update the selected component
return $.ajax({
@@ -535,7 +535,7 @@
}],
select: function () {
// remove all property detail dialogs
- universalCapture.removeAllPropertyDetailDialogs();
+ nfUniversalCapture.removeAllPropertyDetailDialogs();
// update the processor property table size in case this is the first time its rendered
if ($(this).text() === 'Properties') {
@@ -569,7 +569,7 @@
$('#processor-configuration').removeData('processorDetails');
},
open: function () {
- common.toggleScrollable($('#' + this.find('.tab-container').attr('id') + '-content').get(0));
+ nfCommon.toggleScrollable($('#' + this.find('.tab-container').attr('id') + '-content').get(0));
}
}
});
@@ -620,7 +620,7 @@
propertyName: propertyName
},
dataType: 'json'
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
},
goToServiceDeferred: goToServiceFromProperty
});
@@ -632,7 +632,7 @@
* @argument {selection} selection The selection
*/
showConfiguration: function (selection) {
- if (canvasUtils.isProcessor(selection)) {
+ if (nfCanvasUtils.isProcessor(selection)) {
var selectionData = selection.datum();
// get the processor details
@@ -670,7 +670,7 @@
// populate the processor settings
$('#processor-id').text(processor['id']);
- $('#processor-type').text(common.substringAfterLast(processor['type'], '.'));
+ $('#processor-type').text(nfCommon.substringAfterLast(processor['type'], '.'));
$('#processor-name').val(processor['name']);
$('#processor-enabled').removeClass('checkbox-unchecked checkbox-checked').addClass(processorEnableStyle);
$('#penalty-duration').val(processor.config['penaltyDuration']);
@@ -736,7 +736,7 @@
});
// show the execution node option if we're cluster or we're currently configured to run on the primary node only
- if (clusterSummary.isClustered() || executionNode === 'PRIMARY') {
+ if (nfClusterSummary.isClustered() || executionNode === 'PRIMARY') {
$('#execution-node-options').show();
} else {
$('#execution-node-options').hide();
@@ -759,7 +759,7 @@
}
// conditionally allow the user to specify the concurrent tasks
- if (common.isDefinedAndNotNull(concurrentTasks)) {
+ if (nfCommon.isDefinedAndNotNull(concurrentTasks)) {
if (processor.supportsParallelProcessing === true) {
concurrentTasks.prop('disabled', false);
} else {
@@ -780,7 +780,7 @@
}
// load the relationship list
- if (!common.isEmpty(processor.relationships)) {
+ if (!nfCommon.isEmpty(processor.relationships)) {
$.each(processor.relationships, function (i, relationship) {
createRelationshipOption(relationship);
});
@@ -809,7 +809,7 @@
$('#processor-configuration').modal('hide');
// inform Angular app values have changed
- angularBridge.digest();
+ nfNgBridge.digest();
});
}
}
@@ -829,7 +829,7 @@
}];
// determine if we should show the advanced button
- if (common.isDefinedAndNotNull(processor.config.customUiUrl) && processor.config.customUiUrl !== '') {
+ if (nfCommon.isDefinedAndNotNull(processor.config.customUiUrl) && processor.config.customUiUrl !== '') {
buttons.push({
buttonText: 'Advanced',
clazz: 'fa fa-cog button-icon',
@@ -845,7 +845,7 @@
$('#processor-configuration').modal('hide');
// show the custom ui
- customUi.showCustomUi(processorResponse, processor.config.customUiUrl, true).done(function () {
+ nfCustomUi.showCustomUi(processorResponse, processor.config.customUiUrl, true).done(function () {
// once the custom ui is closed, reload the processor
nfProcessor.reload(processor.id);
@@ -860,7 +860,7 @@
// determine if changes have been made
if (isSaveRequired()) {
// see if those changes should be saved
- dialog.showYesNoDialog({
+ nfDialog.showYesNoDialog({
headerText: 'Save',
dialogContent: 'Save changes before opening the advanced configuration?',
noHandler: openCustomUi,
@@ -899,7 +899,7 @@
if (processorRelationships.is(':visible') && processorRelationships.get(0).scrollHeight > Math.round(processorRelationships.innerHeight())) {
processorRelationships.css('border-width', '1px');
}
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
}
}
};
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor.js
index 63fb2aff53..4f2569934b 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor.js
@@ -24,8 +24,8 @@
'nf.Common',
'nf.Client',
'nf.CanvasUtils'],
- function ($, d3, common, client, canvasUtils) {
- return (nf.Processor = factory($, d3, common, client, canvasUtils));
+ function ($, d3, nfCommon, nfClient, nfCanvasUtils) {
+ return (nf.Processor = factory($, d3, nfCommon, nfClient, nfCanvasUtils));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.Processor =
@@ -41,7 +41,7 @@
root.nf.Client,
root.nf.CanvasUtils);
}
-}(this, function ($, d3, common, client, canvasUtils) {
+}(this, function ($, d3, nfCommon, nfClient, nfCanvasUtils) {
'use strict';
var nfConnectable;
@@ -103,7 +103,7 @@
'class': 'processor component'
})
.classed('selected', selected)
- .call(canvasUtils.position);
+ .call(nfCanvasUtils.position);
// processor border
processor.append('rect')
@@ -211,7 +211,7 @@
var details = processor.select('g.processor-canvas-details');
// update the component behavior as appropriate
- canvasUtils.editable(processor, nfConnectable, nfDraggable);
+ nfCanvasUtils.editable(processor, nfConnectable, nfDraggable);
// if this processor is visible, render everything
if (processor.classed('visible')) {
@@ -538,7 +538,7 @@
processorName.text(null).selectAll('title').remove();
// apply ellipsis to the processor name as necessary
- canvasUtils.ellipsis(processorName, d.component.name);
+ nfCanvasUtils.ellipsis(processorName, d.component.name);
}).append('title').text(function (d) {
return d.component.name;
});
@@ -552,9 +552,9 @@
processorType.text(null).selectAll('title').remove();
// apply ellipsis to the processor type as necessary
- canvasUtils.ellipsis(processorType, common.substringAfterLast(d.component.type, '.'));
+ nfCanvasUtils.ellipsis(processorType, nfCommon.substringAfterLast(d.component.type, '.'));
}).append('title').text(function (d) {
- return common.substringAfterLast(d.component.type, '.');
+ return nfCommon.substringAfterLast(d.component.type, '.');
});
} else {
// clear the processor name
@@ -607,7 +607,7 @@
// use the specified color if appropriate
if (processorData.permissions.canRead) {
- if (common.isDefinedAndNotNull(processorData.component.style['background-color'])) {
+ if (nfCommon.isDefinedAndNotNull(processorData.component.style['background-color'])) {
var color = processorData.component.style['background-color'];
//update the processor icon container
@@ -636,15 +636,15 @@
}
// use the specified color if appropriate
- if (common.isDefinedAndNotNull(d.component.style['background-color'])) {
+ if (nfCommon.isDefinedAndNotNull(d.component.style['background-color'])) {
color = d.component.style['background-color'];
//special case #ffffff implies default fill
if (color.toLowerCase() === '#ffffff') {
color = nfProcessor.defaultIconColor();
} else {
- color = common.determineContrastColor(
- common.substringAfterLast(
+ color = nfCommon.determineContrastColor(
+ nfCommon.substringAfterLast(
color, '#'));
}
}
@@ -723,7 +723,7 @@
var tip = d3.select('#run-status-tip-' + d.id);
// if there are validation errors generate a tooltip
- if (d.permissions.canRead && !common.isEmpty(d.component.validationErrors)) {
+ if (d.permissions.canRead && !nfCommon.isEmpty(d.component.validationErrors)) {
// create the tip if necessary
if (tip.empty()) {
tip = d3.select('#processor-tooltips').append('div')
@@ -735,7 +735,7 @@
// update the tip
tip.html(function () {
- var list = common.formatUnorderedList(d.component.validationErrors);
+ var list = nfCommon.formatUnorderedList(d.component.validationErrors);
if (list === null || list.length === 0) {
return '';
} else {
@@ -744,7 +744,7 @@
});
// add the tooltip
- canvasUtils.canvasTooltip(tip, d3.select(this));
+ nfCanvasUtils.canvasTooltip(tip, d3.select(this));
} else {
// remove the tip if necessary
if (!tip.empty()) {
@@ -756,13 +756,13 @@
// in count value
updated.select('text.processor-in tspan.count')
.text(function (d) {
- return common.substringBeforeFirst(d.status.aggregateSnapshot.input, ' ');
+ return nfCommon.substringBeforeFirst(d.status.aggregateSnapshot.input, ' ');
});
// in size value
updated.select('text.processor-in tspan.size')
.text(function (d) {
- return ' ' + common.substringAfterFirst(d.status.aggregateSnapshot.input, ' ');
+ return ' ' + nfCommon.substringAfterFirst(d.status.aggregateSnapshot.input, ' ');
});
// read/write value
@@ -774,13 +774,13 @@
// out count value
updated.select('text.processor-out tspan.count')
.text(function (d) {
- return common.substringBeforeFirst(d.status.aggregateSnapshot.output, ' ');
+ return nfCommon.substringBeforeFirst(d.status.aggregateSnapshot.output, ' ');
});
// out size value
updated.select('text.processor-out tspan.size')
.text(function (d) {
- return ' ' + common.substringAfterFirst(d.status.aggregateSnapshot.output, ' ');
+ return ' ' + nfCommon.substringAfterFirst(d.status.aggregateSnapshot.output, ' ');
});
// tasks/time value
@@ -796,17 +796,17 @@
// active thread count
// -------------------
- canvasUtils.activeThreadCount(processor, d);
+ nfCanvasUtils.activeThreadCount(processor, d);
// ---------
// bulletins
// ---------
processor.select('rect.bulletin-background').classed('has-bulletins', function () {
- return !common.isEmpty(d.status.aggregateSnapshot.bulletins);
+ return !nfCommon.isEmpty(d.status.aggregateSnapshot.bulletins);
});
- canvasUtils.bulletins(processor, d, function () {
+ nfCanvasUtils.bulletins(processor, d, function () {
return d3.select('#processor-tooltips');
}, 286);
});
@@ -841,12 +841,17 @@
var nfProcessor = {
/**
* Initializes of the Processor handler.
+ *
+ * @param nfConnectableRef The nfConnectable module.
+ * @param nfDraggableRef The nfDraggable module.
+ * @param nfSelectableRef The nfSelectable module.
+ * @param nfContextMenuRef The nfContextMenu module.
*/
- init: function (connectable, draggable, selectable, contextMenu) {
- nfConnectable = connectable;
- nfDraggable = draggable;
- nfSelectable = selectable;
- nfContextMenu = contextMenu;
+ init: function (nfConnectableRef, nfDraggableRef, nfSelectableRef, nfContextMenuRef) {
+ nfConnectable = nfConnectableRef;
+ nfDraggable = nfDraggableRef;
+ nfSelectable = nfSelectableRef;
+ nfContextMenu = nfContextMenuRef;
processorMap = d3.map();
removedCache = d3.map();
@@ -868,8 +873,8 @@
*/
add: function (processorEntities, options) {
var selectAll = false;
- if (common.isDefinedAndNotNull(options)) {
- selectAll = common.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
+ if (nfCommon.isDefinedAndNotNull(options)) {
+ selectAll = nfCommon.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
}
// get the current time
@@ -890,7 +895,7 @@
$.each(processorEntities, function (_, processorEntity) {
add(processorEntity);
});
- } else if (common.isDefinedAndNotNull(processorEntities)) {
+ } else if (nfCommon.isDefinedAndNotNull(processorEntities)) {
add(processorEntities);
}
@@ -909,16 +914,16 @@
set: function (processorEntities, options) {
var selectAll = false;
var transition = false;
- if (common.isDefinedAndNotNull(options)) {
- selectAll = common.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
- transition = common.isDefinedAndNotNull(options.transition) ? options.transition : transition;
+ if (nfCommon.isDefinedAndNotNull(options)) {
+ selectAll = nfCommon.isDefinedAndNotNull(options.selectAll) ? options.selectAll : selectAll;
+ transition = nfCommon.isDefinedAndNotNull(options.transition) ? options.transition : transition;
}
var set = function (proposedProcessorEntity) {
var currentProcessorEntity = processorMap.get(proposedProcessorEntity.id);
// set the processor if appropriate due to revision and wasn't previously removed
- if (client.isNewerRevision(currentProcessorEntity, proposedProcessorEntity) && !removedCache.has(proposedProcessorEntity.id)) {
+ if (nfClient.isNewerRevision(currentProcessorEntity, proposedProcessorEntity) && !removedCache.has(proposedProcessorEntity.id)) {
processorMap.set(proposedProcessorEntity.id, $.extend({
type: 'Processor',
dimensions: dimensions
@@ -942,14 +947,14 @@
$.each(processorEntities, function (_, processorEntity) {
set(processorEntity);
});
- } else if (common.isDefinedAndNotNull(processorEntities)) {
+ } else if (nfCommon.isDefinedAndNotNull(processorEntities)) {
set(processorEntities);
}
// apply the selection and handle all new processors
var selection = select();
selection.enter().call(renderProcessors, selectAll);
- selection.call(updateProcessors).call(canvasUtils.position, transition);
+ selection.call(updateProcessors).call(nfCanvasUtils.position, transition);
selection.exit().call(removeProcessors);
},
@@ -960,7 +965,7 @@
* @param {string} id
*/
get: function (id) {
- if (common.isUndefined(id)) {
+ if (nfCommon.isUndefined(id)) {
return processorMap.values();
} else {
return processorMap.get(id);
@@ -974,7 +979,7 @@
* @param {string} id Optional
*/
refresh: function (id) {
- if (common.isDefinedAndNotNull(id)) {
+ if (nfCommon.isDefinedAndNotNull(id)) {
d3.select('#id-' + id).call(updateProcessors);
} else {
d3.selectAll('g.processor').call(updateProcessors);
@@ -987,7 +992,7 @@
* @param {string} id The id
*/
position: function (id) {
- d3.select('#id-' + id).call(canvasUtils.position);
+ d3.select('#id-' + id).call(nfCanvasUtils.position);
},
/**
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-queue-listing.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-queue-listing.js
index acf2ca50e1..98632dc742 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-queue-listing.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-queue-listing.js
@@ -32,8 +32,8 @@
'nf.ErrorHandler',
'nf.Storage',
'nf.CanvasUtils'],
- function ($, Slick, common, dialog, shell, angularBridge, clusterSummary, errorHandler, storage, canvasUtils) {
- return (nf.QueueListing = factory($, Slick, common, dialog, shell, angularBridge, clusterSummary, errorHandler, storage, canvasUtils));
+ function ($, Slick, nfCommon, nfDialog, nfShell, nfNgBridge, nfClusterSummary, nfErrorHandler, nfStorage, nfCanvasUtils) {
+ return (nf.QueueListing = factory($, Slick, nfCommon, nfDialog, nfShell, nfNgBridge, nfClusterSummary, nfErrorHandler, nfStorage, nfCanvasUtils));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.QueueListing =
@@ -59,7 +59,7 @@
root.nf.Storage,
root.nf.CanvasUtils);
}
-}(this, function ($, Slick, common, dialog, shell, angularBridge, clusterSummary, errorHandler, storage, canvasUtils) {
+}(this, function ($, Slick, nfCommon, nfDialog, nfShell, nfNgBridge, nfClusterSummary, nfErrorHandler, nfStorage, nfCanvasUtils) {
'use strict';
/**
@@ -96,17 +96,17 @@
var dataUri = $('#flowfile-uri').text() + '/content';
// perform the request once we've received a token
- common.getAccessToken(config.urls.downloadToken).done(function (downloadToken) {
+ nfCommon.getAccessToken(config.urls.downloadToken).done(function (downloadToken) {
var parameters = {};
// conditionally include the ui extension token
- if (!common.isBlank(downloadToken)) {
+ if (!nfCommon.isBlank(downloadToken)) {
parameters['access_token'] = downloadToken;
}
// conditionally include the cluster node id
var clusterNodeId = $('#flowfile-cluster-node-id').text();
- if (!common.isBlank(clusterNodeId)) {
+ if (!nfCommon.isBlank(clusterNodeId)) {
parameters['clusterNodeId'] = clusterNodeId;
}
@@ -117,7 +117,7 @@
window.open(dataUri + '?' + $.param(parameters));
}
}).fail(function () {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Queue Listing',
dialogContent: 'Unable to generate access token for downloading content.'
});
@@ -132,7 +132,7 @@
// generate tokens as necessary
var getAccessTokens = $.Deferred(function (deferred) {
- if (storage.hasItem('jwt')) {
+ if (nfStorage.hasItem('jwt')) {
// generate a token for the ui extension and another for the callback
var uiExtensionToken = $.ajax({
type: 'POST',
@@ -149,7 +149,7 @@
var downloadToken = downloadTokenResult[0];
deferred.resolve(uiExtensionToken, downloadToken);
}).fail(function () {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Queue Listing',
dialogContent: 'Unable to generate access token for viewing content.'
});
@@ -166,12 +166,12 @@
// conditionally include the cluster node id
var clusterNodeId = $('#flowfile-cluster-node-id').text();
- if (!common.isBlank(clusterNodeId)) {
+ if (!nfCommon.isBlank(clusterNodeId)) {
dataUriParameters['clusterNodeId'] = clusterNodeId;
}
// include the download token if applicable
- if (!common.isBlank(downloadToken)) {
+ if (!nfCommon.isBlank(downloadToken)) {
dataUriParameters['access_token'] = downloadToken;
}
@@ -197,7 +197,7 @@
};
// include the download token if applicable
- if (!common.isBlank(uiExtensionToken)) {
+ if (!nfCommon.isBlank(uiExtensionToken)) {
contentViewerParameters['access_token'] = uiExtensionToken;
}
@@ -227,7 +227,7 @@
// update the progress
var label = $('
').text(percentComplete + '%');
- (angularBridge.injector.get('$compile')($('
'))(angularBridge.rootScope)).appendTo(progressBar);
+ (nfNgBridge.injector.get('$compile')($('
'))(nfNgBridge.rootScope)).appendTo(progressBar);
progressBar.append(label);
};
@@ -263,7 +263,7 @@
var reject = cancelled;
// ensure the listing requests are present
- if (common.isDefinedAndNotNull(listingRequest)) {
+ if (nfCommon.isDefinedAndNotNull(listingRequest)) {
$.ajax({
type: 'DELETE',
url: listingRequest.uri,
@@ -271,20 +271,20 @@
});
// use the listing request from when the listing completed
- if (common.isEmpty(listingRequest.flowFileSummaries)) {
+ if (nfCommon.isEmpty(listingRequest.flowFileSummaries)) {
if (cancelled === false) {
reject = true;
// show the dialog
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Queue Listing',
dialogContent: 'The queue has no FlowFiles.'
});
}
} else {
// update the queue size
- $('#total-flowfiles-count').text(common.formatInteger(listingRequest.queueSize.objectCount));
- $('#total-flowfiles-size').text(common.formatDataSize(listingRequest.queueSize.byteCount));
+ $('#total-flowfiles-count').text(nfCommon.formatInteger(listingRequest.queueSize.objectCount));
+ $('#total-flowfiles-size').text(nfCommon.formatDataSize(listingRequest.queueSize.byteCount));
// update the last updated time
$('#queue-listing-last-refreshed').text(listingRequest.lastUpdated);
@@ -356,7 +356,7 @@
}).done(function (response) {
listingRequest = response.listingRequest;
processListingRequest(nextDelay);
- }).fail(completeListingRequest).fail(errorHandler.handleAjaxError);
+ }).fail(completeListingRequest).fail(nfErrorHandler.handleAjaxError);
};
// issue the request to list the flow files
@@ -375,7 +375,7 @@
// process the drop request
listingRequest = response.listingRequest;
processListingRequest(1);
- }).fail(completeListingRequest).fail(errorHandler.handleAjaxError);
+ }).fail(completeListingRequest).fail(nfErrorHandler.handleAjaxError);
}).promise();
};
@@ -389,13 +389,13 @@
var formatFlowFileDetail = function (label, value) {
$('
').append(
$('
').text(label)).append(
- $('
' + common.formatValue(value) + '
').ellipsis()).append(
+ $('
' + nfCommon.formatValue(value) + '
').ellipsis()).append(
$('
')).appendTo('#additional-flowfile-details');
};
// formats the content value
var formatContentValue = function (element, value) {
- if (common.isDefinedAndNotNull(value)) {
+ if (nfCommon.isDefinedAndNotNull(value)) {
element.removeClass('unset').text(value);
} else {
element.addClass('unset').text('No value set');
@@ -403,7 +403,7 @@
};
var params = {};
- if (common.isDefinedAndNotNull(flowFileSummary.clusterNodeId)) {
+ if (nfCommon.isDefinedAndNotNull(flowFileSummary.clusterNodeId)) {
params['clusterNodeId'] = flowFileSummary.clusterNodeId;
}
@@ -419,16 +419,16 @@
$('#flowfile-uri').text(flowFile.uri);
// show the flowfile details dialog
- $('#flowfile-uuid').html(common.formatValue(flowFile.uuid));
- $('#flowfile-filename').html(common.formatValue(flowFile.filename));
- $('#flowfile-queue-position').html(common.formatValue(flowFile.position));
- $('#flowfile-file-size').html(common.formatValue(flowFile.contentClaimFileSize));
- $('#flowfile-queued-duration').text(common.formatDuration(flowFile.queuedDuration));
- $('#flowfile-lineage-duration').text(common.formatDuration(flowFile.lineageDuration));
+ $('#flowfile-uuid').html(nfCommon.formatValue(flowFile.uuid));
+ $('#flowfile-filename').html(nfCommon.formatValue(flowFile.filename));
+ $('#flowfile-queue-position').html(nfCommon.formatValue(flowFile.position));
+ $('#flowfile-file-size').html(nfCommon.formatValue(flowFile.contentClaimFileSize));
+ $('#flowfile-queued-duration').text(nfCommon.formatDuration(flowFile.queuedDuration));
+ $('#flowfile-lineage-duration').text(nfCommon.formatDuration(flowFile.lineageDuration));
$('#flowfile-penalized').text(flowFile.penalized === true ? 'Yes' : 'No');
// conditionally show the cluster node identifier
- if (common.isDefinedAndNotNull(flowFileSummary.clusterNodeId)) {
+ if (nfCommon.isDefinedAndNotNull(flowFileSummary.clusterNodeId)) {
// save the cluster node id
$('#flowfile-cluster-node-id').text(flowFileSummary.clusterNodeId);
@@ -436,7 +436,7 @@
formatFlowFileDetail('Node Address', flowFileSummary.clusterNodeAddress);
}
- if (common.isDefinedAndNotNull(flowFile.contentClaimContainer)) {
+ if (nfCommon.isDefinedAndNotNull(flowFile.contentClaimContainer)) {
// content claim
formatContentValue($('#content-container'), flowFile.contentClaimContainer);
formatContentValue($('#content-section'), flowFile.contentClaimSection);
@@ -447,9 +447,9 @@
// input content file size
var contentSize = $('#content-size');
formatContentValue(contentSize, flowFile.contentClaimFileSize);
- if (common.isDefinedAndNotNull(flowFile.contentClaimFileSize)) {
+ if (nfCommon.isDefinedAndNotNull(flowFile.contentClaimFileSize)) {
// over the default tooltip with the actual byte count
- contentSize.attr('title', common.formatInteger(flowFile.contentClaimFileSizeBytes) + ' bytes');
+ contentSize.attr('title', nfCommon.formatInteger(flowFile.contentClaimFileSizeBytes) + ' bytes');
}
// show the content details
@@ -465,18 +465,18 @@
$.each(flowFile.attributes, function (attributeName, attributeValue) {
// create the attribute record
var attributeRecord = $('
')
- .append($('
' + common.formatValue(attributeName) + '
').ellipsis())
+ .append($('
' + nfCommon.formatValue(attributeName) + '
').ellipsis())
.appendTo(attributesContainer);
// add the current value
attributeRecord
- .append($('
' + common.formatValue(attributeValue) + '
').ellipsis())
+ .append($('
' + nfCommon.formatValue(attributeValue) + '
').ellipsis())
.append('
');
});
// show the dialog
$('#flowfile-details-dialog').modal('show');
- }).fail(errorHandler.handleAjaxError);
+ }).fail(nfErrorHandler.handleAjaxError);
};
var nfQueueListing = {
@@ -496,12 +496,12 @@
// function for formatting data sizes
var dataSizeFormatter = function (row, cell, value, columnDef, dataContext) {
- return common.formatDataSize(value);
+ return nfCommon.formatDataSize(value);
};
// function for formatting durations
var durationFormatter = function (row, cell, value, columnDef, dataContext) {
- return common.formatDuration(value);
+ return nfCommon.formatDuration(value);
};
// function for formatting penalization
@@ -588,7 +588,7 @@
];
// conditionally show the cluster node identifier
- if (clusterSummary.isClustered()) {
+ if (nfClusterSummary.isClustered()) {
queueListingColumns.push({
id: 'clusterNodeAddress',
name: 'Node',
@@ -599,7 +599,7 @@
}
// add an actions column when the user can access provenance
- if (common.canAccessProvenance()) {
+ if (nfCommon.canAccessProvenance()) {
// function for formatting actions
var actionsFormatter = function () {
return '
';
@@ -654,7 +654,7 @@
$('#shell-close-button').click();
// open the provenance page with the specified component
- shell.showPage('provenance?' + $.param({
+ nfShell.showPage('provenance?' + $.param({
flowFileUuid: item.uuid
}));
}
@@ -688,7 +688,7 @@
$('#content-download').on('click', downloadContent);
// only show if content viewer is configured
- if (common.isContentViewConfigured()) {
+ if (nfCommon.isContentViewConfigured()) {
$('#content-view').show();
$('#content-view').on('click', viewContent);
}
@@ -730,7 +730,7 @@
$('#additional-flowfile-details').empty();
},
open: function () {
- common.toggleScrollable($('#' + this.find('.tab-container').attr('id') + '-content').get(0));
+ nfCommon.toggleScrollable($('#' + this.find('.tab-container').attr('id') + '-content').get(0));
}
}
});
@@ -741,7 +741,7 @@
*/
resetTableSize: function () {
var queueListingGrid = $('#queue-listing-table').data('gridInstance');
- if (common.isDefinedAndNotNull(queueListingGrid)) {
+ if (nfCommon.isDefinedAndNotNull(queueListingGrid)) {
queueListingGrid.resizeCanvas();
}
},
@@ -757,7 +757,7 @@
// update the connection name
var connectionName = '';
if (connection.permissions.canRead) {
- connectionName = canvasUtils.formatConnectionName(connection.component);
+ connectionName = nfCanvasUtils.formatConnectionName(connection.component);
}
if (connectionName === '') {
connectionName = 'Connection';
@@ -765,7 +765,7 @@
$('#queue-listing-header-text').text(connectionName);
// show the listing container
- shell.showContent('#queue-listing-container').done(function () {
+ nfShell.showContent('#queue-listing-container').done(function () {
$('#queue-listing-table').removeData('connection');
// clear the table
@@ -779,7 +779,7 @@
// reset stats
$('#displayed-flowfiles, #total-flowfiles-count').text('0');
- $('#total-flowfiles-size').text(common.formatDataSize(0));
+ $('#total-flowfiles-size').text(nfCommon.formatDataSize(0));
});
// adjust the table size
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-configuration.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-configuration.js
index a8d52369fa..06cf866af5 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-configuration.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-configuration.js
@@ -28,8 +28,8 @@
'nf.CanvasUtils',
'nf.ng.Bridge',
'nf.RemoteProcessGroup'],
- function ($, d3, errorHandler, common, dialog, client, canvasUtils, angularBridge, nfRemoteProcessGroup) {
- return (nf.RemoteProcessGroupConfiguration = factory($, d3, errorHandler, common, dialog, client, canvasUtils, angularBridge, nfRemoteProcessGroup));
+ function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup) {
+ return (nf.RemoteProcessGroupConfiguration = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.RemoteProcessGroupConfiguration =
@@ -53,7 +53,7 @@
root.nf.ng.Bridge,
root.nf.RemoteProcessGroup);
}
-}(this, function ($, d3, errorHandler, common, dialog, client, canvasUtils, angularBridge, nfRemoteProcessGroup) {
+}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup) {
'use strict';
return {
@@ -75,7 +75,7 @@
// create the remote process group details
var remoteProcessGroupEntity = {
- 'revision': client.getRevision(remoteProcessGroupData),
+ 'revision': nfClient.getRevision(remoteProcessGroupData),
'component': {
id: remoteProcessGroupId,
communicationsTimeout: $('#remote-process-group-timeout').val(),
@@ -100,7 +100,7 @@
nfRemoteProcessGroup.set(response);
// inform Angular app values have changed
- angularBridge.digest();
+ nfNgBridge.digest();
// close the details panel
$('#remote-process-group-configuration').modal('hide');
@@ -112,15 +112,15 @@
if (errors.length === 1) {
content = $('
').text(errors[0]);
} else {
- content = common.formatUnorderedList(errors);
+ content = nfCommon.formatUnorderedList(errors);
}
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
dialogContent: content,
headerText: 'Remote Process Group Configuration'
});
} else {
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
}
});
}
@@ -176,7 +176,7 @@
*/
showConfiguration: function (selection) {
// if the specified component is a remote process group, load its properties
- if (canvasUtils.isRemoteProcessGroup(selection)) {
+ if (nfCanvasUtils.isRemoteProcessGroup(selection)) {
var selectionData = selection.datum();
// populate the port settings
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-details.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-details.js
index 73c44b552b..7c6d667024 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-details.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-details.js
@@ -22,8 +22,8 @@
define(['jquery',
'nf.Common',
'nf.CanvasUtils'],
- function ($, common, canvasUtils) {
- return (nf.RemoteProcessGroupDetails = factory($, common, canvasUtils));
+ function ($, nfCommon, nfCanvasUtils) {
+ return (nf.RemoteProcessGroupDetails = factory($, nfCommon, nfCanvasUtils));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.RemoteProcessGroupDetails =
@@ -35,7 +35,7 @@
root.nf.Common,
root.nf.CanvasUtils);
}
-}(this, function ($, common, canvasUtils) {
+}(this, function ($, nfCommon, nfCanvasUtils) {
'use strict';
return {
@@ -59,16 +59,16 @@
handler: {
close: function () {
// clear the remote process group details
- common.clearField('read-only-remote-process-group-id');
- common.clearField('read-only-remote-process-group-name');
- common.clearField('read-only-remote-process-group-urls');
- common.clearField('read-only-remote-process-group-timeout');
- common.clearField('read-only-remote-process-group-yield-duration');
- common.clearField('read-only-remote-process-group-transport-protocol');
- common.clearField('read-only-remote-process-group-proxy-host');
- common.clearField('read-only-remote-process-group-proxy-port');
- common.clearField('read-only-remote-process-group-proxy-user');
- common.clearField('read-only-remote-process-group-proxy-password');
+ nfCommon.clearField('read-only-remote-process-group-id');
+ nfCommon.clearField('read-only-remote-process-group-name');
+ nfCommon.clearField('read-only-remote-process-group-urls');
+ nfCommon.clearField('read-only-remote-process-group-timeout');
+ nfCommon.clearField('read-only-remote-process-group-yield-duration');
+ nfCommon.clearField('read-only-remote-process-group-transport-protocol');
+ nfCommon.clearField('read-only-remote-process-group-proxy-host');
+ nfCommon.clearField('read-only-remote-process-group-proxy-port');
+ nfCommon.clearField('read-only-remote-process-group-proxy-user');
+ nfCommon.clearField('read-only-remote-process-group-proxy-password');
}
}
});
@@ -81,20 +81,20 @@
*/
showDetails: function (selection) {
// if the specified component is a remote process group, load its properties
- if (canvasUtils.isRemoteProcessGroup(selection)) {
+ if (nfCanvasUtils.isRemoteProcessGroup(selection)) {
var selectionData = selection.datum();
// populate the port settings
- common.populateField('read-only-remote-process-group-id', selectionData.id);
- common.populateField('read-only-remote-process-group-name', selectionData.component.name);
- common.populateField('read-only-remote-process-group-urls', selectionData.component.targetUris);
- common.populateField('read-only-remote-process-group-timeout', selectionData.component.communicationsTimeout);
- common.populateField('read-only-remote-process-group-yield-duration', selectionData.component.yieldDuration);
- common.populateField('read-only-remote-process-group-transport-protocol', selectionData.component.transportProtocol);
- common.populateField('read-only-remote-process-group-proxy-host', selectionData.component.proxyHost);
- common.populateField('read-only-remote-process-group-proxy-port', selectionData.component.proxyPort);
- common.populateField('read-only-remote-process-group-proxy-user', selectionData.component.proxyUser);
- common.populateField('read-only-remote-process-group-proxy-password', selectionData.component.proxyPassword);
+ nfCommon.populateField('read-only-remote-process-group-id', selectionData.id);
+ nfCommon.populateField('read-only-remote-process-group-name', selectionData.component.name);
+ nfCommon.populateField('read-only-remote-process-group-urls', selectionData.component.targetUris);
+ nfCommon.populateField('read-only-remote-process-group-timeout', selectionData.component.communicationsTimeout);
+ nfCommon.populateField('read-only-remote-process-group-yield-duration', selectionData.component.yieldDuration);
+ nfCommon.populateField('read-only-remote-process-group-transport-protocol', selectionData.component.transportProtocol);
+ nfCommon.populateField('read-only-remote-process-group-proxy-host', selectionData.component.proxyHost);
+ nfCommon.populateField('read-only-remote-process-group-proxy-port', selectionData.component.proxyPort);
+ nfCommon.populateField('read-only-remote-process-group-proxy-user', selectionData.component.proxyUser);
+ nfCommon.populateField('read-only-remote-process-group-proxy-password', selectionData.component.proxyPassword);
// show the details
$('#remote-process-group-details').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-remote-process-group-ports.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-ports.js
index f5f44ddb27..2a7f28224d 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-ports.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-ports.js
@@ -28,8 +28,8 @@
'nf.CanvasUtils',
'nf.ng.Bridge',
'nf.RemoteProcessGroup'],
- function ($, d3, errorHandler, common, dialog, client, canvasUtils, angularBridge, nfRemoteProcessGroup) {
- return (nf.RemoteProcessGroupPorts = factory($, d3, errorHandler, common, dialog, client, canvasUtils, angularBridge, nfRemoteProcessGroup));
+ function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup) {
+ return (nf.RemoteProcessGroupPorts = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.RemoteProcessGroupPorts =
@@ -53,7 +53,7 @@
root.nf.ng.Bridge,
root.nf.RemoteProcessGroup);
}
-}(this, function ($, d3, errorHandler, common, dialog, client, canvasUtils, angularBridge, nfRemoteProcessGroup) {
+}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfClient, nfCanvasUtils, nfNgBridge, nfRemoteProcessGroup) {
'use strict';
/**
@@ -82,7 +82,7 @@
// create the remote process group details
var remoteProcessGroupPortEntity = {
- 'revision': client.getRevision(remoteProcessGroupData),
+ 'revision': nfClient.getRevision(remoteProcessGroupData),
'remoteProcessGroupPort': {
id: remotePortId,
groupId: remoteProcessGroupId,
@@ -129,22 +129,22 @@
if (errors.length === 1) {
content = $('
').text(errors[0]);
} else {
- content = common.formatUnorderedList(errors);
+ content = nfCommon.formatUnorderedList(errors);
}
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
dialogContent: content,
headerText: 'Remote Process Group Ports'
});
} else {
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
}
}).always(function () {
// close the dialog
$('#remote-port-configuration').modal('hide');
});
} else {
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Remote Process Group Ports',
dialogContent: 'Concurrent tasks must be an integer value.'
});
@@ -202,7 +202,7 @@
var remoteProcessGroupData = remoteProcessGroup.datum();
// if can modify, the over status of this node may have changed
- if (canvasUtils.canModify(remoteProcessGroup)) {
+ if (nfCanvasUtils.canModify(remoteProcessGroup)) {
// reload the remote process group
nfRemoteProcessGroup.reload(remoteProcessGroupData.id);
}
@@ -221,8 +221,8 @@
// clear any tooltips
var dialog = $('#remote-process-group-ports');
- common.cleanUpTooltips(dialog, 'div.remote-port-removed');
- common.cleanUpTooltips(dialog, 'div.concurrent-tasks-info');
+ nfCommon.cleanUpTooltips(dialog, 'div.remote-port-removed');
+ nfCommon.cleanUpTooltips(dialog, 'div.concurrent-tasks-info');
// clear the input and output ports
$('#remote-process-group-input-ports-container').empty();
@@ -240,7 +240,7 @@
* @argument {string} portType The type of port
*/
var createPortOption = function (container, port, portType) {
- var portId = common.escapeHtml(port.id);
+ var portId = nfCommon.escapeHtml(port.id);
var portContainer = $('
').appendTo(container);
var portContainerEditContainer = $('
').appendTo(portContainer);
var portContainerDetailsContainer = $('
').appendTo(portContainer);
@@ -250,25 +250,25 @@
var remoteProcessGroup = d3.select('#id-' + remoteProcessGroupId);
// if can modify, support updating the remote group port
- if (canvasUtils.canModify(remoteProcessGroup)) {
+ if (nfCanvasUtils.canModify(remoteProcessGroup)) {
// show the enabled transmission switch
var transmissionSwitch;
if (port.connected === true) {
if (port.transmitting === true) {
- transmissionSwitch = (angularBridge.injector.get('$compile')($('
'))(angularBridge.rootScope)).appendTo(portContainerEditContainer);
+ transmissionSwitch = (nfNgBridge.injector.get('$compile')($('
'))(nfNgBridge.rootScope)).appendTo(portContainerEditContainer);
transmissionSwitch.click();
} else {
if (port.exists === true) {
- transmissionSwitch = (angularBridge.injector.get('$compile')($('
'))(angularBridge.rootScope)).appendTo(portContainerEditContainer);
+ transmissionSwitch = (nfNgBridge.injector.get('$compile')($('
'))(nfNgBridge.rootScope)).appendTo(portContainerEditContainer);
} else {
- (angularBridge.injector.get('$compile')($('
'))(angularBridge.rootScope)).appendTo(portContainerEditContainer);
+ (nfNgBridge.injector.get('$compile')($('
'))(nfNgBridge.rootScope)).appendTo(portContainerEditContainer);
}
}
} else {
if (port.transmitting === true) {
- (angularBridge.injector.get('$compile')($('
'))(angularBridge.rootScope)).appendTo(portContainerEditContainer);
+ (nfNgBridge.injector.get('$compile')($('
'))(nfNgBridge.rootScope)).appendTo(portContainerEditContainer);
} else {
- (angularBridge.injector.get('$compile')($('
'))(angularBridge.rootScope)).appendTo(portContainerEditContainer);
+ (nfNgBridge.injector.get('$compile')($('
'))(nfNgBridge.rootScope)).appendTo(portContainerEditContainer);
}
}
@@ -292,14 +292,14 @@
}
} else if (port.exists === false) {
$('
').appendTo(portContainerEditContainer).qtip($.extend({},
- common.config.tooltipConfig,
+ nfCommon.config.tooltipConfig,
{
content: 'This port has been removed.'
}));
}
// only allow modifications to transmission when the swtich is defined
- if (common.isDefinedAndNotNull(transmissionSwitch)) {
+ if (nfCommon.isDefinedAndNotNull(transmissionSwitch)) {
// create toggle for changing transmission state
transmissionSwitch.click(function () {
// get the component being edited
@@ -314,7 +314,7 @@
// create the remote process group details
var remoteProcessGroupPortEntity = {
- 'revision': client.getRevision(remoteProcessGroupData),
+ 'revision': nfClient.getRevision(remoteProcessGroupData),
'remoteProcessGroupPort': {
id: port.id,
groupId: remoteProcessGroupId,
@@ -349,7 +349,7 @@
transmissionSwitch.removeClass('enabled-active-transmission enabled-inactive-transmission').addClass('disabled-inactive-transmission').off('click');
// hide the edit button
- if (common.isDefinedAndNotNull(editRemotePort)) {
+ if (nfCommon.isDefinedAndNotNull(editRemotePort)) {
editRemotePort.hide();
}
} else {
@@ -359,7 +359,7 @@
transmissionSwitch.removeClass('enabled-active-transmission enabled-inactive-transmission').addClass('enabled-active-transmission');
// hide the edit button
- if (common.isDefinedAndNotNull(editRemotePort)) {
+ if (nfCommon.isDefinedAndNotNull(editRemotePort)) {
editRemotePort.hide();
}
} else {
@@ -367,7 +367,7 @@
transmissionSwitch.removeClass('enabled-active-transmission enabled-inactive-transmission').addClass('enabled-inactive-transmission');
// show the edit button
- if (common.isDefinedAndNotNull(editRemotePort)) {
+ if (nfCommon.isDefinedAndNotNull(editRemotePort)) {
editRemotePort.show();
}
}
@@ -380,15 +380,15 @@
if (errors.length === 1) {
content = $('
').text(errors[0]);
} else {
- content = common.formatUnorderedList(errors);
+ content = nfCommon.formatUnorderedList(errors);
}
- dialog.showOkDialog({
+ nfDialog.showOkDialog({
headerText: 'Remote Process Group Ports',
dialogContent: content
});
} else {
- errorHandler.handleAjaxError(xhr, status, error);
+ nfErrorHandler.handleAjaxError(xhr, status, error);
}
});
});
@@ -396,9 +396,9 @@
} else {
// show the disabled transmission switch
if (port.transmitting === true) {
- (angularBridge.injector.get('$compile')($('
'))(angularBridge.rootScope)).appendTo(portContainerEditContainer);
+ (nfNgBridge.injector.get('$compile')($('
'))(nfNgBridge.rootScope)).appendTo(portContainerEditContainer);
} else {
- (angularBridge.injector.get('$compile')($('
'))(angularBridge.rootScope)).appendTo(portContainerEditContainer);
+ (nfNgBridge.injector.get('$compile')($('
'))(nfNgBridge.rootScope)).appendTo(portContainerEditContainer);
}
}
@@ -410,7 +410,7 @@
$('
').appendTo(portContainerDetailsContainer);
// add the comments for this port
- if (common.isBlank(port.comments)) {
+ if (nfCommon.isBlank(port.comments)) {
$('
No description specified.
').appendTo(portContainerDetailsContainer);
} else {
$('
').text(port.comments).appendTo(portContainerDetailsContainer);
@@ -431,7 +431,7 @@
'
' +
'
' +
'').append(concurrentTasks).appendTo(concurrentTasksContainer).find('div.concurrent-tasks-info').qtip($.extend({},
- common.config.tooltipConfig,
+ nfCommon.config.tooltipConfig,
{
content: 'The number of tasks that should be concurrently scheduled for this port.'
}));
@@ -461,7 +461,7 @@
portContainer.find('.ellipsis').ellipsis();
// inform Angular app values have changed
- angularBridge.digest();
+ nfNgBridge.digest();
};
/**
@@ -506,7 +506,7 @@
*/
showPorts: function (selection) {
// if the specified component is a remote process group, load its properties
- if (canvasUtils.isRemoteProcessGroup(selection)) {
+ if (nfCanvasUtils.isRemoteProcessGroup(selection)) {
var selectionData = selection.datum();
// load the properties for the specified component
@@ -527,7 +527,7 @@
// get the contents
var remoteProcessGroupContents = remoteProcessGroup.contents;
- if (common.isDefinedAndNotNull(remoteProcessGroupContents)) {
+ if (nfCommon.isDefinedAndNotNull(remoteProcessGroupContents)) {
var connectedInputPorts = [];
var disconnectedInputPorts = [];
@@ -551,7 +551,7 @@
createPortOption(inputPortContainer, inputPort, 'input');
});
- if (common.isEmpty(connectedInputPorts) && common.isEmpty(disconnectedInputPorts)) {
+ if (nfCommon.isEmpty(connectedInputPorts) && nfCommon.isEmpty(disconnectedInputPorts)) {
$('