Repository: nifi
Updated Branches:
  refs/heads/master a1bb94c08 -> ecca76099


NIFI-2427: - Only showing read/write data policies for applicable components. 
Disabling for labels, controller services, reporting tasks, and templates.

This closes #748

Signed-off-by: jpercivall <joeperciv...@yahoo.com>


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

Branch: refs/heads/master
Commit: ecca76099afea4944ce097981f14a4dd6b3c5142
Parents: a1bb94c
Author: Matt Gilman <matt.c.gil...@gmail.com>
Authored: Fri Jul 29 13:12:55 2016 -0400
Committer: jpercivall <joeperciv...@yahoo.com>
Committed: Tue Aug 2 16:25:02 2016 -0400

----------------------------------------------------------------------
 .../webapp/js/nf/canvas/nf-policy-management.js | 34 ++++++++++++++++++--
 1 file changed, 32 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/ecca7609/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 5415cda..6f0756c 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
@@ -974,6 +974,12 @@ nf.PolicyManagement = (function () {
                 .combo('setOptionEnabled', {
                     value: 'write-send-data'
                 }, false)
+                .combo('setOptionEnabled', {
+                    value: 'read-data'
+                }, false)
+                .combo('setOptionEnabled', {
+                    value: 'write-data'
+                }, false)
                 .combo('setSelectedOption', {
                     value: 'read-component'
                 });
@@ -1012,6 +1018,12 @@ nf.PolicyManagement = (function () {
                 .combo('setOptionEnabled', {
                     value: 'write-send-data'
                 }, false)
+                .combo('setOptionEnabled', {
+                    value: 'read-data'
+                }, false)
+                .combo('setOptionEnabled', {
+                    value: 'write-data'
+                }, false)
                 .combo('setSelectedOption', {
                     value: 'read-component'
                 });
@@ -1050,6 +1062,12 @@ nf.PolicyManagement = (function () {
                 .combo('setOptionEnabled', {
                     value: 'write-send-data'
                 }, false)
+                .combo('setOptionEnabled', {
+                    value: 'read-data'
+                }, false)
+                .combo('setOptionEnabled', {
+                    value: 'write-data'
+                }, false)
                 .combo('setSelectedOption', {
                     value: 'read-component'
                 });
@@ -1083,7 +1101,13 @@ nf.PolicyManagement = (function () {
                     }, false)
                     .combo('setOptionEnabled', {
                         value: 'write-send-data'
-                    }, false);
+                    }, false)
+                    .combo('setOptionEnabled', {
+                        value: 'read-data'
+                    }, true)
+                    .combo('setOptionEnabled', {
+                        value: 'write-data'
+                    }, true);
             } else {
                 var d = selection.datum();
                 $('#selected-policy-component-id').text(d.id);
@@ -1111,7 +1135,13 @@ nf.PolicyManagement = (function () {
                     }, nf.CanvasUtils.isInputPort(selection) && 
nf.Canvas.getParentGroupId() === null)
                     .combo('setOptionEnabled', {
                         value: 'write-send-data'
-                    }, nf.CanvasUtils.isOutputPort(selection) && 
nf.Canvas.getParentGroupId() === null);
+                    }, nf.CanvasUtils.isOutputPort(selection) && 
nf.Canvas.getParentGroupId() === null)
+                    .combo('setOptionEnabled', {
+                        value: 'read-data'
+                    }, !nf.CanvasUtils.isLabel(selection))
+                    .combo('setOptionEnabled', {
+                        value: 'write-data'
+                    }, !nf.CanvasUtils.isLabel(selection));
             }
 
             // populate the initial resource

Reply via email to