From 47c6718fe26c27b957f6b4a30f57eaf4089630ec Mon Sep 17 00:00:00 2001 From: Matt Gilman Date: Fri, 17 Mar 2017 08:15:28 -0400 Subject: [PATCH] NIFI-3615: - Removing hidden control characters. This closes #1599 Signed-off-by: Scott Aslan --- .../src/main/webapp/js/nf/canvas/nf-canvas-utils.js | 2 +- .../src/main/webapp/js/nf/canvas/nf-connection.js | 12 ++++++------ .../src/main/webapp/js/nf/canvas/nf-process-group.js | 12 ++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js index 4fb31c9f48..055157fd77 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js @@ -115,7 +115,7 @@ // refresh all component types as necessary (handle components that have been removed) componentMap.forEach(function (type, ids) { nfCanvasUtils.getComponentByType(type).remove(ids); - });

 + }); // refresh the birdseye nfBirdseye.refresh(); diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-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 d7e2e3acc2..14f6880780 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 @@ -1931,7 +1931,7 @@ * * @argument {selection} selection The selection */ - isDisconnected: function (selection) {
 + isDisconnected: function (selection) { // if nothing is selected return if (selection.empty()) { @@ -1939,20 +1939,20 @@ } var connections = d3.map(); var components = d3.map(); - var isDisconnected = true;

 + var isDisconnected = true; // include connections selection.filter(function (d) { return d.type === 'Connection'; }).each(function (d) { connections.set(d.id, d); - });

 + }); // include components and ensure their connections are included selection.filter(function (d) { return d.type !== 'Connection'; }).each(function (d) { - components.set(d.id, d.component);

 + components.set(d.id, d.component); // check all connections of this component $.each(nfConnection.getComponentConnections(d.id), function (_, connection) { @@ -1962,11 +1962,11 @@ } }); }); - if (isDisconnected) {
 + if (isDisconnected) { // go through each connection to ensure its source and destination are included connections.forEach(function (id, connection) { - if (isDisconnected) {
 + if (isDisconnected) { // determine whether this connection and its components are included within the selection isDisconnected = components.has(nfCanvasUtils.getConnectionSourceComponentId(connection)) && components.has(nfCanvasUtils.getConnectionDestinationComponentId(connection)); 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 75f1916835..bec3d6c360 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 @@ -1256,23 +1256,23 @@ * * @param {string} groupId */ - enterGroup: function (groupId) {
 + enterGroup: function (groupId) { // hide the context menu - nfContextMenu.hide();

 + nfContextMenu.hide(); // set the new group id - nfCanvasUtils.setGroupId(groupId);

 + nfCanvasUtils.setGroupId(groupId); // reload the graph - return nfCanvasUtils.reload().done(function () {
 + return nfCanvasUtils.reload().done(function () { // attempt to restore the view - var viewRestored = nfCanvasUtils.restoreUserView();

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

 + nfCanvasUtils.fitCanvasView(); // refresh the canvas nfCanvasUtils.refreshCanvasView({