patricker commented on a change in pull request #3440: NIFI-6221 Adding 
'Download' and 'View' content buttons to List Queue
URL: https://github.com/apache/nifi/pull/3440#discussion_r277104829
 
 

 ##########
 File path: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-queue-listing.js
 ##########
 @@ -204,32 +204,48 @@
             });
         }
 
-        // add an actions column when the user can access provenance
-        if (nfCommon.canAccessProvenance()) {
-            // function for formatting actions
-            var actionsFormatter = function () {
-                return '<div title="Provenance" class="pointer icon 
icon-provenance view-provenance"></div>';
-            };
+        // function for formatting actions column
+        var actionsFormatter = function (row,cell,value,columnDef,dataContext) 
{
+            var formatted = '';
+
+            var disabled = (dataContext.size > 0)?false:true;
+            formatted += '<div class="icon download-flowfile-content fa 
fa-download '+((disabled)?'disabled':'pointer')+'"'+
 
 Review comment:
   I was surprised to see that there is no security check, but this is how it 
happens in the details view also, so I guess it's good.

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

Reply via email to