Github user scottyaslan commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1188#discussion_r87598252
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js
 ---
    @@ -470,6 +470,214 @@ nf.UsersTable = (function () {
         };
     
         /**
    +     * Initializes the user policies dialog.
    +     */
    +    var initUserPoliciesDialog = function () {
    +        $('#user-policies-dialog').modal({
    +            headerText: 'User Policies',
    +            buttons: [{
    +                buttonText: 'Close',
    +                color: {
    +                    base: '#728E9B',
    +                    hover: '#004849',
    +                    text: '#ffffff'
    +                },
    +                handler: {
    +                    click: function () {
    +                        //TODO: some work
    +
    +                        $('#user-policies-dialog').modal('hide');
    +                    }
    +                }
    +            }]
    +        });
    +    };
    +
    +    /**
    +     * Generates a human readable global policy strung.
    +     *
    +     * @param dataContext
    +     * @returns {string}
    +     */
    +    var globalResourceParser = function (dataContext) {
    +        return 'Global policy to ' +
    +            
nf.Common.getPolicyTypeListing(nf.Common.substringAfterFirst(dataContext.component.resource,
 '/')).text;
    +    };
    +
    +    /**
    +     * Generates a human readable component policy string.
    +     *
    +     * @param dataContext
    +     * @returns {string}
    +     */
    +    var componentResourceParser = function (dataContext) {
    +        var resource = dataContext.component.resource;
    +        var policyLabel = '';
    +
    +        //determine policy type
    +        if (resource.startsWith('/policies')) {
    +            resource = nf.Common.substringAfterFirst(resource, 
'/policies');
    +            policyLabel += 'Admin policy for ';
    +        } else if (resource.startsWith('/data-transfer')) {
    +            resource = nf.Common.substringAfterFirst(resource, 
'/data-transfer');
    +            policyLabel += 'Site to site policy for ';
    +        } else if (resource.startsWith('/data')) {
    +            resource = nf.Common.substringAfterFirst(resource, '/data');
    +            policyLabel += 'Data policy for ';
    +        } else {
    +            policyLabel += 'Component policy for ';
    +        }
    +
    +        if (resource.startsWith('/processors')) {
    +            policyLabel += 'processor ';
    +        } else if (resource.startsWith('/controller-services')) {
    +            policyLabel += 'controller services ';
    +        } else if (resource.startsWith('/funnels')) {
    +            policyLabel += 'funnel ';
    +        } else if (resource.startsWith('/input-ports')) {
    +            policyLabel += 'input port ';
    +        } else if (resource.startsWith('/labels')) {
    +            policyLabel += 'label ';
    +        } else if (resource.startsWith('/output-ports')) {
    +            policyLabel += 'output port ';
    +        } else if (resource.startsWith('/process-groups')) {
    +            policyLabel += 'process group ';
    +        } else if (resource.startsWith('/remote-process-groups')) {
    +            policyLabel += 'remote process group ';
    +        } else if (resource.startsWith('/reporting-tasks')) {
    +            policyLabel += 'reporting task ';
    +        } else if (resource.startsWith('/templates')) {
    +            policyLabel += 'template ';
    +        }
    +
    +        if (dataContext.component.componentReference.permissions.canRead 
=== true) {
    +            policyLabel += 
dataContext.component.componentReference.component.name;
    --- End diff --
    
    Maybe bold or italicized? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to