mirror of https://github.com/apache/nifi.git
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 <joepercivall@yahoo.com>
This commit is contained in:
parent
4d17504a0f
commit
372a316deb
|
@ -50,7 +50,7 @@ public interface ProcessGroup extends Authorizable, Positionable {
|
|||
/**
|
||||
* Predicate for filtering schedulable Processors.
|
||||
*/
|
||||
Predicate<ProcessorNode> SCHEDULABLE_PROCESSORS = node -> !node.isRunning() && node.getScheduledState() != ScheduledState.DISABLED;
|
||||
Predicate<ProcessorNode> 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<Port> SCHEDULABLE_PORTS = port -> port.getScheduledState() != ScheduledState.DISABLED;
|
||||
Predicate<Port> SCHEDULABLE_PORTS = port -> !port.isRunning() && !ScheduledState.DISABLED.equals(port.getScheduledState()) && port.isValid();
|
||||
|
||||
/**
|
||||
* Predicate for filtering schedulable Ports
|
||||
*/
|
||||
Predicate<Port> UNSCHEDULABLE_PORTS = port -> port.getScheduledState() == ScheduledState.RUNNING;
|
||||
Predicate<Port> UNSCHEDULABLE_PORTS = port -> ScheduledState.RUNNING.equals(port.getScheduledState());
|
||||
|
||||
/**
|
||||
* @return a reference to this ProcessGroup's parent. This will be
|
||||
|
|
|
@ -120,13 +120,13 @@
|
|||
<div class="button-spacer-large"> </div>
|
||||
<div id="operate-start" class="action-button" title="Start">
|
||||
<button ng-click="appCtrl.nf.Actions['start'](appCtrl.nf.CanvasUtils.getSelection());"
|
||||
ng-disabled="!appCtrl.nf.CanvasUtils.areRunnable(appCtrl.nf.CanvasUtils.getSelection());">
|
||||
ng-disabled="!appCtrl.nf.CanvasUtils.getSelection().empty() && !appCtrl.nf.CanvasUtils.canModify(appCtrl.nf.CanvasUtils.getSelection());">
|
||||
<div class="graph-control-action-icon fa fa-play"></div></button>
|
||||
</div>
|
||||
<div class="button-spacer-small"> </div>
|
||||
<div id="operate-stop" class="action-button" title="Stop">
|
||||
<button ng-click="appCtrl.nf.Actions['stop'](appCtrl.nf.CanvasUtils.getSelection());"
|
||||
ng-disabled="!appCtrl.nf.CanvasUtils.areStoppable(appCtrl.nf.CanvasUtils.getSelection());">
|
||||
ng-disabled="!appCtrl.nf.CanvasUtils.getSelection().empty() && !appCtrl.nf.CanvasUtils.canModify(appCtrl.nf.CanvasUtils.getSelection());">
|
||||
<div class="graph-control-action-icon fa fa-stop"></div></button>
|
||||
</div>
|
||||
<div class="button-spacer-large"> </div>
|
||||
|
|
Loading…
Reference in New Issue