mcgilman commented on a change in pull request #3931: NIFI-6872: support
download flow
URL: https://github.com/apache/nifi/pull/3931#discussion_r358328611
##########
File path:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
##########
@@ -1377,6 +1377,26 @@
}
},
+ /**
+ * Downloads the current flow
+ */
+ downloadFlow: function (selection) {
+ var processGroupId = null;
+
+ if (selection.empty()) {
+ processGroupId = nfCanvasUtils.getGroupId();
+ } else if (selection.size() === 1) {
+ var selectionData = selection.datum();
+ if (nfCanvasUtils.isProcessGroup(selection)) {
+ processGroupId = selectionData.id;
+ }
+ }
+
+ if (processGroupId !== null) {
+ window.open('../nifi-api/process-groups/' +
encodeURIComponent(processGroupId) + '/download');
Review comment:
For when the user is authenticated and leveraging a token that is presented
in a HTTP header, we need to update this endpoint to utilize a One Time
Password which is included in a query parameter. This is necessary because the
code that adds the token to the header down not execute within the new window
from the `window.open` call.
Please check out provenance download or content download for an example.
----------------------------------------------------------------
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