Repository: nifi
Updated Branches:
  refs/heads/master 189b4ad63 -> 220a870a1


NIFI-2697: Fix opening Remote Ports dialog.

If there is an unconnected remote port, right clicking a Remote Process Group
then select 'Remote Ports' causes a JS error saying 'Uncaught TypeError'.
Because there are few code paths those don't return the created
transmissionSwitch value from createPortOption function in
nf-remote-process-group-ports.js.

Signed-off-by: Scott Aslan <[email protected]>

This closes #1679


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

Branch: refs/heads/master
Commit: 220a870a1ece8c6cff589321de13e99850748e92
Parents: 189b4ad
Author: ijokarumawak <[email protected]>
Authored: Tue Apr 18 19:54:37 2017 +0900
Committer: Scott Aslan <[email protected]>
Committed: Tue Apr 18 16:08:10 2017 -0400

----------------------------------------------------------------------
 .../main/webapp/js/nf/canvas/nf-remote-process-group-ports.js  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/220a870a/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 f06182b..519a00b 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
@@ -262,14 +262,14 @@
                         if (port.exists === true) {
                             transmissionSwitch = 
(nfNgBridge.injector.get('$compile')($('<md-switch style="margin:0px" 
class="md-primary enabled-inactive-transmission" aria-label="Toggle port 
transmission"></md-switch>'))(nfNgBridge.rootScope));
                         } else {
-                            (nfNgBridge.injector.get('$compile')($('<md-switch 
ng-disabled="true" style="margin:0px" class="md-primary 
disabled-inactive-transmission" aria-label="Toggle port 
transmission"></md-switch>'))(nfNgBridge.rootScope));
+                            transmissionSwitch = 
(nfNgBridge.injector.get('$compile')($('<md-switch ng-disabled="true" 
style="margin:0px" class="md-primary disabled-inactive-transmission" 
aria-label="Toggle port transmission"></md-switch>'))(nfNgBridge.rootScope));
                         }
                     }
                 } else {
                     if (port.transmitting === true) {
-                        (nfNgBridge.injector.get('$compile')($('<md-switch 
style="margin:0px" class="md-primary disabled-active-transmission" 
aria-label="Toggle port transmission"></md-switch>'))(nfNgBridge.rootScope));
+                        transmissionSwitch = 
(nfNgBridge.injector.get('$compile')($('<md-switch style="margin:0px" 
class="md-primary disabled-active-transmission" aria-label="Toggle port 
transmission"></md-switch>'))(nfNgBridge.rootScope));
                     } else {
-                        (nfNgBridge.injector.get('$compile')($('<md-switch 
ng-disabled="true" style="margin:0px" class="md-primary 
disabled-inactive-transmission" aria-label="Toggle port 
transmission"></md-switch>'))(nfNgBridge.rootScope));
+                        transmissionSwitch = 
(nfNgBridge.injector.get('$compile')($('<md-switch ng-disabled="true" 
style="margin:0px" class="md-primary disabled-inactive-transmission" 
aria-label="Toggle port transmission"></md-switch>'))(nfNgBridge.rootScope));
                     }
                 }
 

Reply via email to