You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/03/07 03:41:51 UTC

[GitHub] [nifi] eduardofontes commented on a change in pull request #5247: NIFI-8927 - Add option to start/stop all controllers

eduardofontes commented on a change in pull request #5247:
URL: https://github.com/apache/nifi/pull/5247#discussion_r820359858



##########
File path: nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
##########
@@ -845,6 +845,116 @@
             }
         },
 
+        /**
+         * Enable all controller services in the specified ProcessGroup.
+         *
+         * @argument {selection} selection      The selection
+         * @argument {cb} callback              The function to call when request is processed
+         */
+         enableAllControllerServices: function (selection,cb) {
+            if (selection.empty()) {
+                // build the entity
+                var entity = {
+                    'id': nfCanvasUtils.getGroupId(),
+                    'state': 'ENABLED'
+                };
+                updateResource(config.urls.api + '/flow/process-groups/' + encodeURIComponent(nfCanvasUtils.getGroupId()) + '/controller-services', entity).done(updateProcessGroup);
+            } else {
+                var componentsToStart = selection.filter(function (d) {

Review comment:
       @mcgilman I've refactored the functions and now they're simpler.




-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org