From issues-return-84679-archive-asf-public=cust-asf.ponee.io@nifi.apache.org Tue Sep 10 13:33:59 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id C391F180642 for ; Tue, 10 Sep 2019 15:33:58 +0200 (CEST) Received: (qmail 9153 invoked by uid 500); 10 Sep 2019 13:33:58 -0000 Mailing-List: contact issues-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list issues@nifi.apache.org Received: (qmail 9144 invoked by uid 99); 10 Sep 2019 13:33:58 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Sep 2019 13:33:58 +0000 From: GitBox To: issues@nifi.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 Message-ID: <156812243809.18857.12217918165901946092.gitbox@gitbox.apache.org> Date: Tue, 10 Sep 2019 13:33:58 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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 how many connections components the user selected ---------------------------------------------------------------- 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