Github user mcgilman commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2509#discussion_r184162346
--- Diff:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
---
@@ -741,8 +742,8 @@
}
});
- // show the execution node option if we're cluster or
we're currently configured to run on the primary node only
- if (nfClusterSummary.isClustered() || executionNode
=== 'PRIMARY') {
+ // show the execution node option if we're clustered
and execution node is not restricted to run only in primary node
+ if (nfClusterSummary.isClustered() &&
executionNodeRestricted !== true) {
--- End diff --
@zenfenan Sorry, I missed the mentions here. Always feel free to push
subsequent commits as we're working through the PR process. It's much easier to
review when I pull down the changes locally. What your suggesting above is
exactly what I was thinking. I agree that the conditional is a bit confusing. I
wonder if we attempt to break it up a little bit if it would be more clear.
Maybe something like
`
if (nfClusterSummary.isClustered()) {
if (executionNodeRestricted !== true ||
executionNode === 'ALL') {
$('#execution-node-options').show();
} else {
$('#execution-node-options').hide();
}
} else {
if (executionNode === 'PRIMARY') {
$('#execution-node-options').show();
} else {
$('#execution-node-options').hide();
}
}
`
Thoughts?
---