nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [nifi] VinceCastro commented on a change in pull request #3700: NIFI-6638: Empty multiple queues at once at different flow levels
Date Tue, 10 Sep 2019 13:28:49 GMT
VinceCastro 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_r322742302
 
 

 ##########
 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:
   Yep! Now the `headerText` and `dialogContent` are initialized depending on the specific
"empty queue" menu item the user clicked on

----------------------------------------------------------------
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