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_r322233145
##########
File path:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
##########
@@ -212,6 +212,417 @@
}).size() > 0;
};
+ /**
+ * Empty all the queues inside the array of connections.
+ *
+ * @Param {string} actionName
+ * @param {Array} connections
+ * @Param {Array} errors
+ *
+ */
+ var emptyQueues = function (actionName, connections, errors) {
+ var cancelled = false;
+ var finished = false;
+ var progressBarRefreshingDelay = 100; //millis
+
+ var dropRequests = [];
+ var dropRequestTimers = [];
+ var progressBarRefreshTimer = null;
+ var singleEmptyQueuePromises = [];
+
+ var createFailedResponse = function (xhr, status, error) {
+ return {
+ success: false,
+ xhr: xhr,
+ status: status,
+ error: error
+ };
+ };
+
+ var createSuccessResponse = function () {
+ return {
+ success: true
+ };
+ };
+
+ // set the progress bar to a certain percentage
+ var setProgressBar = function (percentComplete) {
+ if($("#drop-request-percent-complete .progress-label").length) {
Review comment:
```suggestion
if ($("#drop-request-percent-complete.progress-label").length) {
```
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services