From 372a316debcf271ff959d09b57e3b25f05c68cb6 Mon Sep 17 00:00:00 2001 From: Matt Gilman Date: Fri, 29 Jul 2016 10:36:25 -0400 Subject: [PATCH] NIFI-2401: - Returning the enabled state of play and stop buttons in the palette. Allowing the user to always press if they have permissions to modify the selection. - Only attempting to schedule components that are not running, not disabled, and valid. This closes #745 Signed-off-by: jpercivall --- .../src/main/java/org/apache/nifi/groups/ProcessGroup.java | 6 +++--- .../src/main/webapp/WEB-INF/partials/canvas/navigation.jsp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/groups/ProcessGroup.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/groups/ProcessGroup.java index e989c84086..d06d49cbb2 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/groups/ProcessGroup.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/groups/ProcessGroup.java @@ -50,7 +50,7 @@ public interface ProcessGroup extends Authorizable, Positionable { /** * Predicate for filtering schedulable Processors. */ - Predicate SCHEDULABLE_PROCESSORS = node -> !node.isRunning() && node.getScheduledState() != ScheduledState.DISABLED; + Predicate SCHEDULABLE_PROCESSORS = node -> !node.isRunning() && !ScheduledState.DISABLED.equals(node.getScheduledState()) && node.isValid(); /** * Predicate for filtering unschedulable Processors. @@ -60,12 +60,12 @@ public interface ProcessGroup extends Authorizable, Positionable { /** * Predicate for filtering schedulable Ports */ - Predicate SCHEDULABLE_PORTS = port -> port.getScheduledState() != ScheduledState.DISABLED; + Predicate SCHEDULABLE_PORTS = port -> !port.isRunning() && !ScheduledState.DISABLED.equals(port.getScheduledState()) && port.isValid(); /** * Predicate for filtering schedulable Ports */ - Predicate UNSCHEDULABLE_PORTS = port -> port.getScheduledState() == ScheduledState.RUNNING; + Predicate UNSCHEDULABLE_PORTS = port -> ScheduledState.RUNNING.equals(port.getScheduledState()); /** * @return a reference to this ProcessGroup's parent. This will be diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/navigation.jsp b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/navigation.jsp index 7babfa0ec8..b09382fb94 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/navigation.jsp +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/navigation.jsp @@ -120,13 +120,13 @@