You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by mc...@apache.org on 2017/01/20 21:19:43 UTC
[10/12] nifi git commit: [NIFI-3359] Modularize all of nifi-web-ui
except canvas directory - Removing shell.jsp from summary.jsp. - This closes
#1428
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/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
----------------------------------------------------------------------
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 3f9c5ea..903cea9 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
@@ -42,7 +42,7 @@ nf.ng.Canvas.HeaderCtrl = function (serviceProvider, toolboxCtrl, globalMenuCtrl
* Initialize the login controller.
*/
init: function () {
- var self = this;
+ var loginCtrl = this;
// if the user is not anonymous or accessing via http
if ($('#current-user').text() !== nf.Common.ANONYMOUS_USER_TEXT || location.protocol === 'http:') {
@@ -62,8 +62,8 @@ nf.ng.Canvas.HeaderCtrl = function (serviceProvider, toolboxCtrl, globalMenuCtrl
});
$.when(loginXhr).done(function (loginResult) {
- self.supportsLogin = loginResult.config.supportsLogin;
- }).fail(nf.Common.handleAjaxError);
+ loginCtrl.supportsLogin = loginResult.config.supportsLogin;
+ }).fail(nf.ErrorHandler.handleAjaxError);
},
/**
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/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
----------------------------------------------------------------------
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 b35f209..334a3fe 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
@@ -107,7 +107,7 @@ nf.ng.FunnelComponent = function (serviceProvider) {
// update the birdseye
nf.Birdseye.refresh();
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
}
}
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-group-component.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-group-component.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-group-component.js
index 01a1194..f654560 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
@@ -62,7 +62,7 @@ nf.ng.GroupComponent = function (serviceProvider) {
// update the birdseye
nf.Birdseye.refresh();
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
};
function GroupComponent() {
@@ -178,14 +178,14 @@ nf.ng.GroupComponent = function (serviceProvider) {
* @argument {object} pt The point that the group was dropped.
*/
promptForGroupName: function (pt) {
- var self = this;
+ var groupComponent = this;
return $.Deferred(function (deferred) {
var addGroup = function () {
// get the name of the group and clear the textfield
var groupName = $('#new-process-group-name').val();
// hide the dialog
- self.modal.hide();
+ groupComponent.modal.hide();
// create the group and resolve the deferred accordingly
createGroup(groupName, pt).done(function (response) {
@@ -195,7 +195,7 @@ nf.ng.GroupComponent = function (serviceProvider) {
});
};
- self.modal.update('setButtonModel', [{
+ groupComponent.modal.update('setButtonModel', [{
buttonText: 'Add',
color: {
base: '#728E9B',
@@ -219,13 +219,13 @@ nf.ng.GroupComponent = function (serviceProvider) {
deferred.reject();
// close the dialog
- self.modal.hide();
+ groupComponent.modal.hide();
}
}
}]);
// show the dialog
- self.modal.show();
+ groupComponent.modal.show();
// set up the focus and key handlers
$('#new-process-group-name').focus().off('keyup').on('keyup', function (e) {
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/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
----------------------------------------------------------------------
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 6ec1d6c..64d310e 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
@@ -62,7 +62,7 @@ nf.ng.InputPortComponent = function (serviceProvider) {
// update the birdseye
nf.Birdseye.refresh();
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
};
function InputPortComponent() {
@@ -178,13 +178,13 @@ nf.ng.InputPortComponent = function (serviceProvider) {
* @argument {object} pt The point that the input port was dropped.
*/
promptForInputPortName: function (pt) {
- var self = this;
+ var inputPortComponent = this;
var addInputPort = function () {
// get the name of the input port and clear the textfield
var portName = $('#new-port-name').val();
// hide the dialog
- self.modal.hide();
+ inputPortComponent.modal.hide();
// create the input port
createInputPort(portName, pt);
@@ -210,7 +210,7 @@ nf.ng.InputPortComponent = function (serviceProvider) {
},
handler: {
click: function () {
- self.modal.hide();
+ inputPortComponent.modal.hide();
}
}
}]);
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/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
----------------------------------------------------------------------
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 a0fabb3..a77739e 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
@@ -109,7 +109,7 @@ nf.ng.LabelComponent = function (serviceProvider) {
// update the birdseye
nf.Birdseye.refresh();
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
}
}
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/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
----------------------------------------------------------------------
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 7c37bfa..d856691 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
@@ -62,7 +62,7 @@ nf.ng.OutputPortComponent = function (serviceProvider) {
// update the birdseye
nf.Birdseye.refresh();
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
};
function OutputPortComponent() {
@@ -169,13 +169,13 @@ nf.ng.OutputPortComponent = function (serviceProvider) {
* @argument {object} pt The point that the output port was dropped.
*/
promptForOutputPortName: function (pt) {
- var self = this;
+ var outputPortComponent = this;
var addOutputPort = function () {
// get the name of the output port and clear the textfield
var portName = $('#new-port-name').val();
// hide the dialog
- self.modal.hide();
+ outputPortComponent.modal.hide();
// create the output port
createOutputPort(portName, pt);
@@ -201,7 +201,7 @@ nf.ng.OutputPortComponent = function (serviceProvider) {
},
handler: {
click: function () {
- self.modal.hide();
+ outputPortComponent.modal.hide();
}
}
}]);
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/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
----------------------------------------------------------------------
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 21e76f5..ad011ca 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
@@ -235,7 +235,7 @@ nf.ng.ProcessorComponent = function (serviceProvider) {
// update the birdseye
nf.Birdseye.refresh();
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
};
/**
@@ -269,9 +269,23 @@ nf.ng.ProcessorComponent = function (serviceProvider) {
init: function () {
// initialize the processor type table
var processorTypesColumns = [
- {id: 'type', name: 'Type', field: 'label', formatter: nf.Common.typeFormatter, sortable: true, resizable: true},
- {id: 'tags', name: 'Tags', field: 'tags', sortable: true, resizable: true}
+ {
+ id: 'type',
+ name: 'Type',
+ field: 'label',
+ formatter: nf.Common.typeFormatter,
+ sortable: true,
+ resizable: true
+ },
+ {
+ id: 'tags',
+ name: 'Tags',
+ field: 'tags',
+ sortable: true,
+ resizable: true
+ }
];
+
var processorTypesOptions = {
forceFitColumns: true,
enableTextSelectionOnCells: true,
@@ -426,7 +440,7 @@ nf.ng.ProcessorComponent = function (serviceProvider) {
select: applyFilter,
remove: applyFilter
});
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
}
},
@@ -443,8 +457,6 @@ nf.ng.ProcessorComponent = function (serviceProvider) {
* Initialize the modal.
*/
init: function () {
- var self = this;
-
this.filter.init();
// configure the new processor dialog
@@ -539,7 +551,7 @@ nf.ng.ProcessorComponent = function (serviceProvider) {
* @argument {object} pt The point that the processor was dropped
*/
promptForProcessorType: function (pt) {
- var self = this;
+ var processorComponent = this;
// handles adding the selected processor at the specified point
var addProcessor = function () {
@@ -559,7 +571,7 @@ nf.ng.ProcessorComponent = function (serviceProvider) {
}
// hide the dialog
- self.modal.hide();
+ processorComponent.modal.hide();
};
// get the grid reference
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/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
----------------------------------------------------------------------
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 90e67b6..8985f16 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
@@ -88,7 +88,7 @@ nf.ng.RemoteProcessGroupComponent = function (serviceProvider) {
headerText: 'Configuration Error'
});
} else {
- nf.Common.handleAjaxError(xhr, status, error);
+ nf.ErrorHandler.handleAjaxError(xhr, status, error);
}
});
};
@@ -230,7 +230,7 @@ nf.ng.RemoteProcessGroupComponent = function (serviceProvider) {
* @argument {object} pt The point that the remote group was dropped.
*/
promptForRemoteProcessGroupUri: function (pt) {
- var self = this;
+ var remoteProcessGroupComponent = this;
var addRemoteProcessGroup = function () {
// create the remote process group
createRemoteProcessGroup(pt);
@@ -256,7 +256,7 @@ nf.ng.RemoteProcessGroupComponent = function (serviceProvider) {
},
handler: {
click: function () {
- self.modal.hide();
+ remoteProcessGroupComponent.modal.hide();
}
}
}]);
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/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
----------------------------------------------------------------------
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 c671a1c..a4945f6 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
@@ -51,7 +51,7 @@ nf.ng.TemplateComponent = function (serviceProvider) {
// update the birdseye
nf.Birdseye.refresh();
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
};
function TemplateComponent() {
@@ -162,7 +162,7 @@ nf.ng.TemplateComponent = function (serviceProvider) {
* @argument {object} pt The point that the template was dropped.
*/
promptForTemplate: function (pt) {
- var self = this;
+ var templateComponent = this;
$.ajax({
type: 'GET',
url: serviceProvider.headerCtrl.toolboxCtrl.config.urls.api + '/flow/templates',
@@ -197,7 +197,7 @@ nf.ng.TemplateComponent = function (serviceProvider) {
});
// update the button model
- self.modal.update('setButtonModel', [{
+ templateComponent.modal.update('setButtonModel', [{
buttonText: 'Add',
color: {
base: '#728E9B',
@@ -211,7 +211,7 @@ nf.ng.TemplateComponent = function (serviceProvider) {
var templateId = selectedOption.value;
// hide the dialog
- self.modal.hide();
+ templateComponent.modal.hide();
// instantiate the specified template
createTemplate(templateId, pt);
@@ -227,13 +227,13 @@ nf.ng.TemplateComponent = function (serviceProvider) {
},
handler: {
click: function () {
- self.modal.hide();
+ templateComponent.modal.hide();
}
}
}]);
// show the dialog
- self.modal.show();
+ templateComponent.modal.show();
} else {
nf.Dialog.showOkDialog({
headerText: 'Instantiate Template',
@@ -241,7 +241,7 @@ nf.ng.TemplateComponent = function (serviceProvider) {
});
}
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
}
}
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
index b27e291..52786b6 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
@@ -827,7 +827,7 @@ nf.Actions = (function () {
nf.Birdseye.refresh();
// inform Angular app values have changed
nf.ng.Bridge.digest();
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
} else {
// create a snippet for the specified component and link to the data flow
var snippet = nf.Snippet.marshal(selection);
@@ -877,8 +877,8 @@ nf.Actions = (function () {
// inform Angular app values have changed
nf.ng.Bridge.digest();
- }).fail(nf.Common.handleAjaxError);
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
}
}
},
@@ -1033,7 +1033,7 @@ nf.Actions = (function () {
processDropRequest(nextDelay);
}).fail(function (xhr, status, error) {
if (xhr.status === 403) {
- nf.Common.handleAjaxError(xhr, status, error);
+ nf.ErrorHandler.handleAjaxError(xhr, status, error);
} else {
completeDropRequest()
}
@@ -1058,7 +1058,7 @@ nf.Actions = (function () {
processDropRequest(1);
}).fail(function (xhr, status, error) {
if (xhr.status === 403) {
- nf.Common.handleAjaxError(xhr, status, error);
+ nf.ErrorHandler.handleAjaxError(xhr, status, error);
} else {
completeDropRequest()
}
@@ -1417,8 +1417,8 @@ nf.Actions = (function () {
// clear the template dialog fields
$('#new-template-name').val('');
$('#new-template-description').val('');
- }).fail(nf.Common.handleAjaxError);
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
}
}
}, {
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-error-handler.js
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..88dc4ec
--- /dev/null
+++ 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
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* global nf, define, module, require, exports */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ define(['nf.ErrorHandler', 'nf.Common', 'nf.Canvas', 'nf.ContextMenu'], function (ajaxErrorHandler, common, canvas, contextMenu) {
+ return (nf.ErrorHandler = factory(ajaxErrorHandler, common, canvas, contextMenu));
+ });
+ } else if (typeof exports === 'object' && typeof module === 'object') {
+ module.exports = (nf.ErrorHandler = factory(require('nf.ErrorHandler'), require('nf.Common'), require('nf.Canvas'), require('nf.ContextMenu')));
+ } else {
+ nf.ErrorHandler = factory(root.nf.ErrorHandler, root.nf.Common, root.nf.Canvas, root.nf.ContextMenu);
+ }
+}(this, function (ajaxErrorHandler, common, canvas, contextMenu) {
+ 'use strict';
+
+ return {
+ /**
+ * Method for handling ajax errors. This also closes the canvas.
+ *
+ * @argument {object} xhr The XmlHttpRequest
+ * @argument {string} status The status of the request
+ * @argument {string} error The error
+ */
+ handleAjaxError: function (xhr, status, error) {
+ ajaxErrorHandler.handleAjaxError(xhr, status, error);
+ common.showLogoutLink();
+
+ // hide the splash screen if required
+ if ($('#splash').is(':visible')) {
+ canvas.hideSplash();
+ }
+
+ // hide the context menu
+ contextMenu.hide();
+
+ // shut off the auto refresh
+ canvas.stopPolling();
+
+ // allow page refresh with ctrl-r
+ canvas.disableRefreshHotKey();
+ }
+ };
+}));
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
----------------------------------------------------------------------
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 c118ece..be4dde8 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
@@ -117,8 +117,6 @@ nf.Canvas = (function () {
var groupName = null;
var permissions = null;
var parentGroupId = null;
- var clustered = false;
- var connectedToCluster = false;
var configurableAuthorizer = false;
var svg = null;
var canvas = null;
@@ -134,9 +132,7 @@ nf.Canvas = (function () {
kerberos: '../nifi-api/access/kerberos',
revision: '../nifi-api/flow/revision',
banners: '../nifi-api/flow/banners',
- flowConfig: '../nifi-api/flow/config',
- clusterSummary: '../nifi-api/flow/cluster/summary',
- cluster: '../nifi-api/controller/cluster'
+ flowConfig: '../nifi-api/flow/config'
}
};
@@ -659,7 +655,7 @@ nf.Canvas = (function () {
// update the graph dimensions
updateGraphSize();
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
};
/**
@@ -720,7 +716,7 @@ nf.Canvas = (function () {
// update the birdseye
nf.Birdseye.refresh();
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
};
/**
@@ -740,19 +736,6 @@ nf.Canvas = (function () {
});
};
- /**
- * Loads the flow configuration and updated the cluster state.
- *
- * @returns xhr
- */
- var loadClusterSummary = function () {
- return $.ajax({
- type: 'GET',
- url: config.urls.clusterSummary,
- dataType: 'json'
- });
- };
-
return {
CANVAS_OFFSET: 0,
@@ -800,15 +783,11 @@ nf.Canvas = (function () {
}).done(function (response) {
nf.ng.Bridge.injector.get('flowStatusCtrl').updateBulletins(response);
});
- var clusterSummary = loadClusterSummary().done(function (response) {
+ var clusterSummary = nf.ClusterSummary.loadClusterSummary().done(function (response) {
var clusterSummary = response.clusterSummary;
// update the cluster summary
nf.ng.Bridge.injector.get('flowStatusCtrl').updateClusterSummary(clusterSummary);
-
- // update the clustered flag
- clustered = clusterSummary.clustered;
- connectedToCluster = clusterSummary.connectedToCluster;
});
// wait for all requests to complete
@@ -825,26 +804,6 @@ nf.Canvas = (function () {
},
/**
- * Shows a message when disconnected from the cluster.
- */
- showDisconnectedFromClusterMessage: function () {
- nf.Dialog.showOkDialog({
- headerText: 'Cluster Connection',
- dialogContent: 'This node is currently not connected to the cluster. Any modifications to the data flow made here will not replicate across the cluster.'
- });
- },
-
- /**
- * Shows a message when connected to the cluster.
- */
- showConnectedToClusterMessage: function () {
- nf.Dialog.showOkDialog({
- headerText: 'Cluster Connection',
- dialogContent: 'This node just joined the cluster. Any modifications to the data flow made here will replicate across the cluster.'
- });
- },
-
- /**
* Initialize NiFi.
*/
init: function () {
@@ -909,13 +868,9 @@ nf.Canvas = (function () {
dataType: 'json'
});
- // get the initial cluster summary
- var clusterSummary = loadClusterSummary();
-
// ensure the config requests are loaded
- $.when(configXhr, clusterSummary, userXhr, clientXhr).done(function (configResult, clusterSummaryResult) {
+ $.when(configXhr, nf.ClusterSummary.loadClusterSummary(), userXhr, clientXhr).done(function (configResult) {
var configResponse = configResult[0];
- var clusterSummaryResponse = clusterSummaryResult[0];
// calculate the canvas offset
var canvasContainer = $('#canvas-container');
@@ -923,20 +878,12 @@ nf.Canvas = (function () {
// get the config details
var configDetails = configResponse.flowConfiguration;
- var clusterSummary = clusterSummaryResponse.clusterSummary;
// show disconnected message on load if necessary
- if (clusterSummary.clustered && !clusterSummary.connectedToCluster) {
- nf.Canvas.showDisconnectedFromClusterMessage();
+ if (nf.ClusterSummary.isClustered() && !nf.ClusterSummary.isConnectedToCluster()) {
+ nf.Dialog.showDisconnectedFromClusterMessage();
}
- // establish the initial cluster state
- clustered = clusterSummary.clustered;
- connectedToCluster = clusterSummary.connectedToCluster;
-
- // update the cluster summary
- nf.ng.Bridge.injector.get('flowStatusCtrl').updateClusterSummary(clusterSummary);
-
// get the auto refresh interval
var autoRefreshIntervalSeconds = parseInt(configDetails.autoRefreshIntervalSeconds, 10);
@@ -978,7 +925,7 @@ nf.Canvas = (function () {
nf.RemoteProcessGroupPorts.init();
nf.PortConfiguration.init();
nf.LabelConfiguration.init();
- nf.ProcessorDetails.init();
+ nf.ProcessorDetails.init(true);
nf.PortDetails.init();
nf.ConnectionDetails.init();
nf.RemoteProcessGroupDetails.init();
@@ -996,27 +943,9 @@ nf.Canvas = (function () {
// hide the splash screen
nf.Canvas.hideSplash();
- }).fail(nf.Common.handleAjaxError);
- }).fail(nf.Common.handleAjaxError);
- }).fail(nf.Common.handleAjaxError);
- },
-
- /**
- * Return whether this instance of NiFi is clustered.
- *
- * @returns {Boolean}
- */
- isClustered: function () {
- return clustered === true;
- },
-
- /**
- * Return whether this instance is connected to a cluster.
- *
- * @returns {boolean}
- */
- isConnectedToCluster: function () {
- return connectedToCluster === true;
+ }).fail(nf.ErrorHandler.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
},
/**
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-component-state.js
----------------------------------------------------------------------
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 c71981e..0d5c198 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
@@ -253,7 +253,7 @@ nf.ComponentState = (function () {
// reload the table with no state
loadComponentState()
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
} else {
nf.Dialog.showOkDialog({
headerText: 'Component State',
@@ -265,12 +265,24 @@ nf.ComponentState = (function () {
// initialize the queue listing table
var componentStateColumns = [
- {id: 'key', field: 'key', name: 'Key', sortable: true, resizable: true},
- {id: 'value', field: 'value', name: 'Value', sortable: true, resizable: true}
+ {
+ id: 'key',
+ field: 'key',
+ name: 'Key',
+ sortable: true,
+ resizable: true
+ },
+ {
+ id: 'value',
+ field: 'value',
+ name: 'Value',
+ sortable: true,
+ resizable: true
+ }
];
// conditionally show the cluster node identifier
- if (nf.Canvas.isClustered()) {
+ if (nf.ClusterSummary.isClustered()) {
componentStateColumns.push({
id: 'scope',
field: 'scope',
@@ -378,7 +390,7 @@ nf.ComponentState = (function () {
// reset the grid size
var componentStateGrid = componentStateTable.data('gridInstance');
componentStateGrid.resizeCanvas();
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
}
};
}());
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
----------------------------------------------------------------------
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 74fc03d..df943fb 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
@@ -340,7 +340,7 @@ nf.ConnectionConfiguration = (function () {
}
}).fail(function (xhr, status, error) {
// handle the error
- nf.Common.handleAjaxError(xhr, status, error);
+ nf.ErrorHandler.handleAjaxError(xhr, status, error);
deferred.reject();
});
@@ -416,7 +416,7 @@ nf.ConnectionConfiguration = (function () {
}
}).fail(function (xhr, status, error) {
// handle the error
- nf.Common.handleAjaxError(xhr, status, error);
+ nf.ErrorHandler.handleAjaxError(xhr, status, error);
deferred.reject();
});
@@ -565,7 +565,7 @@ nf.ConnectionConfiguration = (function () {
}
}).fail(function (xhr, status, error) {
// handle the error
- nf.Common.handleAjaxError(xhr, status, error);
+ nf.ErrorHandler.handleAjaxError(xhr, status, error);
deferred.reject();
});
@@ -641,7 +641,7 @@ nf.ConnectionConfiguration = (function () {
}
}).fail(function (xhr, status, error) {
// handle the error
- nf.Common.handleAjaxError(xhr, status, error);
+ nf.ErrorHandler.handleAjaxError(xhr, status, error);
deferred.reject();
});
@@ -926,7 +926,7 @@ nf.ConnectionConfiguration = (function () {
nf.Birdseye.refresh();
}).fail(function (xhr, status, error) {
// handle the error
- nf.Common.handleAjaxError(xhr, status, error);
+ nf.ErrorHandler.handleAjaxError(xhr, status, error);
});
}
};
@@ -1000,7 +1000,7 @@ nf.ConnectionConfiguration = (function () {
dialogContent: nf.Common.escapeHtml(xhr.responseText),
});
} else {
- nf.Common.handleAjaxError(xhr, status, error);
+ nf.ErrorHandler.handleAjaxError(xhr, status, error);
}
});
} else {
@@ -1179,7 +1179,7 @@ nf.ConnectionConfiguration = (function () {
opacity: 0.6
});
$('#prioritizer-available, #prioritizer-selected').disableSelection();
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
},
/**
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js
----------------------------------------------------------------------
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 a6bbef7..e6252cb 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
@@ -1483,7 +1483,7 @@ nf.Connection = (function () {
dialogContent: nf.Common.escapeHtml(xhr.responseText)
});
} else {
- nf.Common.handleAjaxError(xhr, status, error);
+ nf.ErrorHandler.handleAjaxError(xhr, status, error);
}
});
};
@@ -1706,7 +1706,7 @@ nf.Connection = (function () {
'updateLabel': false
});
} else {
- nf.Common.handleAjaxError(xhr, status, error);
+ nf.ErrorHandler.handleAjaxError(xhr, status, error);
}
});
}
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
----------------------------------------------------------------------
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 aee3622..444fe52 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
@@ -52,7 +52,7 @@ nf.ControllerService = (function () {
headerText: 'Controller Service'
});
} else {
- nf.Common.handleAjaxError(xhr, status, error);
+ nf.ErrorHandler.handleAjaxError(xhr, status, error);
}
};
@@ -140,7 +140,7 @@ nf.ControllerService = (function () {
dataType: 'json'
}).done(function (response) {
renderControllerService(serviceTable, response);
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
};
/**
@@ -583,7 +583,7 @@ nf.ControllerService = (function () {
sourceId: ids
},
dataType: 'json'
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
};
/**
@@ -612,7 +612,7 @@ nf.ControllerService = (function () {
contentType: 'application/json'
}).done(function (response) {
renderControllerService(serviceTable, response);
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
// wait until the polling of each service finished
return $.Deferred(function (deferred) {
@@ -730,7 +730,7 @@ nf.ControllerService = (function () {
data: JSON.stringify(referenceEntity),
dataType: 'json',
contentType: 'application/json'
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
// Note: updated revisions will be retrieved after updateReferencingSchedulableComponents is invoked
@@ -810,7 +810,7 @@ nf.ControllerService = (function () {
conditionMet(serviceResponse.component, bulletinResponse.bulletinBoard.bulletins);
}).fail(function (xhr, status, error) {
deferred.reject();
- nf.Common.handleAjaxError(xhr, status, error);
+ nf.ErrorHandler.handleAjaxError(xhr, status, error);
});
};
@@ -832,7 +832,7 @@ nf.ControllerService = (function () {
conditionMet(controllerService, response.bulletinBoard.bulletins);
}).fail(function (xhr, status, error) {
deferred.reject();
- nf.Common.handleAjaxError(xhr, status, error);
+ nf.ErrorHandler.handleAjaxError(xhr, status, error);
});
}).promise();
};
@@ -1002,7 +1002,7 @@ nf.ControllerService = (function () {
data: JSON.stringify(referenceEntity),
dataType: 'json',
contentType: 'application/json'
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
// Note: updated revisions will be retrieved after updateReferencingServices is invoked
@@ -1448,7 +1448,7 @@ nf.ControllerService = (function () {
propertyName: propertyName
},
dataType: 'json'
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
};
/**
@@ -1737,6 +1737,7 @@ nf.ControllerService = (function () {
// initialize the property table
$('#controller-service-properties').propertytable('destroy').propertytable({
readOnly: false,
+ supportsGoTo: true,
dialogContainer: '#new-controller-service-property-container',
descriptorDeferred: getControllerServicePropertyDescriptor,
controllerServiceCreatedDeferred: function(response) {
@@ -1909,7 +1910,7 @@ nf.ControllerService = (function () {
updateReferencingComponentsBorder(referenceContainer);
$('#controller-service-properties').propertytable('resetTableSize');
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
},
/**
@@ -1927,6 +1928,7 @@ nf.ControllerService = (function () {
// initialize the property table
$('#controller-service-properties').propertytable('destroy').propertytable({
+ supportsGoTo: true,
readOnly: true
});
@@ -2108,7 +2110,7 @@ nf.ControllerService = (function () {
if (controllerServiceEntity.permissions.canRead) {
reloadControllerServiceReferences(serviceTable, controllerServiceEntity.component);
}
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
}
};
}());
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-services.js
----------------------------------------------------------------------
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 5fdc8c9..5010013 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
@@ -252,7 +252,7 @@ nf.ControllerServices = (function () {
var row = controllerServicesData.getRowById(controllerServiceEntity.id);
controllerServicesGrid.setSelectedRows([row]);
controllerServicesGrid.scrollRowIntoView(row);
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
// hide the dialog
$('#new-controller-service-dialog').modal('hide');
@@ -266,8 +266,21 @@ nf.ControllerServices = (function () {
var initNewControllerServiceDialog = function () {
// initialize the processor type table
var controllerServiceTypesColumns = [
- {id: 'type', name: 'Type', field: 'label', formatter: nf.Common.typeFormatter, sortable: false, resizable: true},
- {id: 'tags', name: 'Tags', field: 'tags', sortable: false, resizable: true}
+ {
+ id: 'type',
+ name: 'Type',
+ field: 'label',
+ formatter: nf.Common.typeFormatter,
+ sortable: false,
+ resizable: true
+ },
+ {
+ id: 'tags',
+ name: 'Tags',
+ field: 'tags',
+ sortable: false,
+ resizable: true
+ }
];
// initialize the dataview
@@ -403,7 +416,7 @@ nf.ControllerServices = (function () {
select: applyControllerServiceTypeFilter,
remove: applyControllerServiceTypeFilter
});
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
// initialize the controller service dialog
$('#new-controller-service-dialog').modal({
@@ -651,11 +664,44 @@ nf.ControllerServices = (function () {
// define the column model for the controller services table
var controllerServicesColumns = [
- {id: 'moreDetails', name: ' ', resizable: false, formatter: moreControllerServiceDetails, sortable: true, width: 90, maxWidth: 90, toolTip: 'Sorts based on presence of bulletins'},
- {id: 'name', name: 'Name', formatter: nameFormatter, sortable: true, resizable: true},
- {id: 'type', name: 'Type', formatter: typeFormatter, sortable: true, resizable: true},
- {id: 'state', name: 'State', formatter: controllerServiceStateFormatter, sortable: true, resizeable: true},
- {id: 'parentGroupId', name: 'Process Group', formatter: groupIdFormatter, sortable: true, resizeable: true}
+ {
+ id: 'moreDetails',
+ name: ' ',
+ resizable: false,
+ formatter: moreControllerServiceDetails,
+ sortable: true,
+ width: 90,
+ maxWidth: 90,
+ toolTip: 'Sorts based on presence of bulletins'
+ },
+ {
+ id: 'name',
+ name: 'Name',
+ formatter: nameFormatter,
+ sortable: true,
+ resizable: true
+ },
+ {
+ id: 'type',
+ name: 'Type',
+ formatter: typeFormatter,
+ sortable: true,
+ resizable: true
+ },
+ {
+ id: 'state',
+ name: 'State',
+ formatter: controllerServiceStateFormatter,
+ sortable: true,
+ resizeable: true
+ },
+ {
+ id: 'parentGroupId',
+ name: 'Process Group',
+ formatter: groupIdFormatter,
+ sortable: true,
+ resizeable: true
+ }
];
// action column should always be last
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-custom-ui.js
----------------------------------------------------------------------
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 fafc76f..4d82308 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
@@ -15,48 +15,74 @@
* limitations under the License.
*/
-/* global nf */
+/* global nf, define, module, require, exports */
-nf.CustomUi = {
- /**
- * Shows the custom ui.
- *
- * @argument {object} entity The component id
- * @arugment {string} uri The custom ui uri
- * @argument {boolean} editable Whether the custom ui should support editing
- */
- showCustomUi: function (entity, uri, editable) {
- return $.Deferred(function (deferred) {
- nf.Common.getAccessToken('../nifi-api/access/ui-extension-token').done(function (uiExtensionToken) {
- // record the processor id
- $('#shell-close-button');
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ define(['jquery',
+ 'nf.Common',
+ 'nf.Shell',
+ 'nf.Dialog',
+ 'nf.Client'], function ($, common, shell, dialog, client) {
+ return (nf.CustomUi = factory($, common, shell, dialog, client));
+ });
+ } else if (typeof exports === 'object' && typeof module === 'object') {
+ module.exports = (nf.CustomUi = factory(require('jquery'),
+ require('nf.Common'),
+ require('nf.Shell'),
+ require('nf.Dialog'),
+ require('nf.Client')));
+ } else {
+ nf.CustomUi = factory(root.$,
+ root.nf.Common,
+ root.nf.Shell,
+ root.nf.Dialog,
+ root.nf.Client);
+ }
+}(this, function ($, common, shell, dialog, client) {
+ 'use strict';
+
+ return {
+ /**
+ * Shows the custom ui.
+ *
+ * @argument {object} entity The component id
+ * @arugment {string} uri The custom ui uri
+ * @argument {boolean} editable Whether the custom ui should support editing
+ */
+ showCustomUi: function (entity, uri, editable) {
+ return $.Deferred(function (deferred) {
+ common.getAccessToken('../nifi-api/access/ui-extension-token').done(function (uiExtensionToken) {
+ // record the processor id
+ $('#shell-close-button');
- var revision = nf.Client.getRevision(entity);
+ var revision = client.getRevision(entity);
- // build the customer ui params
- var customUiParams = {
- 'id': entity.id,
- 'revision': revision.version,
- 'clientId': revision.clientId,
- 'editable': editable
- };
+ // build the customer ui params
+ var customUiParams = {
+ 'id': entity.id,
+ 'revision': revision.version,
+ 'clientId': revision.clientId,
+ 'editable': editable
+ };
- // conditionally include the ui extension token
- if (!nf.Common.isBlank(uiExtensionToken)) {
- customUiParams['access_token'] = uiExtensionToken;
- }
+ // conditionally include the ui extension token
+ if (!common.isBlank(uiExtensionToken)) {
+ customUiParams['access_token'] = uiExtensionToken;
+ }
- // show the shell
- nf.Shell.showPage('..' + uri + '?' + $.param(customUiParams), false).done(function () {
+ // show the shell
+ shell.showPage('..' + uri + '?' + $.param(customUiParams), false).done(function () {
+ deferred.resolve();
+ });
+ }).fail(function () {
+ dialog.showOkDialog({
+ headerText: 'Advanced Configuration',
+ dialogContent: 'Unable to generate access token for accessing the advanced configuration dialog.'
+ });
deferred.resolve();
});
- }).fail(function () {
- nf.Dialog.showOkDialog({
- headerText: 'Advanced Configuration',
- dialogContent: 'Unable to generate access token for accessing the advanced configuration dialog.'
- });
- deferred.resolve();
- });
- }).promise();
+ }).promise();
+ }
}
-};
\ No newline at end of file
+}));
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-draggable.js
----------------------------------------------------------------------
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 08b4590..a771fc5 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
@@ -248,7 +248,7 @@ nf.Draggable = (function () {
dialogContent: nf.Common.escapeHtml(xhr.responseText)
});
} else {
- nf.Common.handleAjaxError(xhr, status, error);
+ nf.ErrorHandler.handleAjaxError(xhr, status, error);
}
deferred.reject();
@@ -309,7 +309,7 @@ nf.Draggable = (function () {
dialogContent: nf.Common.escapeHtml(xhr.responseText)
});
} else {
- nf.Common.handleAjaxError(xhr, status, error);
+ nf.ErrorHandler.handleAjaxError(xhr, status, error);
}
deferred.reject();
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-go-to.js
----------------------------------------------------------------------
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 2b23b1a..5e387ef 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
@@ -683,7 +683,7 @@ nf.GoTo = (function () {
// show the upstream dialog
$('#connections-dialog').modal('setHeaderText', 'Upstream Connections').modal('show');
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
},
/**
@@ -734,7 +734,7 @@ nf.GoTo = (function () {
// show the downstream dialog
$('#connections-dialog').modal('setHeaderText', 'Downstream Connections').modal('show');
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
},
/**
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label-configuration.js
----------------------------------------------------------------------
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 8963fa4..0eba38e 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
@@ -71,7 +71,7 @@ nf.LabelConfiguration = (function () {
// inform Angular app values have changed
nf.ng.Bridge.digest();
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
// reset and hide the dialog
this.modal('hide');
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-policy-management.js
----------------------------------------------------------------------
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 dc40c95..b19d033 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
@@ -129,11 +129,11 @@ nf.PolicyManagement = (function () {
var allowedGroups = getAllAllowedGroups();
var allowedUsers = getAllAllowedUsers();
- var self = this;
+ var nfUserSearchAutocomplete = this;
$.each(searchResults.userGroups, function (_, tenant) {
// see if this match is not already selected
if ($.inArray(tenant.id, allowedGroups) === -1) {
- self._renderGroup(ul, $.extend({
+ nfUserSearchAutocomplete._renderGroup(ul, $.extend({
type: 'group'
}, tenant));
}
@@ -141,7 +141,7 @@ nf.PolicyManagement = (function () {
$.each(searchResults.users, function (_, tenant) {
// see if this match is not already selected
if ($.inArray(tenant.id, allowedUsers) === -1) {
- self._renderUser(ul, $.extend({
+ nfUserSearchAutocomplete._renderUser(ul, $.extend({
type: 'user'
}, tenant));
}
@@ -504,9 +504,24 @@ nf.PolicyManagement = (function () {
// initialize the templates table
var usersColumns = [
- {id: 'identity', name: 'User', sortable: true, resizable: true, formatter: identityFormatter},
- {id: 'actions', name: ' ', sortable: false, resizable: false, formatter: actionFormatter, width: 100, maxWidth: 100}
+ {
+ id: 'identity',
+ name: 'User',
+ sortable: true,
+ resizable: true,
+ formatter: identityFormatter
+ },
+ {
+ id: 'actions',
+ name: ' ',
+ sortable: false,
+ resizable: false,
+ formatter: actionFormatter,
+ width: 100,
+ maxWidth: 100
+ }
];
+
var usersOptions = {
forceFitColumns: true,
enableTextSelectionOnCells: true,
@@ -669,7 +684,7 @@ nf.PolicyManagement = (function () {
}).done(function () {
loadPolicy();
}).fail(function (xhr, status, error) {
- nf.Common.handleAjaxError(xhr, status, error);
+ nf.ErrorHandler.handleAjaxError(xhr, status, error);
resetPolicy();
loadPolicy();
});
@@ -896,7 +911,7 @@ nf.PolicyManagement = (function () {
resetPolicy();
deferred.reject();
- nf.Common.handleAjaxError(xhr, status, error);
+ nf.ErrorHandler.handleAjaxError(xhr, status, error);
}
});
}).promise();
@@ -954,7 +969,7 @@ nf.PolicyManagement = (function () {
resetPolicy();
deferred.reject();
- nf.Common.handleAjaxError(xhr, status, error);
+ nf.ErrorHandler.handleAjaxError(xhr, status, error);
}
});
}).promise();
@@ -1022,7 +1037,7 @@ nf.PolicyManagement = (function () {
resetPolicy();
loadPolicy();
}
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
};
/**
@@ -1077,7 +1092,7 @@ nf.PolicyManagement = (function () {
loadPolicy();
}
}).fail(function (xhr, status, error) {
- nf.Common.handleAjaxError(xhr, status, error);
+ nf.ErrorHandler.handleAjaxError(xhr, status, error);
resetPolicy();
loadPolicy();
}).always(function () {
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-configuration.js
----------------------------------------------------------------------
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 420febb..a49290a 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
@@ -103,7 +103,7 @@ nf.PortConfiguration = (function () {
$('#port-configuration').modal('hide');
// handle the error
- nf.Common.handleAjaxError(xhr, status, error);
+ nf.ErrorHandler.handleAjaxError(xhr, status, error);
}
});
}
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js
----------------------------------------------------------------------
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 aa37034..7311f07 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
@@ -86,7 +86,7 @@ nf.ProcessGroupConfiguration = (function () {
});
nf.Canvas.reload();
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
};
/**
@@ -179,7 +179,7 @@ nf.ProcessGroupConfiguration = (function () {
// update the current time
$('#process-group-configuration-last-refreshed').text(controllerServicesResponse.currentTime);
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
};
/**
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
----------------------------------------------------------------------
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 a9a51f5..bf13707 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
@@ -87,7 +87,7 @@ nf.ProcessorConfiguration = (function () {
text: 'Primary node',
value: 'PRIMARY',
description: 'Processor will be scheduled to run only on the primary node',
- disabled: !nf.Canvas.isClustered() && processor.config['executionNode'] === 'PRIMARY'
+ disabled: !nf.ClusterSummary.isClustered() && processor.config['executionNode'] === 'PRIMARY'
}];
};
@@ -114,7 +114,7 @@ nf.ProcessorConfiguration = (function () {
headerText: 'Processor Configuration'
});
} else {
- nf.Common.handleAjaxError(xhr, status, error);
+ nf.ErrorHandler.handleAjaxError(xhr, status, error);
}
};
@@ -562,6 +562,7 @@ nf.ProcessorConfiguration = (function () {
// initialize the property table
$('#processor-properties').propertytable({
readOnly: false,
+ supportsGoTo: true,
dialogContainer: '#new-processor-property-container',
descriptorDeferred: function (propertyName) {
var processor = $('#processor-configuration').data('processorDetails');
@@ -573,7 +574,7 @@ nf.ProcessorConfiguration = (function () {
propertyName: propertyName
},
dataType: 'json'
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
},
goToServiceDeferred: goToServiceFromProperty
});
@@ -689,7 +690,7 @@ nf.ProcessorConfiguration = (function () {
});
// show the execution node option if we're cluster or we're currently configured to run on the primary node only
- if (nf.Canvas.isClustered() || executionNode === 'PRIMARY') {
+ if (nf.ClusterSummary.isClustered() || executionNode === 'PRIMARY') {
$('#execution-node-options').show();
} else {
$('#execution-node-options').hide();
@@ -852,7 +853,7 @@ nf.ProcessorConfiguration = (function () {
if (processorRelationships.is(':visible') && processorRelationships.get(0).scrollHeight > processorRelationships.innerHeight()) {
processorRelationships.css('border-width', '1px');
}
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
}
}
};
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-queue-listing.js
----------------------------------------------------------------------
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 641fc6f..0dac31a 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
@@ -316,7 +316,7 @@ nf.QueueListing = (function () {
}).done(function (response) {
listingRequest = response.listingRequest;
processListingRequest(nextDelay);
- }).fail(completeListingRequest).fail(nf.Common.handleAjaxError);
+ }).fail(completeListingRequest).fail(nf.ErrorHandler.handleAjaxError);
};
// issue the request to list the flow files
@@ -335,7 +335,7 @@ nf.QueueListing = (function () {
// process the drop request
listingRequest = response.listingRequest;
processListingRequest(1);
- }).fail(completeListingRequest).fail(nf.Common.handleAjaxError);
+ }).fail(completeListingRequest).fail(nf.ErrorHandler.handleAjaxError);
}).promise();
};
@@ -436,7 +436,7 @@ nf.QueueListing = (function () {
// show the dialog
$('#flowfile-details-dialog').modal('show');
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
};
return {
@@ -496,8 +496,20 @@ nf.QueueListing = (function () {
width: 75,
maxWidth: 75
},
- {id: 'uuid', name: 'UUID', field: 'uuid', sortable: false, resizable: true},
- {id: 'filename', name: 'Filename', field: 'filename', sortable: false, resizable: true},
+ {
+ id: 'uuid',
+ name: 'UUID',
+ field: 'uuid',
+ sortable: false,
+ resizable: true
+ },
+ {
+ id: 'filename',
+ name: 'Filename',
+ field: 'filename',
+ sortable: false,
+ resizable: true
+ },
{
id: 'size',
name: 'File Size',
@@ -536,7 +548,7 @@ nf.QueueListing = (function () {
];
// conditionally show the cluster node identifier
- if (nf.Canvas.isClustered()) {
+ if (nf.ClusterSummary.isClustered()) {
queueListingColumns.push({
id: 'clusterNodeAddress',
name: 'Node',
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/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
----------------------------------------------------------------------
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 ece8be6..d012be4 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
@@ -82,7 +82,7 @@ nf.RemoteProcessGroupConfiguration = (function () {
headerText: 'Remote Process Group Configuration'
});
} else {
- nf.Common.handleAjaxError(xhr, status, error);
+ nf.ErrorHandler.handleAjaxError(xhr, status, error);
}
});
}
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/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
----------------------------------------------------------------------
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 d5c9ae7..7c75aa2 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
@@ -100,7 +100,7 @@ nf.RemoteProcessGroupPorts = (function () {
headerText: 'Remote Process Group Ports'
});
} else {
- nf.Common.handleAjaxError(xhr, status, error);
+ nf.ErrorHandler.handleAjaxError(xhr, status, error);
}
}).always(function () {
// close the dialog
@@ -351,7 +351,7 @@ nf.RemoteProcessGroupPorts = (function () {
dialogContent: content
});
} else {
- nf.Common.handleAjaxError(xhr, status, error);
+ nf.ErrorHandler.handleAjaxError(xhr, status, error);
}
});
});
@@ -548,7 +548,7 @@ nf.RemoteProcessGroupPorts = (function () {
// show the details
$('#remote-process-group-ports').modal('show');
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
}
}
};
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js
index f134b69..cf94ba2 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js
@@ -62,7 +62,7 @@ nf.ReportingTask = (function () {
headerText: 'Reporting Task'
});
} else {
- nf.Common.handleAjaxError(xhr, status, error);
+ nf.ErrorHandler.handleAjaxError(xhr, status, error);
}
};
@@ -219,7 +219,7 @@ nf.ReportingTask = (function () {
// update the task
renderReportingTask(response);
nf.ControllerService.reloadReferencedServices(getControllerServicesTable(), response.component);
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
};
/**
@@ -299,7 +299,7 @@ nf.ReportingTask = (function () {
propertyName: propertyName
},
dataType: 'json'
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
};
return {
@@ -363,6 +363,7 @@ nf.ReportingTask = (function () {
// initialize the property table
$('#reporting-task-properties').propertytable({
readOnly: false,
+ supportsGoTo: true,
dialogContainer: '#new-reporting-task-property-container',
descriptorDeferred: getReportingTaskPropertyDescriptor,
controllerServiceCreatedDeferred: function(response){
@@ -387,6 +388,7 @@ nf.ReportingTask = (function () {
// initialize the property table
$('#reporting-task-properties').propertytable('destroy').propertytable({
readOnly: false,
+ supportsGoTo: true,
dialogContainer: '#new-reporting-task-property-container',
descriptorDeferred: getReportingTaskPropertyDescriptor,
controllerServiceCreatedDeferred: function(response){
@@ -581,7 +583,7 @@ nf.ReportingTask = (function () {
$('#reporting-task-configuration').modal('show');
$('#reporting-task-properties').propertytable('resetTableSize');
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
},
/**
@@ -598,6 +600,7 @@ nf.ReportingTask = (function () {
// initialize the property table
$('#reporting-task-properties').propertytable('destroy').propertytable({
+ supportsGoTo: true,
readOnly: true
});
@@ -733,7 +736,7 @@ nf.ReportingTask = (function () {
dataType: 'json'
}).done(function (response) {
renderReportingTask(response);
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
},
/**
@@ -773,7 +776,7 @@ nf.ReportingTask = (function () {
var reportingTaskGrid = $('#reporting-tasks-table').data('gridInstance');
var reportingTaskData = reportingTaskGrid.getData();
reportingTaskData.deleteItem(reportingTaskEntity.id);
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
}
};
}());
http://git-wip-us.apache.org/repos/asf/nifi/blob/dc934cbb/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js
index 295c428..65f222d 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js
@@ -83,7 +83,7 @@ nf.Settings = (function () {
$('#settings-save').off('click').on('click', function () {
saveSettings(response.revision.version);
});
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
}
/**
@@ -402,7 +402,7 @@ nf.Settings = (function () {
var row = reportingTaskData.getRowById(reportingTaskEntity.id);
reportingTaskGrid.setSelectedRows([row]);
reportingTaskGrid.scrollRowIntoView(row);
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
// hide the dialog
$('#new-reporting-task-dialog').modal('hide');
@@ -436,8 +436,21 @@ nf.Settings = (function () {
// initialize the processor type table
var reportingTaskTypesColumns = [
- {id: 'type', name: 'Type', field: 'label', formatter: nf.Common.typeFormatter, sortable: false, resizable: true},
- {id: 'tags', name: 'Tags', field: 'tags', sortable: false, resizable: true}
+ {
+ id: 'type',
+ name: 'Type',
+ field: 'label',
+ formatter: nf.Common.typeFormatter,
+ sortable: false,
+ resizable: true
+ },
+ {
+ id: 'tags',
+ name: 'Tags',
+ field: 'tags',
+ sortable: false,
+ resizable: true
+ }
];
// initialize the dataview
@@ -580,7 +593,7 @@ nf.Settings = (function () {
select: applyReportingTaskTypeFilter,
remove: applyReportingTaskTypeFilter
});
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
// initialize the reporting task dialog
$('#new-reporting-task-dialog').modal({
@@ -980,7 +993,7 @@ nf.Settings = (function () {
// update the current time
$('#settings-last-refreshed').text(controllerServicesResponse.currentTime);
- }).fail(nf.Common.handleAjaxError);
+ }).fail(nf.ErrorHandler.handleAjaxError);
};
/**