nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [nifi] adarmiento commented on a change in pull request #3700: NIFI-6638: Empty multiple queues at once at different flow levels
Date Mon, 09 Sep 2019 13:30:40 GMT
adarmiento commented on a change in pull request #3700: NIFI-6638: Empty multiple queues at
once at different flow levels
URL: https://github.com/apache/nifi/pull/3700#discussion_r322240360
 
 

 ##########
 File path: nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
 ##########
 @@ -1086,183 +1497,173 @@
         },
 
         /**
-         * Deletes the flow files in the specified connection.
+         * Deletes the flow files inside the selected connections.
          *
          * @param {type} selection
          */
-        emptyQueue: function (selection) {
-            if (selection.size() !== 1 || !nfCanvasUtils.isConnection(selection)) {
-                return;
-            }
+        emptySelectedQueues: function (selection) {
+            var connections = selection.filter(function (d) {
+                var selectionItem = d3.select(this);
+                return nfCanvasUtils.isConnection(selectionItem);
+            });
+
+            var actionName = selection.size() > 1 ? 'Empty Selected Queues' : 'Empty Selected
Queue';
+
+            var dialogContent = selection.size() > 1
+                ? 'Are you sure you want to empty the selected queues? All FlowFiles waiting
at the time of the request will be removed.'
+                : 'Are you sure you want to empty the selected queue? All FlowFiles waiting
at the time of the request will be removed.';
 
             // prompt the user before emptying the queue
             nfDialog.showYesNoDialog({
-                headerText: 'Empty Queue',
-                dialogContent: 'Are you sure you want to empty this queue? All FlowFiles
waiting at the time of the request will be removed.',
+                headerText: actionName,
+                dialogContent: dialogContent,
 
 Review comment:
   Are you sure about this?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message