nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marka...@apache.org
Subject [2/3] nifi git commit: NIFI-1383: - Ensuring appropriate access and state prior to attempting an action with hot keys. - Fixing contrib-check issue.
Date Thu, 21 Jan 2016 20:34:35 GMT
NIFI-1383: - Ensuring appropriate access and state prior to attempting an action with hot keys.
- Fixing contrib-check issue.


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

Branch: refs/heads/NIFI-259
Commit: 53322c99ac0ec71d0bf2684d9b56c47b24b8774f
Parents: 561f5b7
Author: Matt Gilman <matt.c.gilman@gmail.com>
Authored: Fri Jan 15 13:04:44 2016 -0500
Committer: Matt Gilman <matt.c.gilman@gmail.com>
Committed: Thu Jan 21 12:39:45 2016 -0500

----------------------------------------------------------------------
 .../cluster/manager/impl/WebClusterManager.java |  4 +--
 .../src/main/webapp/js/nf/canvas/nf-canvas.js   | 27 +++++++++++++-------
 2 files changed, 20 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/53322c99/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/manager/impl/WebClusterManager.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/manager/impl/WebClusterManager.java
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/manager/impl/WebClusterManager.java
index cc73c28..6c37644 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/manager/impl/WebClusterManager.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/manager/impl/WebClusterManager.java
@@ -3467,8 +3467,8 @@ public class WebClusterManager implements HttpClusterManager, ProtocolHandler,
C
             final boolean allNodesFailed = problematicNodeResponses.size() == nodeResponses.size();
 
             // some nodes had a problematic response because of a missing counter, ensure
the are not disconnected
-            final boolean someNodesFailedMissingCounter = !problematicNodeResponses.isEmpty()
&&
-                problematicNodeResponses.size() < nodeResponses.size() && isMissingCounter(problematicNodeResponses,
uri);
+            final boolean someNodesFailedMissingCounter = !problematicNodeResponses.isEmpty()
+                && problematicNodeResponses.size() < nodeResponses.size() &&
isMissingCounter(problematicNodeResponses, uri);
 
             // ensure nodes stay connected in certain scenarios
             if (allNodesFailed || someNodesFailedMissingCounter) {

http://git-wip-us.apache.org/repos/asf/nifi/blob/53322c99/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
index 005f7e3..83d1b49 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
@@ -626,6 +626,9 @@ nf.Canvas = (function () {
                 return;
             }
 
+            // get the current selection
+            var selection = nf.CanvasUtils.getSelection();
+
             // handle shortcuts
             if (isCtrl) {
                 if (evt.keyCode === 82) {
@@ -640,22 +643,28 @@ nf.Canvas = (function () {
 
                     evt.preventDefault();
                 } else if (evt.keyCode === 67) {
-                    // ctrl-c
-                    nf.Actions.copy(nf.CanvasUtils.getSelection());
+                    if (nf.Common.isDFM() && nf.CanvasUtils.isCopyable(selection))
{
+                        // ctrl-c
+                        nf.Actions.copy(selection);
 
-                    evt.preventDefault();
+                        evt.preventDefault();
+                    }
                 } else if (evt.keyCode === 86) {
-                    // ctrl-p
-                    nf.Actions.paste();
+                    if (nf.Common.isDFM() && nf.CanvasUtils.isPastable()) {
+                        // ctrl-p
+                        nf.Actions.paste(selection);
 
-                    evt.preventDefault();
+                        evt.preventDefault();
+                    }
                 }
             } else {
                 if (evt.keyCode === 46) {
-                    // delete
-                    nf.Actions['delete'](nf.CanvasUtils.getSelection());
+                    if (nf.Common.isDFM() && nf.CanvasUtils.isDeletable(selection))
{
+                        // delete
+                        nf.Actions['delete'](selection);
 
-                    evt.preventDefault();
+                        evt.preventDefault();
+                    }
                 }
             }
         });


Mime
View raw message