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 2015/02/21 22:36:58 UTC

[2/6] incubator-nifi git commit: NIFI-363: - Fixing 'Go to source' and 'Go to destination' when the component in question is a remote process group.

NIFI-363:
- Fixing 'Go to source' and 'Go to destination' when the component in question is a remote process group.

Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/57b5d589
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/57b5d589
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/57b5d589

Branch: refs/heads/NIFI-353
Commit: 57b5d589ad2c55394c2c96f53efd7e55a0e8c187
Parents: d76fe22
Author: Matt Gilman <ma...@gmail.com>
Authored: Thu Feb 19 07:47:58 2015 -0500
Committer: Matt Gilman <ma...@gmail.com>
Committed: Thu Feb 19 07:47:58 2015 -0500

----------------------------------------------------------------------
 .../src/main/webapp/js/nf/canvas/nf-actions.js  | 26 ++++++++++++++------
 1 file changed, 18 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/57b5d589/nifi/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/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
index 0af6198..880d767 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
@@ -185,12 +185,17 @@ nf.Actions = (function () {
             if (selection.size() === 1 && nf.CanvasUtils.isConnection(selection)) {
                 var selectionData = selection.datum();
 
-                // if the source is actually in another group
-                if (selectionData.component.source.groupId !== nf.Canvas.getGroupId()) {
-                    nf.CanvasUtils.showComponent(selectionData.component.source.groupId, selectionData.component.source.id);
-                } else {
+                // the source is in the current group
+                if (selectionData.component.source.groupId === nf.Canvas.getGroupId()) {
                     var source = d3.select('#id-' + selectionData.component.source.id);
                     nf.Actions.show(source);
+                } else if (selectionData.component.source.type === 'REMOTE_OUTPUT_PORT') {
+                    // if the source is remote
+                    var remoteSource = d3.select('#id-' + selectionData.component.source.groupId);
+                    nf.Actions.show(remoteSource);
+                } else {
+                    // if the source is local but in a sub group
+                    nf.CanvasUtils.showComponent(selectionData.component.source.groupId, selectionData.component.source.id);
                 }
             }
         },
@@ -204,12 +209,17 @@ nf.Actions = (function () {
             if (selection.size() === 1 && nf.CanvasUtils.isConnection(selection)) {
                 var selectionData = selection.datum();
 
-                // if the destination is actually in another group
-                if (selectionData.component.destination.groupId !== nf.Canvas.getGroupId()) {
-                    nf.CanvasUtils.showComponent(selectionData.component.destination.groupId, selectionData.component.destination.id);
-                } else {
+                // the destination is in the current group or its remote
+                if (selectionData.component.destination.groupId === nf.Canvas.getGroupId()) {
                     var destination = d3.select('#id-' + selectionData.component.destination.id);
                     nf.Actions.show(destination);
+                } else if (selectionData.component.destination.type === 'REMOTE_INPUT_PORT') {
+                    // if the destination is remote
+                    var remoteDestination = d3.select('#id-' + selectionData.component.destination.groupId);
+                    nf.Actions.show(remoteDestination);
+                } else {
+                    // if the destination is local but in a sub group
+                    nf.CanvasUtils.showComponent(selectionData.component.destination.groupId, selectionData.component.destination.id);
                 }
             }
         },