You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ma...@apache.org on 2016/04/15 22:03:54 UTC
[02/22] nifi git commit: NIFI-1551: - Removing the AuthorityProvider.
- Refactoring REST API in preparation for introduction of the Authorizer. -
Updating UI accordingly. - Removing unneeded properties from nifi.properties.
- Addressing comments from PR.
http://git-wip-us.apache.org/repos/asf/nifi/blob/153f63ef/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 c308469..6e9ee36 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
@@ -19,7 +19,7 @@
nf.LabelConfiguration = (function () {
- var labelUri = '';
+ var labelId = '';
return {
/**
@@ -33,23 +33,32 @@ nf.LabelConfiguration = (function () {
buttonText: 'Apply',
handler: {
click: function () {
- var revision = nf.Client.getRevision();
+ // get the label data
+ var labelData = d3.select('#id-' + labelId).datum();
// get the new values
var labelValue = $('#label-value').val();
var fontSize = $('#label-font-size').combo('getSelectedOption');
+ // build the label entity
+ var labelEntity = {
+ 'revision': nf.Client.getRevision(),
+ 'label': {
+ 'id': labelId,
+ 'label': labelValue,
+ 'style': {
+ 'font-size': fontSize.value
+ }
+ }
+ };
+
// save the new label value
$.ajax({
type: 'PUT',
- url: labelUri,
- data: {
- 'version': revision.version,
- 'clientId': revision.clientId,
- 'label': labelValue,
- 'style[font-size]': fontSize.value
- },
- dataType: 'json'
+ url: labelData.component.uri,
+ data: JSON.stringify(labelEntity),
+ dataType: 'json',
+ contentType: 'application/json'
}).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
@@ -72,7 +81,7 @@ nf.LabelConfiguration = (function () {
}],
handler: {
close: function () {
- labelUri = '';
+ labelId = '';
}
}
}).draggable({
@@ -130,7 +139,7 @@ nf.LabelConfiguration = (function () {
}
// store the label uri
- labelUri = selectionData.component.uri;
+ labelId = selectionData.component.id;
// populate the dialog
$('#label-value').val(labelValue);
http://git-wip-us.apache.org/repos/asf/nifi/blob/153f63ef/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label.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.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 69a4758..5629bbb 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
@@ -526,6 +526,13 @@ nf.Label = (function () {
set(labels);
}
},
+
+ /**
+ * Returns the entity key when marshalling an entity of this type.
+ */
+ getEntityKey: function (d) {
+ return 'label';
+ },
/**
* Removes the specified label.
http://git-wip-us.apache.org/repos/asf/nifi/blob/153f63ef/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 0939b3a..41278b8 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
@@ -30,37 +30,44 @@ nf.PortConfiguration = (function () {
buttonText: 'Apply',
handler: {
click: function () {
- var revision = nf.Client.getRevision();
-
// get the port data to reference the uri
var portId = $('#port-id').text();
var portData = d3.select('#id-' + portId).datum();
- var data = {
- version: revision.version,
- clientId: revision.clientId,
- name: $('#port-name').val(),
- comments: $('#port-comments').val()
+ // build the updated port
+ var port = {
+ 'id': portId,
+ 'name': $('#port-name').val(),
+ 'comments': $('#port-comments').val()
};
// include the concurrent tasks if appropriate
if ($('#port-concurrent-task-container').is(':visible')) {
- data['concurrentlySchedulableTaskCount'] = $('#port-concurrent-tasks').val();
+ port['concurrentlySchedulableTaskCount'] = $('#port-concurrent-tasks').val();
}
// mark the processor disabled if appropriate
if ($('#port-enabled').hasClass('checkbox-unchecked')) {
- data['state'] = 'DISABLED';
+ port['state'] = 'DISABLED';
} else if ($('#port-enabled').hasClass('checkbox-checked')) {
- data['state'] = 'STOPPED';
+ port['state'] = 'STOPPED';
}
+
+ // build the port entity
+ var portEntity = {
+ 'revision': nf.Client.getRevision()
+ };
+ // use bracket notation to set the key based on the type
+ portEntity[nf[portData.type].getEntityKey(portData)] = port;
+
// update the selected component
$.ajax({
type: 'PUT',
- data: data,
+ data: JSON.stringify(portEntity),
url: portData.component.uri,
- dataType: 'json'
+ dataType: 'json',
+ contentType: 'application/json'
}).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
http://git-wip-us.apache.org/repos/asf/nifi/blob/153f63ef/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port.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.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 e0ff75d..7b69c8b 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
@@ -606,7 +606,14 @@ nf.Port = (function () {
// update the visible ports
d3.selectAll('g.input-port.visible, g.output-port.visible').call(updatePortStatus);
},
-
+
+ /**
+ * Returns the entity key when marshalling an entity of this type.
+ */
+ getEntityKey: function (d) {
+ return d.component.type === 'INPUT_PORT' ? 'inputPort' : 'outputPort';
+ },
+
/**
* Removes the specified port.
*
http://git-wip-us.apache.org/repos/asf/nifi/blob/153f63ef/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 fb22411..b72deb2 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
@@ -34,17 +34,23 @@ nf.ProcessGroupConfiguration = (function () {
var processGroupId = $('#process-group-id').text();
var processGroupData = d3.select('#id-' + processGroupId).datum();
+ // build the entity
+ var entity = {
+ 'revision': nf.Client.getRevision(),
+ 'processGroup': {
+ 'id': processGroupId,
+ 'name': $('#process-group-name').val(),
+ 'comments': $('#process-group-comments').val()
+ }
+ };
+
// update the selected component
$.ajax({
type: 'PUT',
- data: {
- version: revision.version,
- clientId: revision.clientId,
- name: $('#process-group-name').val(),
- comments: $('#process-group-comments').val()
- },
+ data: JSON.stringify(entity),
url: processGroupData.component.uri,
- dataType: 'json'
+ dataType: 'json',
+ contentType: 'application/json'
}).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.processGroup)) {
// update the revision
http://git-wip-us.apache.org/repos/asf/nifi/blob/153f63ef/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.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.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 32ba3af..bde0f41 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
@@ -1038,6 +1038,13 @@ nf.ProcessGroup = (function () {
// update the visible process groups
d3.selectAll('g.process-group.visible').call(updateProcessGroupStatus);
},
+
+ /**
+ * Returns the entity key when marshalling an entity of this type.
+ */
+ getEntityKey: function (d) {
+ return 'processGroup';
+ },
/**
* Removes the specified process group.
http://git-wip-us.apache.org/repos/asf/nifi/blob/153f63ef/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 2bbb813..1271480 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
@@ -580,7 +580,7 @@ nf.ProcessorConfiguration = (function () {
// get the processor history
requests.push($.ajax({
type: 'GET',
- url: '../nifi-api/controller/history/processors/' + encodeURIComponent(processor.id),
+ url: '../nifi-api/history/processors/' + encodeURIComponent(processor.id),
dataType: 'json'
}));
http://git-wip-us.apache.org/repos/asf/nifi/blob/153f63ef/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor.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.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 4b4a1ef..e46b462 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
@@ -823,6 +823,13 @@ nf.Processor = (function () {
// update the visible processor status
d3.selectAll('g.processor.visible').call(updateProcessorStatus);
},
+
+ /**
+ * Returns the entity key when marshalling an entity of this type.
+ */
+ getEntityKey: function (d) {
+ return 'processor';
+ },
/**
* Returns the default color that should be used when drawing a processor.
http://git-wip-us.apache.org/repos/asf/nifi/blob/153f63ef/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 76d368e..8912662 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
@@ -381,7 +381,8 @@ nf.QueueListing = (function () {
$.ajax({
type: 'POST',
url: connection.component.uri + '/listing-requests',
- dataType: 'json'
+ dataType: 'json',
+ contentType: 'application/json'
}).done(function(response) {
// initialize the progress bar value
updateProgress(0);
http://git-wip-us.apache.org/repos/asf/nifi/blob/153f63ef/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 d0d5e3c..738b5b0 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
@@ -46,7 +46,6 @@ nf.RemoteProcessGroupConfiguration = (function () {
data: JSON.stringify(remoteProcessGroupEntity),
url: remoteProcessGroupData.component.uri,
dataType: 'json',
- processData: false,
contentType: 'application/json'
}).done(function (response) {
// update the revision
http://git-wip-us.apache.org/repos/asf/nifi/blob/153f63ef/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 db41bf1..ef51f46 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
@@ -60,7 +60,6 @@ nf.RemoteProcessGroupPorts = (function () {
data: JSON.stringify(remoteProcessGroupPortEntity),
url: remoteProcessGroupData.component.uri + portContextPath + encodeURIComponent(remotePortId),
dataType: 'json',
- processData: false,
contentType: 'application/json'
}).done(function (response) {
// update the revision
@@ -279,7 +278,6 @@ nf.RemoteProcessGroupPorts = (function () {
data: JSON.stringify(remoteProcessGroupPortEntity),
url: remoteProcessGroupData.component.uri + portContextPath + encodeURIComponent(port.id),
dataType: 'json',
- processData: false,
contentType: 'application/json'
}).done(function (response) {
// update the revision
http://git-wip-us.apache.org/repos/asf/nifi/blob/153f63ef/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group.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.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.js
index 3084843..dd7454b 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.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.js
@@ -1038,6 +1038,13 @@ nf.RemoteProcessGroup = (function () {
// only update the visible components
d3.selectAll('g.remote-process-group.visible').call(updateProcessGroupStatus);
},
+
+ /**
+ * Returns the entity key when marshalling an entity of this type.
+ */
+ getEntityKey: function (d) {
+ return 'remoteProcessGroup';
+ },
/**
* Removes the specified process group.
http://git-wip-us.apache.org/repos/asf/nifi/blob/153f63ef/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 1656185..3cd266e 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
@@ -189,16 +189,20 @@ nf.ReportingTask = (function () {
* @param {boolean} running
*/
var setRunning = function (reportingTask, running) {
- var revision = nf.Client.getRevision();
+ var entity = {
+ 'revision': nf.Client.getRevision(),
+ 'reportingTask': {
+ 'id': reportingTask.id,
+ 'state': running === true ? 'RUNNING' : 'STOPPED'
+ }
+ };
+
return $.ajax({
type: 'PUT',
url: reportingTask.uri,
- data: {
- clientId: revision.clientId,
- version: revision.version,
- state: running === true ? 'RUNNING' : 'STOPPED'
- },
- dataType: 'json'
+ data: JSON.stringify(entity),
+ dataType: 'json',
+ contentType: 'application/json'
}).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
@@ -258,7 +262,6 @@ nf.ReportingTask = (function () {
data: JSON.stringify(updatedReportingTask),
url: reportingTask.uri,
dataType: 'json',
- processData: false,
contentType: 'application/json'
}).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.reportingTask)) {
@@ -395,7 +398,7 @@ nf.ReportingTask = (function () {
// get the reporting task history
var loadHistory = $.ajax({
type: 'GET',
- url: '../nifi-api/controller/history/reporting-tasks/' + encodeURIComponent(reportingTask.id),
+ url: '../nifi-api/history/reporting-tasks/' + encodeURIComponent(reportingTask.id),
dataType: 'json'
});
@@ -589,7 +592,7 @@ nf.ReportingTask = (function () {
// get the reporting task history
var loadHistory = $.ajax({
type: 'GET',
- url: '../nifi-api/controller/history/reporting-tasks/' + encodeURIComponent(reportingTask.id),
+ url: '../nifi-api/history/reporting-tasks/' + encodeURIComponent(reportingTask.id),
dataType: 'json'
});
http://git-wip-us.apache.org/repos/asf/nifi/blob/153f63ef/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-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-secure-port-configuration.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-configuration.js
deleted file mode 100644
index 7c119c8..0000000
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-configuration.js
+++ /dev/null
@@ -1,384 +0,0 @@
-/*
- * 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.
- */
-nf.SecurePortConfiguration = (function () {
-
- var portUri = '';
-
- var config = {
- search: 'User DNs, groups, etc'
- };
-
- /**
- * Initializes the port dialog.
- */
- var initPortConfigurationDialog = function () {
- // initialize the properties tabs
- $('#secure-port-configuration-tabs').tabbs({
- tabStyle: 'tab',
- selectedTabStyle: 'selected-tab',
- tabs: [{
- name: 'Settings',
- tabContentId: 'secure-port-settings-tab-content'
- }, {
- name: 'Access Control',
- tabContentId: 'secure-port-access-control-tab-content'
- }]
- });
-
- // initialize the dialog
- $('#secure-port-configuration').modal({
- headerText: 'Configure Secure Port',
- overlayBackground: true,
- buttons: [{
- buttonText: 'Apply',
- handler: {
- click: function () {
- var portId = $('#secure-port-id').text();
- var portType = $('#secure-port-type').text();
-
- var portDto = {};
- portDto['id'] = portId;
- portDto['name'] = $('#secure-port-name').val();
- portDto['comments'] = $('#secure-port-comments').val();
- portDto['groupAccessControl'] = getAllowedGroups();
- portDto['userAccessControl'] = getAllowedUsers();
-
- // include the concurrent tasks if appropriate
- if ($('#secure-port-concurrent-task-container').is(':visible')) {
- portDto['concurrentlySchedulableTaskCount'] = $('#secure-port-concurrent-tasks').val();
- }
-
- // mark the processor disabled if appropriate
- if ($('#secure-port-enabled').hasClass('checkbox-unchecked')) {
- portDto['state'] = 'DISABLED';
- } else if ($('#secure-port-enabled').hasClass('checkbox-checked')) {
- portDto['state'] = 'STOPPED';
- }
-
- var portEntity = {};
- portEntity['revision'] = nf.Client.getRevision();
- portEntity[portType] = portDto;
-
- // update the selected component
- $.ajax({
- type: 'PUT',
- data: JSON.stringify(portEntity),
- contentType: 'application/json',
- url: portUri,
- dataType: 'json'
- }).done(function (response) {
- // update the revision
- nf.Client.setRevision(response.revision);
-
- var port;
- if (nf.Common.isDefinedAndNotNull(response.inputPort)) {
- port = response.inputPort;
- } else {
- port = response.outputPort;
- }
-
- // refresh the port component
- nf.Port.set(port);
-
- // close the details panel
- $('#secure-port-configuration').modal('hide');
- }).fail(function (xhr, status, error) {
- // close the details panel
- $('#secure-port-configuration').modal('hide');
-
- // handle the error
- nf.Common.handleAjaxError(xhr, status, error);
- });
- }
- }
- }, {
- buttonText: 'Cancel',
- handler: {
- click: function () {
- $('#secure-port-configuration').modal('hide');
- }
- }
- }],
- handler: {
- close: function () {
- portUri = '';
-
- // clear the port details
- $('#secure-port-id').text('');
- $('#secure-port-type').text('');
- $('#secure-port-name').val('');
- $('#secure-port-enabled').removeClass('checkbox-unchecked checkbox-checked');
- $('#secure-port-concurrent-tasks').val('');
- $('#secure-port-comments').val('');
- $('#allowed-users').empty();
- $('#allowed-groups').empty();
- }
- }
- }).draggable({
- containment: 'parent',
- handle: '.dialog-header'
- });
-
- // listen for removal requests
- $(document).on('click', 'div.remove-allowed-entity', function () {
- $(this).closest('li').remove();
- $(this).closest('ul').sortable('refresh');
- });
-
- // initialize the access control auto complete
- $.widget('nf.userSearchAutocomplete', $.ui.autocomplete, {
- _normalize: function(searchResults) {
- var items = [];
- items.push(searchResults);
- return items;
- },
- _resizeMenu: function () {
- var ul = this.menu.element;
- ul.width(700);
- },
- _renderMenu: function (ul, items) {
- var self = this;
-
- // results are normalized into an array
- var results = items[0];
-
- // show all groups not currently selected
- if (!nf.Common.isEmpty(results.userGroupResults)) {
- var allowedGroups = getAllowedGroups();
- var groupHeaderAdded = false;
-
- // go through each group result
- $.each(results.userGroupResults, function (i, groupMatch) {
-
- // see if this match is not already selected
- if ($.inArray(groupMatch.group, allowedGroups) === -1) {
-
- // only add the header for the first non selected matching group
- if (!groupHeaderAdded) {
- ul.append('<li class="search-users-header">Groups</li>');
- groupHeaderAdded = true;
- }
-
- // add the group match
- self._renderGroupItem(ul, groupMatch);
- }
- });
- }
-
- // show all users not currently selected
- if (!nf.Common.isEmpty(results.userResults)) {
- var allowedUsers = getAllowedUsers();
- var userHeaderAdded = false;
-
- // go through each user result
- $.each(results.userResults, function (i, userMatch) {
-
- // see if this match is not already selected
- if ($.inArray(userMatch.userDn, allowedUsers) === -1) {
-
- // only add the header for the first non selected matching user
- if (!userHeaderAdded) {
- ul.append('<li class="search-users-header">Users</li>');
- userHeaderAdded = true;
- }
-
- // add the user match
- self._renderUserItem(ul, userMatch);
- }
- });
- }
-
- // ensure there were some results
- if (ul.children().length === 0) {
- ul.append('<li class="unset search-users-no-matches">No users or groups match</li>');
- }
- },
- _renderGroupItem: function (ul, groupMatch) {
- var groupContent = $('<a></a>').append($('<div class="search-users-match-header"></div>').text(groupMatch.group));
- return $('<li></li>').data('ui-autocomplete-item', groupMatch).append(groupContent).appendTo(ul);
- },
- _renderUserItem: function (ul, userMatch) {
- var userContent = $('<a></a>').append($('<div class="search-users-match-header"></div>').text(userMatch.userDn));
- return $('<li></li>').data('ui-autocomplete-item', userMatch).append(userContent).appendTo(ul);
- }
- });
-
- // configure the autocomplete field
- $('#secure-port-access-control').userSearchAutocomplete({
- minLength: 0,
- appendTo: '#search-users-results',
- position: {
- my: 'left top',
- at: 'left bottom',
- offset: '0 1'
- },
- source: function (request, response) {
- // create the search request
- $.ajax({
- type: 'GET',
- data: {
- q: request.term
- },
- dataType: 'json',
- url: '../nifi-api/controller/users/search-results'
- }).done(function (searchResponse) {
- response(searchResponse);
- });
- },
- select: function (event, ui) {
- var item = ui.item;
-
- // add the item appropriately
- if (nf.Common.isDefinedAndNotNull(item.group)) {
- addAllowedGroup(item.group);
- } else {
- addAllowedUser(item.userDn);
- }
-
- // blur the search field
- $(this).blur();
-
- // stop event propagation
- return false;
- }
- }).focus(function () {
- // conditionally clear the text for the user to type
- if ($(this).val() === config.search) {
- $(this).val('').removeClass('search-users');
- }
- }).blur(function () {
- $(this).val(config.search).addClass('search-users');
- }).val(config.search).addClass('search-users');
- };
-
- /**
- * Adds the specified user to the list of allowed users.
- *
- * @argument {string} allowedUser The allowed user dn
- */
- var addAllowedUser = function (allowedUser) {
- var allowedUsers = $('#allowed-users');
-
- // append the user
- var user = $('<span></span>').addClass('allowed-entity ellipsis').text(allowedUser).ellipsis();
- var userAction = $('<div></div>').addClass('remove-allowed-entity');
- $('<li></li>').data('user', allowedUser).append(user).append(userAction).appendTo(allowedUsers);
- };
-
- /**
- * Adds the specified group to the list of allowed groups.
- *
- * @argument {string} allowedGroup The allowed group name
- */
- var addAllowedGroup = function (allowedGroup) {
- var allowedGroups = $('#allowed-groups');
-
- // append the group
- var group = $('<span></span>').addClass('allowed-entity ellipsis').text(allowedGroup).ellipsis();
- var groupAction = $('<div></div>').addClass('remove-allowed-entity');
- $('<li></li>').data('group', allowedGroup).append(group).append(groupAction).appendTo(allowedGroups);
- };
-
- /**
- * Gets the currently selected allowed users.
- */
- var getAllowedUsers = function () {
- var allowedUsers = [];
- $('#allowed-users').children('li').each(function (_, allowedUser) {
- var user = $(allowedUser).data('user');
- if (nf.Common.isDefinedAndNotNull(user)) {
- allowedUsers.push(user);
- }
- });
- return allowedUsers;
- };
-
- /**
- * Gets the currently selected allowed groups.
- */
- var getAllowedGroups = function () {
- var allowedGroups = [];
- $('#allowed-groups').children('li').each(function (_, allowedGroup) {
- var group = $(allowedGroup).data('group');
- if (nf.Common.isDefinedAndNotNull(group)) {
- allowedGroups.push(group);
- }
- });
- return allowedGroups;
- };
-
- return {
- init: function () {
- initPortConfigurationDialog();
- },
-
- /**
- * Shows the details for the port specified selection.
- *
- * @argument {selection} selection The selection
- */
- showConfiguration: function (selection) {
- // if the specified component is a port, load its properties
- if (nf.CanvasUtils.isInputPort(selection) || nf.CanvasUtils.isOutputPort(selection)) {
- var selectionData = selection.datum();
-
- // determine the port type
- if (selectionData.component.type === 'INPUT_PORT') {
- $('#secure-port-type').text('inputPort');
- } else {
- $('#secure-port-type').text('outputPort');
- }
-
- // store the uri
- portUri = selectionData.component.uri;
-
- // show concurrent tasks for root groups only
- if (nf.Canvas.getParentGroupId() === null) {
- $('#secure-port-concurrent-task-container').show();
- } else {
- $('#secure-port-concurrent-task-container').hide();
- }
-
- // determine if the enabled checkbox is checked or not
- var portEnableStyle = 'checkbox-checked';
- if (selectionData.component.state === 'DISABLED') {
- portEnableStyle = 'checkbox-unchecked';
- }
-
- // populate the port settings
- $('#secure-port-id').text(selectionData.component.id);
- $('#secure-port-name').val(selectionData.component.name);
- $('#secure-port-enabled').removeClass('checkbox-unchecked checkbox-checked').addClass(portEnableStyle);
- $('#secure-port-concurrent-tasks').val(selectionData.component.concurrentlySchedulableTaskCount);
- $('#secure-port-comments').val(selectionData.component.comments);
-
- // add allowed users
- $.each(selectionData.component.userAccessControl, function (_, allowedUser) {
- addAllowedUser(allowedUser);
- });
-
- // add allowed groups
- $.each(selectionData.component.groupAccessControl, function (_, allowedGroup) {
- addAllowedGroup(allowedGroup);
- });
-
- // show the details
- $('#secure-port-configuration').modal('show');
- }
- }
- };
-}());
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/nifi/blob/153f63ef/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-details.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-details.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-details.js
deleted file mode 100644
index 63afac0..0000000
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-details.js
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * 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 */
-
-nf.SecurePortDetails = (function () {
-
- /**
- * Adds the specified user to the list of allowed users.
- *
- * @argument {string} allowedUser The allowed user dn
- */
- var addAllowedUser = function (allowedUser) {
- var allowedUsers = $('#read-only-allowed-users');
-
- // append the user
- var user = $('<span></span>').addClass('allowed-entity ellipsis').text(allowedUser).ellipsis();
- $('<li></li>').data('user', allowedUser).append(user).appendTo(allowedUsers);
- };
-
- /**
- * Adds the specified group to the list of allowed groups.
- *
- * @argument {string} allowedGroup The allowed group name
- */
- var addAllowedGroup = function (allowedGroup) {
- var allowedGroups = $('#read-only-allowed-groups');
-
- // append the group
- var group = $('<span></span>').addClass('allowed-entity ellipsis').text(allowedGroup).ellipsis();
- $('<li></li>').data('group', allowedGroup).append(group).appendTo(allowedGroups);
- };
-
- return {
- init: function () {
- // initialize the properties tabs
- $('#secure-port-details-tabs').tabbs({
- tabStyle: 'tab',
- selectedTabStyle: 'selected-tab',
- tabs: [{
- name: 'Settings',
- tabContentId: 'read-only-secure-port-settings-tab-content'
- }, {
- name: 'Access Control',
- tabContentId: 'read-only-secure-port-access-control-tab-content'
- }]
- });
-
- // configure the processor details dialog
- $('#secure-port-details').modal({
- headerText: 'Secure Port Details',
- overlayBackground: true,
- buttons: [{
- buttonText: 'Ok',
- handler: {
- click: function () {
- // hide the dialog
- $('#secure-port-details').modal('hide');
- }
- }
- }],
- handler: {
- close: function () {
- // clear the processor details
- nf.Common.clearField('read-only-secure-port-name');
- nf.Common.clearField('read-only-secure-port-id');
- nf.Common.clearField('read-only-secure-port-comments');
- nf.Common.clearField('read-only-secure-port-concurrent-tasks');
-
- // clear the access control
- $('#read-only-allowed-users').empty();
- $('#read-only-allowed-groups').empty();
- }
- }
- }).draggable({
- containment: 'parent',
- handle: '.dialog-header'
- });
- },
-
- showDetails: function (selection) {
- // if the specified component is a port, load its properties
- if (nf.CanvasUtils.isInputPort(selection) || nf.CanvasUtils.isOutputPort(selection)) {
- var selectionData = selection.datum();
-
- // populate the port settings
- nf.Common.populateField('read-only-secure-port-name', selectionData.component.name);
- nf.Common.populateField('read-only-secure-port-id', selectionData.component.id);
- nf.Common.populateField('read-only-secure-port-concurrent-tasks', selectionData.component.concurrentlySchedulableTaskCount);
- nf.Common.populateField('read-only-secure-port-comments', selectionData.component.comments);
-
- // add allowed users
- $.each(selectionData.component.userAccessControl, function (_, allowedUser) {
- addAllowedUser(allowedUser);
- });
-
- // add allowed groups
- $.each(selectionData.component.groupAccessControl, function (_, allowedGroup) {
- addAllowedGroup(allowedGroup);
- });
-
- // show the details
- $('#secure-port-details').modal('show');
- }
- }
- };
-}());
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/nifi/blob/153f63ef/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 92e830b..a4e627e 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
@@ -30,9 +30,9 @@ nf.Settings = (function () {
controllerConfig: '../nifi-api/controller/config',
controllerArchive: '../nifi-api/controller/archive',
controllerServiceTypes: '../nifi-api/controller/controller-service-types',
- controllerServices: '../nifi-api/controller/controller-services',
+ controllerServices: '../nifi-api/controller-services',
reportingTaskTypes: '../nifi-api/controller/reporting-task-types',
- reportingTasks: '../nifi-api/controller/reporting-tasks'
+ reportingTasks: '../nifi-api/reporting-tasks'
}
};
@@ -297,8 +297,6 @@ nf.Settings = (function () {
* @param {string} controllerServiceType
*/
var addControllerService = function (controllerServiceType) {
- var revision = nf.Client.getRevision();
-
// get the desired availability
var availability;
if (nf.Canvas.isClustered()) {
@@ -306,17 +304,22 @@ nf.Settings = (function () {
} else {
availability = config.node;
}
+
+ // build the controller service entity
+ var controllerServiceEntity = {
+ 'revision': nf.Client.getRevision(),
+ 'controllerService': {
+ 'type': controllerServiceType
+ }
+ };
// add the new controller service
var addService = $.ajax({
type: 'POST',
url: config.urls.controllerServices + '/' + encodeURIComponent(availability),
- data: {
- version: revision.version,
- clientId: revision.clientId,
- type: controllerServiceType
- },
- dataType: 'json'
+ data: JSON.stringify(controllerServiceEntity),
+ dataType: 'json',
+ contentType: 'application/json'
}).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
@@ -1030,8 +1033,6 @@ nf.Settings = (function () {
* @param {string} reportingTaskType
*/
var addReportingTask = function (reportingTaskType) {
- var revision = nf.Client.getRevision();
-
// get the desired availability
var availability;
if (nf.Canvas.isClustered()) {
@@ -1039,17 +1040,22 @@ nf.Settings = (function () {
} else {
availability = config.node;
}
+
+ // build the reporting task entity
+ var reportingTaskEntity = {
+ 'revision': nf.Client.getRevision(),
+ 'reportingTask': {
+ 'type': reportingTaskType
+ }
+ };
// add the new reporting task
var addTask = $.ajax({
type: 'POST',
url: config.urls.reportingTasks + '/' + encodeURIComponent(availability),
- data: {
- version: revision.version,
- clientId: revision.clientId,
- type: reportingTaskType
- },
- dataType: 'json'
+ data: JSON.stringify(reportingTaskEntity),
+ dataType: 'json',
+ contentType: 'application/json'
}).done(function (response) {
// update the revision
nf.Client.setRevision(response.revision);
http://git-wip-us.apache.org/repos/asf/nifi/blob/153f63ef/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-snippet.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-snippet.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-snippet.js
index e2e958c..750b36b 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-snippet.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-snippet.js
@@ -22,7 +22,7 @@ nf.Snippet = (function () {
var config = {
urls: {
snippets: '../nifi-api/controller/snippets',
- processGroups: '../nifi-api/controller/process-groups'
+ processGroups: '../nifi-api/process-groups'
}
};
http://git-wip-us.apache.org/repos/asf/nifi/blob/153f63ef/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-model.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-model.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-model.js
index 48194b5..695912c 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-model.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-model.js
@@ -123,7 +123,7 @@
// perform query...
var xhr = $.ajax({
type: 'GET',
- url: '../nifi-api/controller/history',
+ url: '../nifi-api/history',
data: query,
dataType: 'json'
}).done(function (response) {
http://git-wip-us.apache.org/repos/asf/nifi/blob/153f63ef/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-table.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-table.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-table.js
index 1938d85..3ffaae4 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-table.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-table.js
@@ -31,7 +31,7 @@ nf.HistoryTable = (function () {
hidden: 'hidden'
},
urls: {
- history: '../nifi-api/controller/history'
+ history: '../nifi-api/history'
}
};
http://git-wip-us.apache.org/repos/asf/nifi/blob/153f63ef/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js
index 409e811..f9702ef 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js
@@ -48,7 +48,7 @@ nf.ConnectionDetails = (function () {
var initializeSourceProcessor = function (groupId, groupName, source) {
return $.ajax({
type: 'GET',
- url: '../nifi-api/controller/process-groups/' + encodeURIComponent(groupId) + '/processors/' + encodeURIComponent(source.id),
+ url: '../nifi-api/processors/' + encodeURIComponent(source.id),
dataType: 'json'
}).done(function (response) {
var processor = response.processor;
@@ -88,7 +88,7 @@ nf.ConnectionDetails = (function () {
var initializeRemoteSourcePort = function (groupId, groupName, source) {
return $.ajax({
type: 'GET',
- url: '../nifi-api/controller/process-groups/' + encodeURIComponent(groupId) + '/remote-process-groups/' + encodeURIComponent(source.groupId),
+ url: '../nifi-api/remote-process-groups/' + encodeURIComponent(source.groupId),
data: {
verbose: true
},
@@ -122,7 +122,7 @@ nf.ConnectionDetails = (function () {
} else {
$.ajax({
type: 'GET',
- url: '../nifi-api/controller/process-groups/' + encodeURIComponent(source.groupId),
+ url: '../nifi-api/process-groups/' + encodeURIComponent(source.groupId),
data: {
verbose: true
},
@@ -173,7 +173,7 @@ nf.ConnectionDetails = (function () {
return $.Deferred(function (deferred) {
$.ajax({
type: 'GET',
- url: '../nifi-api/controller/process-groups/' + encodeURIComponent(groupId) + '/processors/' + encodeURIComponent(destination.id),
+ url: '../nifi-api/processors/' + encodeURIComponent(destination.id),
dataType: 'json'
}).done(function (response) {
var processor = response.processor;
@@ -218,7 +218,7 @@ nf.ConnectionDetails = (function () {
var initializeDestinationRemotePort = function (groupId, groupName, destination) {
return $.ajax({
type: 'GET',
- url: '../nifi-api/controller/process-groups/' + encodeURIComponent(groupId) + '/remote-process-groups/' + encodeURIComponent(destination.groupId),
+ url: '../nifi-api/remote-process-groups/' + encodeURIComponent(destination.groupId),
data: {
verbose: true
},
@@ -252,7 +252,7 @@ nf.ConnectionDetails = (function () {
} else {
$.ajax({
type: 'GET',
- url: '../nifi-api/controller/process-groups/' + encodeURIComponent(destination.groupId),
+ url: '../nifi-api/process-groups/' + encodeURIComponent(destination.groupId),
data: {
verbose: true
},
@@ -367,14 +367,14 @@ nf.ConnectionDetails = (function () {
// get the group details
var groupXhr = $.ajax({
type: 'GET',
- url: '../nifi-api/controller/process-groups/' + encodeURIComponent(groupId),
+ url: '../nifi-api/process-groups/' + encodeURIComponent(groupId),
dataType: 'json'
});
// get the connection details
var connectionXhr = $.ajax({
type: 'GET',
- url: '../nifi-api/controller/process-groups/' + encodeURIComponent(groupId) + '/connections/' + encodeURIComponent(connectionId),
+ url: '../nifi-api/connections/' + encodeURIComponent(connectionId),
dataType: 'json'
});
http://git-wip-us.apache.org/repos/asf/nifi/blob/153f63ef/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js
index 533e7be..29579dd 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js
@@ -140,7 +140,7 @@ nf.ProcessorDetails = (function () {
// load the properties for the specified processor
var getProcessor = $.ajax({
type: 'GET',
- url: '../nifi-api/controller/process-groups/' + encodeURIComponent(groupId) + '/processors/' + encodeURIComponent(processorId),
+ url: '../nifi-api/processors/' + encodeURIComponent(processorId),
dataType: 'json'
}).done(function (response) {
if (nf.Common.isDefinedAndNotNull(response.processor)) {
@@ -199,7 +199,7 @@ nf.ProcessorDetails = (function () {
// get the processor history
var getProcessorHistory = $.ajax({
type: 'GET',
- url: '../nifi-api/controller/history/processors/' + encodeURIComponent(processorId),
+ url: '../nifi-api/history/processors/' + encodeURIComponent(processorId),
dataType: 'json'
}).done(function (response) {
var processorHistory = response.componentHistory;
http://git-wip-us.apache.org/repos/asf/nifi/blob/153f63ef/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js
index 57f91fb..8396ee0 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js
@@ -33,7 +33,8 @@ nf.StatusHistory = (function () {
label: 'Label'
},
urls: {
- processGroups: '../nifi-api/controller/process-groups/'
+ api: '../nifi-api',
+ processGroups: '../nifi-api/process-groups/'
}
};
@@ -1099,7 +1100,7 @@ nf.StatusHistory = (function () {
showConnectionChart: function (groupId, connectionId, selectedDescriptor) {
$.ajax({
type: 'GET',
- url: config.urls.processGroups + encodeURIComponent(groupId) + '/connections/' + encodeURIComponent(connectionId) + '/status/history',
+ url: config.urls.api + '/connections/' + encodeURIComponent(connectionId) + '/status/history',
dataType: 'json'
}).done(function (response) {
handleStatusHistoryResponse(groupId, connectionId, response.statusHistory, config.type.connection, selectedDescriptor);
@@ -1116,7 +1117,7 @@ nf.StatusHistory = (function () {
showProcessorChart: function (groupId, processorId, selectedDescriptor) {
$.ajax({
type: 'GET',
- url: config.urls.processGroups + encodeURIComponent(groupId) + '/processors/' + encodeURIComponent(processorId) + '/status/history',
+ url: config.urls.api + '/processors/' + encodeURIComponent(processorId) + '/status/history',
dataType: 'json'
}).done(function (response) {
handleStatusHistoryResponse(groupId, processorId, response.statusHistory, config.type.processor, selectedDescriptor);
@@ -1150,7 +1151,7 @@ nf.StatusHistory = (function () {
showRemoteProcessGroupChart: function (groupId, remoteProcessGroupId, selectedDescriptor) {
$.ajax({
type: 'GET',
- url: config.urls.processGroups + encodeURIComponent(groupId) + '/remote-process-groups/' + encodeURIComponent(remoteProcessGroupId) + '/status/history',
+ url: config.urls.api + '/remote-process-groups/' + encodeURIComponent(remoteProcessGroupId) + '/status/history',
dataType: 'json'
}).done(function (response) {
handleStatusHistoryResponse(groupId, remoteProcessGroupId, response.statusHistory, config.type.remoteProcessGroup, selectedDescriptor);
http://git-wip-us.apache.org/repos/asf/nifi/blob/153f63ef/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-cluster-search.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-cluster-search.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-cluster-search.js
index 9bab660..0c9fe36 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-cluster-search.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-cluster-search.js
@@ -22,7 +22,7 @@ nf.ClusterSearch = (function () {
search: 'Search nodes',
urls: {
clusterSearch: '../nifi-api/cluster/search-results',
- status: '../nifi-api/controller/process-groups/root/status',
+ status: '../nifi-api/process-groups/root/status',
systemDiagnostics: '../nifi-api/system-diagnostics'
}
};
http://git-wip-us.apache.org/repos/asf/nifi/blob/153f63ef/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary-table.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary-table.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary-table.js
index 49ad85b..fcd59aa 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary-table.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary-table.js
@@ -27,8 +27,9 @@ nf.SummaryTable = (function () {
filterList: 'summary-filter-list'
},
urls: {
- status: '../nifi-api/controller/process-groups/root/status',
- processGroups: '../nifi-api/controller/process-groups/',
+ api: '../nifi-api',
+ status: '../nifi-api/process-groups/root/status',
+ processGroups: '../nifi-api/process-groups/',
systemDiagnostics: '../nifi-api/system-diagnostics',
controllerConfig: '../nifi-api/controller/config',
d3Script: 'js/d3/d3.min.js',
@@ -2161,7 +2162,7 @@ nf.SummaryTable = (function () {
// get the summary
$.ajax({
type: 'GET',
- url: config.urls.processGroups + encodeURIComponent(groupId) + '/processors/' + encodeURIComponent(processorId) + '/status',
+ url: config.urls.api + '/processors/' + encodeURIComponent(processorId) + '/status',
data: {
nodewise: true
},
@@ -2218,7 +2219,7 @@ nf.SummaryTable = (function () {
// get the summary
$.ajax({
type: 'GET',
- url: config.urls.processGroups + encodeURIComponent(groupId) + '/connections/' + encodeURIComponent(connectionId) + '/status',
+ url: config.urls.api + '/connections/' + encodeURIComponent(connectionId) + '/status',
data: {
nodewise: true
},
@@ -2331,7 +2332,7 @@ nf.SummaryTable = (function () {
// get the summary
$.ajax({
type: 'GET',
- url: config.urls.processGroups + encodeURIComponent(groupId) + '/input-ports/' + encodeURIComponent(inputPortId) + '/status',
+ url: config.urls.api + '/input-ports/' + encodeURIComponent(inputPortId) + '/status',
data: {
nodewise: true
},
@@ -2383,7 +2384,7 @@ nf.SummaryTable = (function () {
// get the summary
$.ajax({
type: 'GET',
- url: config.urls.processGroups + encodeURIComponent(groupId) + '/output-ports/' + encodeURIComponent(outputPortId) + '/status',
+ url: config.urls.api + '/output-ports/' + encodeURIComponent(outputPortId) + '/status',
data: {
nodewise: true
},
@@ -2435,7 +2436,7 @@ nf.SummaryTable = (function () {
// get the summary
$.ajax({
type: 'GET',
- url: config.urls.processGroups + encodeURIComponent(groupId) + '/remote-process-groups/' + encodeURIComponent(remoteProcessGroupId) + '/status',
+ url: config.urls.api + '/remote-process-groups/' + encodeURIComponent(remoteProcessGroupId) + '/status',
data: {
nodewise: true
},