rfellows commented on code in PR #8216:
URL: https://github.com/apache/nifi/pull/8216#discussion_r1445353180
##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/canvas-utils.service.ts:
##########
@@ -1200,4 +1200,198 @@ export class CanvasUtils {
}
return '#ffffff';
}
+
+ /**
+ * Determines if the components in the specified selection are runnable.
+ *
+ * @argument {d3.Selection} selection The selection
+ * @return {boolean} Whether the selection is runnable
+ */
+ public areRunnable(selection: d3.Selection<any, any, any, any>): boolean {
+ if (selection.empty()) {
+ return true;
+ }
+
+ let runnable = true;
+ selection.each((data, index, nodes): boolean => {
+ if (!this.isRunnable(d3.select(nodes[index]))) {
+ runnable = false;
+ return false;
Review Comment:
I returned a boolean to satisfy the return type. If i didn't it was an ugly
`: boolean | undefined`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]