You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by mc...@apache.org on 2016/05/17 14:33:53 UTC

[3/7] nifi git commit: NIFI-1554: - Introducing ControllerService and ReportingTask authorization and revision. - Removing the revision where appropriate. NIFI-1883 - Restoring referencing components automatically. - This closes #448

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/SiteToSiteResource.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/SiteToSiteResource.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/SiteToSiteResource.java
index 055d11c..4ed39a7 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/SiteToSiteResource.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/SiteToSiteResource.java
@@ -19,26 +19,20 @@ package org.apache.nifi.web.api;
 import com.sun.jersey.api.core.ResourceContext;
 import com.wordnik.swagger.annotations.Api;
 import com.wordnik.swagger.annotations.ApiOperation;
-import com.wordnik.swagger.annotations.ApiParam;
 import com.wordnik.swagger.annotations.ApiResponse;
 import com.wordnik.swagger.annotations.ApiResponses;
 import com.wordnik.swagger.annotations.Authorization;
-import org.apache.commons.lang3.StringUtils;
 import org.apache.nifi.cluster.manager.impl.WebClusterManager;
 import org.apache.nifi.util.NiFiProperties;
 import org.apache.nifi.web.NiFiServiceFacade;
 import org.apache.nifi.web.api.dto.ControllerDTO;
-import org.apache.nifi.web.api.dto.RevisionDTO;
 import org.apache.nifi.web.api.entity.ControllerEntity;
-import org.apache.nifi.web.api.request.ClientIdParameter;
 
 import javax.ws.rs.Consumes;
-import javax.ws.rs.DefaultValue;
 import javax.ws.rs.GET;
 import javax.ws.rs.HttpMethod;
 import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
@@ -63,7 +57,6 @@ public class SiteToSiteResource extends ApplicationResource {
     /**
      * Returns the details of this NiFi.
      *
-     * @param clientId Optional client id. If the client id is not specified, a new one will be generated. This value (whether specified or generated) is included in the response.
      * @return A controllerEntity.
      */
     @GET
@@ -83,12 +76,7 @@ public class SiteToSiteResource extends ApplicationResource {
                 @ApiResponse(code = 409, message = "The request was valid but NiFi was not in the appropriate state to process it. Retrying the same request later may be successful.")
             }
     )
-    public Response getController(
-            @ApiParam(
-                    value = "If the client id is not specified, new one will be generated. This value (whether specified or generated) is included in the response.",
-                    required = false
-            )
-            @QueryParam(CLIENT_ID) @DefaultValue(StringUtils.EMPTY) ClientIdParameter clientId) {
+    public Response getController() {
 
         if (properties.isClusterManager()) {
             return clusterManager.applyRequest(HttpMethod.GET, getAbsolutePath(), getRequestParameters(true), getHeaders()).getResponse();
@@ -97,13 +85,8 @@ public class SiteToSiteResource extends ApplicationResource {
         // get the controller dto
         final ControllerDTO controller = serviceFacade.getController();
 
-        // create the revision
-        final RevisionDTO revision = new RevisionDTO();
-        revision.setClientId(clientId.getClientId());
-
         // build the response entity
         final ControllerEntity entity = new ControllerEntity();
-        entity.setRevision(revision);
         entity.setController(controller);
 
         // generate the response

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/SystemDiagnosticsResource.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/SystemDiagnosticsResource.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/SystemDiagnosticsResource.java
index 3d74f2e..b0383b0 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/SystemDiagnosticsResource.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/SystemDiagnosticsResource.java
@@ -22,7 +22,6 @@ import com.wordnik.swagger.annotations.ApiParam;
 import com.wordnik.swagger.annotations.ApiResponse;
 import com.wordnik.swagger.annotations.ApiResponses;
 import com.wordnik.swagger.annotations.Authorization;
-import org.apache.commons.lang3.StringUtils;
 import org.apache.nifi.authorization.Authorizer;
 import org.apache.nifi.cluster.manager.NodeResponse;
 import org.apache.nifi.cluster.manager.exception.UnknownNodeException;
@@ -31,10 +30,8 @@ import org.apache.nifi.cluster.node.Node;
 import org.apache.nifi.cluster.protocol.NodeIdentifier;
 import org.apache.nifi.util.NiFiProperties;
 import org.apache.nifi.web.NiFiServiceFacade;
-import org.apache.nifi.web.api.dto.RevisionDTO;
 import org.apache.nifi.web.api.dto.SystemDiagnosticsDTO;
 import org.apache.nifi.web.api.entity.SystemDiagnosticsEntity;
-import org.apache.nifi.web.api.request.ClientIdParameter;
 
 import javax.ws.rs.Consumes;
 import javax.ws.rs.DefaultValue;
@@ -66,9 +63,6 @@ public class SystemDiagnosticsResource extends ApplicationResource {
     /**
      * Gets the system diagnostics for this NiFi instance.
      *
-     * @param clientId Optional client id. If the client id is not specified, a
-     * new one will be generated. This value (whether specified or generated) is
-     * included in the response.
      * @return A systemDiagnosticsEntity.
      */
     @GET
@@ -91,11 +85,6 @@ public class SystemDiagnosticsResource extends ApplicationResource {
     )
     public Response getSystemDiagnostics(
             @ApiParam(
-                    value = "If the client id is not specified, new one will be generated. This value (whether specified or generated) is included in the response.",
-                    required = false
-            )
-            @QueryParam(CLIENT_ID) @DefaultValue(StringUtils.EMPTY) ClientIdParameter clientId,
-            @ApiParam(
                 value = "Whether or not to include the breakdown per node. Optional, defaults to false",
                 required = false
             )
@@ -140,13 +129,8 @@ public class SystemDiagnosticsResource extends ApplicationResource {
 
         final SystemDiagnosticsDTO systemDiagnosticsDto = serviceFacade.getSystemDiagnostics();
 
-        // create the revision
-        final RevisionDTO revision = new RevisionDTO();
-        revision.setClientId(clientId.getClientId());
-
         // create the response
         final SystemDiagnosticsEntity entity = new SystemDiagnosticsEntity();
-        entity.setRevision(revision);
         entity.setSystemDiagnostics(systemDiagnosticsDto);
 
         // generate the response

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/TemplateResource.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/TemplateResource.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/TemplateResource.java
index 6bb8a15..7893980 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/TemplateResource.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/TemplateResource.java
@@ -26,7 +26,6 @@ import org.apache.commons.lang3.StringUtils;
 import org.apache.nifi.cluster.manager.impl.WebClusterManager;
 import org.apache.nifi.util.NiFiProperties;
 import org.apache.nifi.web.NiFiServiceFacade;
-import org.apache.nifi.web.api.dto.RevisionDTO;
 import org.apache.nifi.web.api.dto.TemplateDTO;
 import org.apache.nifi.web.api.entity.TemplateEntity;
 import org.apache.nifi.web.api.request.ClientIdParameter;
@@ -204,13 +203,8 @@ public class TemplateResource extends ApplicationResource {
         // delete the specified template
         serviceFacade.deleteTemplate(id);
 
-        // create the revision
-        final RevisionDTO revision = new RevisionDTO();
-        revision.setClientId(clientId.getClientId());
-
         // build the response entity
         final TemplateEntity entity = new TemplateEntity();
-        entity.setRevision(revision);
 
         return clusterContext(generateOkResponse(entity)).build();
     }

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java
index cfbbc84..97c0c13 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java
@@ -56,7 +56,6 @@ import org.apache.nifi.connectable.Port;
 import org.apache.nifi.connectable.Position;
 import org.apache.nifi.controller.ConfiguredComponent;
 import org.apache.nifi.controller.ControllerService;
-import org.apache.nifi.controller.ControllerServiceLookup;
 import org.apache.nifi.controller.Counter;
 import org.apache.nifi.controller.ProcessorNode;
 import org.apache.nifi.controller.ReportingTaskNode;
@@ -73,7 +72,7 @@ import org.apache.nifi.controller.repository.FlowFileRecord;
 import org.apache.nifi.controller.repository.claim.ContentClaim;
 import org.apache.nifi.controller.repository.claim.ResourceClaim;
 import org.apache.nifi.controller.service.ControllerServiceNode;
-import org.apache.nifi.controller.service.ControllerServiceReference;
+import org.apache.nifi.controller.service.ControllerServiceProvider;
 import org.apache.nifi.controller.state.SortedStateUtils;
 import org.apache.nifi.controller.status.ConnectionStatus;
 import org.apache.nifi.controller.status.PortStatus;
@@ -134,7 +133,6 @@ import org.apache.nifi.web.api.dto.status.ProcessorStatusDTO;
 import org.apache.nifi.web.api.dto.status.ProcessorStatusSnapshotDTO;
 import org.apache.nifi.web.api.dto.status.RemoteProcessGroupStatusDTO;
 import org.apache.nifi.web.api.dto.status.RemoteProcessGroupStatusSnapshotDTO;
-import org.apache.nifi.web.api.entity.ControllerServiceReferencingComponentEntity;
 import org.apache.nifi.web.revision.RevisionManager;
 
 import javax.ws.rs.WebApplicationException;
@@ -160,7 +158,6 @@ import java.util.TreeSet;
 import java.util.concurrent.TimeUnit;
 import java.util.function.Function;
 import java.util.function.Supplier;
-import java.util.stream.Collectors;
 
 public final class DtoFactory {
 
@@ -172,7 +169,7 @@ public final class DtoFactory {
         }
     };
 
-    private ControllerServiceLookup controllerServiceLookup;
+    private ControllerServiceProvider controllerServiceProvider;
     private EntityFactory entityFactory;
     private Authorizer authorizer;
 
@@ -1192,9 +1189,6 @@ public final class DtoFactory {
             dto.getProperties().put(descriptor.getName(), propertyValue);
         }
 
-        // create the reference dto's
-        dto.setReferencingComponents(createControllerServiceReferencingComponentEntities(controllerServiceNode.getReferences()));
-
         // add the validation errors
         final Collection<ValidationResult> validationErrors = controllerServiceNode.getValidationErrors();
         if (validationErrors != null && !validationErrors.isEmpty()) {
@@ -1209,157 +1203,91 @@ public final class DtoFactory {
         return dto;
     }
 
-
-    // TODO: REMOVE THIS...
-    public Set<ControllerServiceReferencingComponentEntity> createControllerServiceReferencingComponentEntities(final ControllerServiceReference reference) {
-        final Set<ControllerServiceReferencingComponentDTO> dtos = createControllerServiceReferencingComponentsDto(reference);
-        final Set<ControllerServiceReferencingComponentEntity> entities = new HashSet<>(dtos.size());
-        for (final ControllerServiceReferencingComponentDTO dto : dtos) {
-            final ControllerServiceReferencingComponentEntity entity = new ControllerServiceReferencingComponentEntity();
-            entity.setControllerServiceReferencingComponent(dto);
-            entities.add(entity);
-        }
-
-        return entities;
-    }
-
-
     public ControllerServiceReferencingComponentDTO createControllerServiceReferencingComponentDTO(final ConfiguredComponent component) {
         final ControllerServiceReferencingComponentDTO dto = new ControllerServiceReferencingComponentDTO();
-
-        dto.setDescriptors(new HashMap<>());
-        dto.setGroupId(null); // TODO
         dto.setId(component.getIdentifier());
         dto.setName(component.getName());
-        dto.setProperties(convertProperties(component.getProperties()));
-        dto.setState(null); // TODO
-        dto.setType(null); // TODO
-        dto.setValidationErrors(component.getValidationErrors().stream().map(err -> err.toString()).collect(Collectors.toList()));
 
-        if (component instanceof ControllerServiceNode) {
-            final ControllerServiceNode serviceNode = (ControllerServiceNode) component;
-            final Set<ConfiguredComponent> refs = serviceNode.getReferences().getReferencingComponents();
-            final Set<ControllerServiceReferencingComponentDTO> refDtos = new HashSet<>(refs.size());
+        String processGroupId = null;
+        List<PropertyDescriptor> propertyDescriptors = null;
+        Collection<ValidationResult> validationErrors = null;
+        if (component instanceof ProcessorNode) {
+            final ProcessorNode node = ((ProcessorNode) component);
+            dto.setGroupId(node.getProcessGroup().getIdentifier());
+            dto.setState(node.getScheduledState().name());
+            dto.setActiveThreadCount(node.getActiveThreadCount());
+            dto.setType(node.getProcessor().getClass().getName());
+            dto.setReferenceType(Processor.class.getSimpleName());
+
+            propertyDescriptors = node.getProcessor().getPropertyDescriptors();
+            validationErrors = node.getValidationErrors();
+            processGroupId = node.getProcessGroup().getIdentifier();
+        } else if (component instanceof ControllerServiceNode) {
+            final ControllerServiceNode node = ((ControllerServiceNode) component);
+            dto.setState(node.getState().name());
+            dto.setType(node.getControllerServiceImplementation().getClass().getName());
+            dto.setReferenceType(ControllerService.class.getSimpleName());
+
+            propertyDescriptors = node.getControllerServiceImplementation().getPropertyDescriptors();
+            validationErrors = node.getValidationErrors();
+            processGroupId = node.getProcessGroup().getIdentifier();
+        } else if (component instanceof ReportingTaskNode) {
+            final ReportingTaskNode node = ((ReportingTaskNode) component);
+            dto.setState(node.getScheduledState().name());
+            dto.setActiveThreadCount(node.getActiveThreadCount());
+            dto.setType(node.getReportingTask().getClass().getName());
+            dto.setReferenceType(ReportingTask.class.getSimpleName());
+
+            propertyDescriptors = node.getReportingTask().getPropertyDescriptors();
+            validationErrors = node.getValidationErrors();
+            processGroupId = "root";
+        }
+
+        if (propertyDescriptors != null && !propertyDescriptors.isEmpty()) {
+            final Map<PropertyDescriptor, String> sortedProperties = new TreeMap<>(new Comparator<PropertyDescriptor>() {
+                @Override
+                public int compare(PropertyDescriptor o1, PropertyDescriptor o2) {
+                    return Collator.getInstance(Locale.US).compare(o1.getName(), o2.getName());
+                }
+            });
+            sortedProperties.putAll(component.getProperties());
 
-            for (final ConfiguredComponent ref : refs) {
-                refDtos.add(createControllerServiceReferencingComponentDTO(ref));
+            final Map<PropertyDescriptor, String> orderedProperties = new LinkedHashMap<>();
+            for (PropertyDescriptor descriptor : propertyDescriptors) {
+                orderedProperties.put(descriptor, null);
             }
-            dto.setReferencingComponents(refDtos);
-        }
-
-        return dto;
-    }
-
-    private Map<String, String> convertProperties(final Map<PropertyDescriptor, String> properties) {
-        final Map<String, String> converted = new HashMap<>(properties.size());
-        for (final Map.Entry<PropertyDescriptor, String> entry : properties.entrySet()) {
-            converted.put(entry.getKey().getDisplayName(), entry.getValue());
-        }
-        return converted;
-    }
-
-    public Set<ControllerServiceReferencingComponentDTO> createControllerServiceReferencingComponentsDto(final ControllerServiceReference reference) {
-        return createControllerServiceReferencingComponentsDto(reference, new HashSet<ControllerServiceNode>());
-    }
-
-    private Set<ControllerServiceReferencingComponentDTO> createControllerServiceReferencingComponentsDto(final ControllerServiceReference reference, final Set<ControllerServiceNode> visited) {
-        final Set<ControllerServiceReferencingComponentDTO> referencingComponents = new LinkedHashSet<>();
+            orderedProperties.putAll(sortedProperties);
 
-        // get all references
-        for (final ConfiguredComponent component : reference.getReferencingComponents()) {
-            final ControllerServiceReferencingComponentDTO dto = new ControllerServiceReferencingComponentDTO();
-            dto.setId(component.getIdentifier());
-            dto.setName(component.getName());
+            // build the descriptor and property dtos
+            dto.setDescriptors(new LinkedHashMap<String, PropertyDescriptorDTO>());
+            dto.setProperties(new LinkedHashMap<String, String>());
+            for (final Map.Entry<PropertyDescriptor, String> entry : orderedProperties.entrySet()) {
+                final PropertyDescriptor descriptor = entry.getKey();
 
-            String processGroupId = null;
-            List<PropertyDescriptor> propertyDescriptors = null;
-            Collection<ValidationResult> validationErrors = null;
-            if (component instanceof ProcessorNode) {
-                final ProcessorNode node = ((ProcessorNode) component);
-                dto.setGroupId(node.getProcessGroup().getIdentifier());
-                dto.setState(node.getScheduledState().name());
-                dto.setActiveThreadCount(node.getActiveThreadCount());
-                dto.setType(node.getProcessor().getClass().getName());
-                dto.setReferenceType(Processor.class.getSimpleName());
+                // store the property descriptor
+                dto.getDescriptors().put(descriptor.getName(), createPropertyDescriptorDto(descriptor, processGroupId));
 
-                propertyDescriptors = node.getProcessor().getPropertyDescriptors();
-                validationErrors = node.getValidationErrors();
-                processGroupId = node.getProcessGroup().getIdentifier();
-            } else if (component instanceof ControllerServiceNode) {
-                final ControllerServiceNode node = ((ControllerServiceNode) component);
-                dto.setState(node.getState().name());
-                dto.setType(node.getControllerServiceImplementation().getClass().getName());
-                dto.setReferenceType(ControllerService.class.getSimpleName());
-                dto.setReferenceCycle(visited.contains(node));
-
-                // if we haven't encountered this service before include it's referencing components
-                if (!dto.getReferenceCycle()) {
-                    dto.setReferencingComponents(createControllerServiceReferencingComponentsDto(node.getReferences(), visited));
-                }
-
-                propertyDescriptors = node.getControllerServiceImplementation().getPropertyDescriptors();
-                validationErrors = node.getValidationErrors();
-                processGroupId = node.getProcessGroup().getIdentifier();
-            } else if (component instanceof ReportingTaskNode) {
-                final ReportingTaskNode node = ((ReportingTaskNode) component);
-                dto.setState(node.getScheduledState().name());
-                dto.setActiveThreadCount(node.getActiveThreadCount());
-                dto.setType(node.getReportingTask().getClass().getName());
-                dto.setReferenceType(ReportingTask.class.getSimpleName());
-
-                propertyDescriptors = node.getReportingTask().getPropertyDescriptors();
-                validationErrors = node.getValidationErrors();
-                processGroupId = "root";
-            }
-
-            if (propertyDescriptors != null && !propertyDescriptors.isEmpty()) {
-                final Map<PropertyDescriptor, String> sortedProperties = new TreeMap<>(new Comparator<PropertyDescriptor>() {
-                    @Override
-                    public int compare(PropertyDescriptor o1, PropertyDescriptor o2) {
-                        return Collator.getInstance(Locale.US).compare(o1.getName(), o2.getName());
-                    }
-                });
-                sortedProperties.putAll(component.getProperties());
-
-                final Map<PropertyDescriptor, String> orderedProperties = new LinkedHashMap<>();
-                for (PropertyDescriptor descriptor : propertyDescriptors) {
-                    orderedProperties.put(descriptor, null);
+                // determine the property value - don't include sensitive properties
+                String propertyValue = entry.getValue();
+                if (propertyValue != null && descriptor.isSensitive()) {
+                    propertyValue = "********";
                 }
-                orderedProperties.putAll(sortedProperties);
 
-                // build the descriptor and property dtos
-                dto.setDescriptors(new LinkedHashMap<String, PropertyDescriptorDTO>());
-                dto.setProperties(new LinkedHashMap<String, String>());
-                for (final Map.Entry<PropertyDescriptor, String> entry : orderedProperties.entrySet()) {
-                    final PropertyDescriptor descriptor = entry.getKey();
-
-                    // store the property descriptor
-                    dto.getDescriptors().put(descriptor.getName(), createPropertyDescriptorDto(descriptor, processGroupId));
-
-                    // determine the property value - don't include sensitive properties
-                    String propertyValue = entry.getValue();
-                    if (propertyValue != null && descriptor.isSensitive()) {
-                        propertyValue = "********";
-                    }
-
-                    // set the property value
-                    dto.getProperties().put(descriptor.getName(), propertyValue);
-                }
+                // set the property value
+                dto.getProperties().put(descriptor.getName(), propertyValue);
             }
+        }
 
-            if (validationErrors != null && !validationErrors.isEmpty()) {
-                final List<String> errors = new ArrayList<>();
-                for (final ValidationResult validationResult : validationErrors) {
-                    errors.add(validationResult.toString());
-                }
-
-                dto.setValidationErrors(errors);
+        if (validationErrors != null && !validationErrors.isEmpty()) {
+            final List<String> errors = new ArrayList<>();
+            for (final ValidationResult validationResult : validationErrors) {
+                errors.add(validationResult.toString());
             }
 
-            referencingComponents.add(dto);
+            dto.setValidationErrors(errors);
         }
 
-        return referencingComponents;
+        return dto;
     }
 
     public RemoteProcessGroupPortDTO createRemoteProcessGroupPortDto(final RemoteGroupPort port) {
@@ -1700,6 +1628,11 @@ public final class DtoFactory {
         }
 
         // TODO - controller services once they are accessible from the group
+        for (final ControllerServiceNode controllerService : group.getControllerServices(false)) {
+            final RevisionDTO revision = createRevisionDTO(revisionManager.getRevision(controllerService.getIdentifier()));
+            final AccessPolicyDTO accessPolicy = createAccessPolicyDto(controllerService);
+            dto.getControllerServices().add(entityFactory.createControllerServiceEntity(createControllerServiceDto(controllerService), revision, accessPolicy));
+        }
 
         return dto;
     }
@@ -2373,8 +2306,9 @@ public final class DtoFactory {
                 dto.setAllowableValues(null);
             } else {
                 final List<AllowableValueDTO> allowableValues = new ArrayList<>();
-                for (final String serviceIdentifier : controllerServiceLookup.getControllerServiceIdentifiers(serviceDefinition, groupId)) {
-                    final String displayName = controllerServiceLookup.getControllerServiceName(serviceIdentifier);
+                for (final String serviceIdentifier : controllerServiceProvider.getControllerServiceIdentifiers(serviceDefinition, groupId)) {
+                    final ControllerServiceNode service = controllerServiceProvider.getControllerServiceNode(serviceIdentifier);
+                    final String displayName = service.isAuthorized(authorizer, RequestAction.READ) ? service.getName() : serviceIdentifier;
 
                     final AllowableValueDTO allowableValue = new AllowableValueDTO();
                     allowableValue.setDisplayName(displayName);
@@ -2415,7 +2349,6 @@ public final class DtoFactory {
     public ControllerServiceDTO copy(final ControllerServiceDTO original) {
         final ControllerServiceDTO copy = new ControllerServiceDTO();
         copy.setAnnotationData(original.getAnnotationData());
-        copy.setAvailability(original.getAvailability());
         copy.setComments(original.getComments());
         copy.setCustomUiUrl(original.getCustomUiUrl());
         copy.setDescriptors(copy(original.getDescriptors()));
@@ -2878,8 +2811,8 @@ public final class DtoFactory {
     }
 
     /* setters */
-    public void setControllerServiceLookup(ControllerServiceLookup lookup) {
-        this.controllerServiceLookup = lookup;
+    public void setControllerServiceProvider(ControllerServiceProvider controllerServiceProvider) {
+        this.controllerServiceProvider = controllerServiceProvider;
     }
 
     public void setAuthorizer(Authorizer authorizer) {

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/EntityFactory.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/EntityFactory.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/EntityFactory.java
index dae893d..2566820 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/EntityFactory.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/EntityFactory.java
@@ -145,20 +145,6 @@ public final class EntityFactory {
         return entity;
     }
 
-    public ControllerServiceEntity createControllerServiceEntity(final ControllerServiceDTO dto, final RevisionDTO revision, final AccessPolicyDTO accessPolicy) {
-        final ControllerServiceEntity entity = new ControllerServiceEntity();
-        entity.setRevision(revision);
-        if (dto != null) {
-            entity.setAccessPolicy(accessPolicy);
-            entity.setId(dto.getId());
-            entity.setPosition(dto.getPosition());
-            if (accessPolicy != null && accessPolicy.getCanRead()) {
-                entity.setControllerService(dto);
-            }
-        }
-        return entity;
-    }
-
     public RemoteProcessGroupEntity createRemoteProcessGroupEntity(
         final RemoteProcessGroupDTO dto, final RevisionDTO revision, final AccessPolicyDTO accessPolicy,final RemoteProcessGroupStatusDTO status) {
 
@@ -213,13 +199,27 @@ public final class EntityFactory {
             entity.setAccessPolicy(accessPolicy);
             entity.setId(dto.getId());
             if (accessPolicy != null && accessPolicy.getCanRead()) {
-                entity.setReportingTask(dto);
+                entity.setComponent(dto);
             }
         }
 
         return entity;
     }
 
+    public ControllerServiceEntity createControllerServiceEntity(final ControllerServiceDTO dto, final RevisionDTO revision, final AccessPolicyDTO accessPolicy) {
+        final ControllerServiceEntity entity = new ControllerServiceEntity();
+        entity.setRevision(revision);
+        if (dto != null) {
+            entity.setAccessPolicy(accessPolicy);
+            entity.setId(dto.getId());
+            entity.setPosition(dto.getPosition());
+            if (accessPolicy != null && accessPolicy.getCanRead()) {
+                entity.setComponent(dto);
+            }
+        }
+        return entity;
+    }
+
     public ControllerServiceReferencingComponentEntity createControllerServiceReferencingComponentEntity(
         final ControllerServiceReferencingComponentDTO dto, final RevisionDTO revision, final AccessPolicyDTO accessPolicy) {
 
@@ -229,7 +229,7 @@ public final class EntityFactory {
             entity.setAccessPolicy(accessPolicy);
             entity.setId(dto.getId());
             if (accessPolicy != null && accessPolicy.getCanRead()) {
-                entity.setControllerServiceReferencingComponent(dto);
+                entity.setComponent(dto);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/controller/ControllerFacade.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/controller/ControllerFacade.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/controller/ControllerFacade.java
index 82a79b9..af8ac2d 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/controller/ControllerFacade.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/controller/ControllerFacade.java
@@ -177,12 +177,12 @@ public class ControllerFacade implements Authorizable {
 
     @Override
     public Authorizable getParentAuthorizable() {
-        return null;
+        return flowController.getParentAuthorizable();
     }
 
     @Override
     public Resource getResource() {
-        return ResourceFactory.getControllerResource();
+        return flowController.getResource();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/nifi-web-api-context.xml
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/nifi-web-api-context.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/nifi-web-api-context.xml
index e955cd1..7578c10 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/nifi-web-api-context.xml
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/nifi-web-api-context.xml
@@ -52,7 +52,7 @@
 
     <!-- dto factory -->
     <bean id="dtoFactory" class="org.apache.nifi.web.api.dto.DtoFactory">
-        <property name="controllerServiceLookup" ref="controllerServiceProvider" />
+        <property name="controllerServiceProvider" ref="controllerServiceProvider" />
         <property name="entityFactory" ref="entityFactory"/>
         <property name="authorizer" ref="authorizer"/>
     </bean>

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/controller-service-configuration.jsp
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/controller-service-configuration.jsp b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/controller-service-configuration.jsp
index fefb0f3..0cf7f1a 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/controller-service-configuration.jsp
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/controller-service-configuration.jsp
@@ -42,18 +42,6 @@
                             <span id="controller-service-type"></span>
                         </div>
                     </div>
-                    <div id="controller-service-availability-setting-container" class="setting hidden">
-                        <div class="availability-setting">
-                            <div class="setting-name">
-                                Availability
-                                <img class="setting-icon icon-info" src="images/iconInfo.png" alt="Info" title="Where this controller service is available."/>
-                            </div>
-                            <div class="setting-field">
-                                <div id="controller-service-availability"></div>
-                            </div>
-                        </div>
-                        <div class="clear"></div>
-                    </div>
                 </div>
                 <div class="spacer">&nbsp;</div>
                 <div class="settings-right">

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/new-controller-service-dialog.jsp
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/new-controller-service-dialog.jsp b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/new-controller-service-dialog.jsp
index f12d085..498cba6 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/new-controller-service-dialog.jsp
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/new-controller-service-dialog.jsp
@@ -43,10 +43,5 @@
             </div>
         </div>
         <div class="clear"></div>
-        <div id="controller-service-availability-container" class="hidden">
-            <div class="setting-name availability-label">Available on</div>
-            <div id="controller-service-availability-combo"></div>
-            <div class="clear"></div>
-        </div>
     </div>
 </div>

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/new-reporting-task-dialog.jsp
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/new-reporting-task-dialog.jsp b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/new-reporting-task-dialog.jsp
index d5621c2..2939ca4 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/new-reporting-task-dialog.jsp
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/new-reporting-task-dialog.jsp
@@ -43,10 +43,5 @@
             </div>
         </div>
         <div class="clear"></div>
-        <div id="reporting-task-availability-container" class="hidden">
-            <div class="setting-name availability-label">Available on</div>
-            <div id="reporting-task-availability-combo"></div>
-            <div class="clear"></div>
-        </div>
     </div>
 </div>

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/reporting-task-configuration.jsp
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/reporting-task-configuration.jsp b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/reporting-task-configuration.jsp
index 42b1d0d..7f542cb 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/reporting-task-configuration.jsp
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/reporting-task-configuration.jsp
@@ -46,18 +46,6 @@
                             <span id="reporting-task-type"></span>
                         </div>
                     </div>
-                    <div id="reporting-task-availability-setting-container" class="setting hidden">
-                        <div class="availability-setting">
-                            <div class="setting-name">
-                                Availability
-                                <img class="setting-icon icon-info" src="images/iconInfo.png" alt="Info" title="Where this controller service is available."/>
-                            </div>
-                            <div class="setting-field">
-                                <div id="reporting-task-availability"></div>
-                            </div>
-                        </div>
-                        <div class="clear"></div>
-                    </div>
                 </div>
                 <div class="spacer">&nbsp;</div>
                 <div class="settings-right">

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/controller-service.css
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/controller-service.css b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/controller-service.css
index b0d980b..aebb57c 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/controller-service.css
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/controller-service.css
@@ -79,11 +79,6 @@ div.controller-service-configuration-tab-container {
     float: left;
 }
 
-div.availability-setting {
-    float: left;
-    width: 140px;
-}
-
 /*
     Service references
 */

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/new-controller-service-dialog.css
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/new-controller-service-dialog.css b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/new-controller-service-dialog.css
index 6d479a9..667cc7c 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/new-controller-service-dialog.css
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/new-controller-service-dialog.css
@@ -60,26 +60,6 @@
     line-height: 12px;
 }
 
-#controller-service-availability-container {
-    position: relative;
-    left: 190px;
-    top: 9px;
-}
-
-div.availability-label {
-    float: left;
-    height: 24px;
-    line-height: 24px;
-}
-
-#controller-service-availability-combo {
-    float: left;
-    margin-left: 6px;
-    width: 125px;
-    height: 18px;
-    line-height: 18px;
-}
-
 #controller-service-types-table {
     width: 586px;
     height: 249px;

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/new-reporting-task-dialog.css
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/new-reporting-task-dialog.css b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/new-reporting-task-dialog.css
index 88a4e49..5b53cea 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/new-reporting-task-dialog.css
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/new-reporting-task-dialog.css
@@ -60,26 +60,6 @@
     line-height: 12px;
 }
 
-#reporting-task-availability-container {
-    position: relative;
-    left: 190px;
-    top: 9px;
-}
-
-div.availability-label {
-    float: left;
-    height: 24px;
-    line-height: 24px;
-}
-
-#reporting-task-availability-combo {
-    float: left;
-    margin-left: 6px;
-    width: 125px;
-    height: 18px;
-    line-height: 18px;
-}
-
 #reporting-task-types-table {
     width: 586px;
     height: 249px;

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/reporting-task.css
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/reporting-task.css b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/reporting-task.css
index 8d5291e..e7741e3 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/reporting-task.css
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/reporting-task.css
@@ -89,11 +89,6 @@ div.reporting-task-enabled-container {
     margin-left: 10px;
 }
 
-div.availability-setting {
-    float: left;
-    width: 140px;
-}
-
 #reporting-task-scheduling-strategy-combo {
     width: 150px;
     height: 18px;

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-funnel-component.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-funnel-component.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-funnel-component.js
index be1b012..7fb91ff 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-funnel-component.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-funnel-component.js
@@ -84,7 +84,9 @@ nf.ng.FunnelComponent = function (serviceProvider) {
                     // add the funnel to the graph
                     nf.Graph.add({
                         'funnels': [response]
-                    }, true);
+                    }, {
+                        'selectAll': true
+                    });
 
                     // update the birdseye
                     nf.Birdseye.refresh();

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-group-component.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-group-component.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-group-component.js
index 3aaa45c..f4a887b 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-group-component.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-group-component.js
@@ -49,7 +49,9 @@ nf.ng.GroupComponent = function (serviceProvider) {
                 // add the process group to the graph
                 nf.Graph.add({
                     'processGroups': [response]
-                }, true);
+                }, {
+                    'selectAll': true
+                });
 
                 // update component visibility
                 nf.Canvas.View.updateVisibility();

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-input-port-component.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-input-port-component.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-input-port-component.js
index 9d84254..d55db5c 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-input-port-component.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-input-port-component.js
@@ -49,7 +49,9 @@ nf.ng.InputPortComponent = function (serviceProvider) {
                 // add the port to the graph
                 nf.Graph.add({
                     'inputPorts': [response]
-                }, true);
+                }, {
+                    'selectAll': true
+                });
 
                 // update component visibility
                 nf.Canvas.View.updateVisibility();

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-label-component.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-label-component.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-label-component.js
index 6f673a3..d3e8743 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-label-component.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-label-component.js
@@ -86,7 +86,9 @@ nf.ng.LabelComponent = function (serviceProvider) {
                     // add the label to the graph
                     nf.Graph.add({
                         'labels': [response]
-                    }, true);
+                    }, {
+                        'selectAll': true
+                    });
 
                     // update the birdseye
                     nf.Birdseye.refresh();

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-output-port-component.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-output-port-component.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-output-port-component.js
index 7b0d31f..11871e7 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-output-port-component.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-output-port-component.js
@@ -49,7 +49,9 @@ nf.ng.OutputPortComponent = function (serviceProvider) {
                 // add the port to the graph
                 nf.Graph.add({
                     'outputPorts': [response]
-                }, true);
+                }, {
+                    'selectAll': true
+                });
 
                 // update component visibility
                 nf.Canvas.View.updateVisibility();

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-processor-component.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-processor-component.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-processor-component.js
index d356a12..cb5b066 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-processor-component.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-processor-component.js
@@ -224,7 +224,9 @@ nf.ng.ProcessorComponent = function (serviceProvider) {
                 // add the processor to the graph
                 nf.Graph.add({
                     'processors': [response]
-                }, true);
+                }, {
+                    'selectAll': true
+                });
 
                 // update component visibility
                 nf.Canvas.View.updateVisibility();

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-remote-process-group-component.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-remote-process-group-component.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-remote-process-group-component.js
index 0894bac..276b616 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-remote-process-group-component.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-remote-process-group-component.js
@@ -49,7 +49,9 @@ nf.ng.RemoteProcessGroupComponent = function (serviceProvider) {
                 // add the processor to the graph
                 nf.Graph.add({
                     'remoteProcessGroups': [response]
-                }, true);
+                }, {
+                    'selectAll': true
+                });
 
                 // update component visibility
                 nf.Canvas.View.updateVisibility();

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-template-component.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-template-component.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-template-component.js
index ea604f2..6815b47 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-template-component.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-template-component.js
@@ -42,7 +42,9 @@ nf.ng.TemplateComponent = function (serviceProvider) {
             contentType: 'application/json'
         }).done(function (response) {
             // populate the graph accordingly
-            nf.Graph.add(response.flow, true);
+            nf.Graph.add(response.flow, {
+                'selectAll': true
+            });
 
             // update component visibility
             nf.Canvas.View.updateVisibility();

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
index 67871f4..d83aba8 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
@@ -1089,7 +1089,7 @@ nf.Actions = (function () {
             var processor = selection.datum();
 
             // view the state for the selected processor
-            nf.ComponentState.showState(processor.component, processor.revision, nf.CanvasUtils.supportsModification(selection));
+            nf.ComponentState.showState(processor.component, nf.CanvasUtils.supportsModification(selection));
         },
 
         /**
@@ -1340,7 +1340,9 @@ nf.Actions = (function () {
                             var snippetFlow = copyResponse.flow;
 
                             // update the graph accordingly
-                            nf.Graph.add(snippetFlow, true);
+                            nf.Graph.add(snippetFlow, {
+                                'selectAll': true
+                            });
 
                             // update component visibility
                             nf.Canvas.View.updateVisibility();

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js
index 7288dd3..93f3cff 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js
@@ -897,6 +897,11 @@ nf.CanvasUtils = (function () {
         supportsModification: function (selection) {
             var selectionData = selection.datum();
 
+            // check access policies first
+            if (selectionData.accessPolicy.canRead === false || selectionData.accessPolicy.canWrite === false) {
+                return false;
+            }
+
             var supportsModification = false;
             if (nf.CanvasUtils.isProcessor(selection) || nf.CanvasUtils.isInputPort(selection) || nf.CanvasUtils.isOutputPort(selection)) {
                 if (nf.Common.isDefinedAndNotNull(selectionData.status)) {

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
index f7e6cd2..27c7e45 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
@@ -687,8 +687,7 @@ nf.Canvas = (function () {
                 // get the process group to refresh everything
                 var processGroupXhr = reloadProcessGroup(nf.Canvas.getGroupId(), options);
                 var statusXhr = nf.ng.Bridge.get('appCtrl.serviceProvider.headerCtrl.flowStatusCtrl').reloadFlowStatus();
-                var settingsXhr = nf.Settings.loadSettings(false); // don't reload the status as we want to wait for deferreds to complete
-                $.when(processGroupXhr, statusXhr, settingsXhr).done(function (processGroupResult) {
+                $.when(processGroupXhr, statusXhr).done(function (processGroupResult) {
                     deferred.resolve(processGroupResult);
                 }).fail(function () {
                     deferred.reject();

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-component-state.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-component-state.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-component-state.js
index 644342a..dbe6b85 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-component-state.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-component-state.js
@@ -205,7 +205,6 @@ nf.ComponentState = (function () {
 
         // clear the component
         $('#component-state-table').removeData('component');
-        $('#component-state-table').removeData('revision');
     };
 
     return {
@@ -252,23 +251,12 @@ nf.ComponentState = (function () {
                     var stateEntryCount = componentStateGrid.getDataLength();
 
                     if (stateEntryCount > 0) {
-                        var revision = componentStateTable.data('revision');
-
-                        // clear the state
-                        var revision = {
-                            'revision': revision
-                        };
-
                         var component = componentStateTable.data('component');
                         $.ajax({
                             type: 'POST',
                             url: component.uri + '/state/clear-requests',
-                            data: JSON.stringify(revision),
                             dataType: 'json'
                         }).done(function (response) {
-                            // TODO - update the revision
-                            // nf.Client.setRevision(response.revision);
-
                             // clear the table
                             clearTable();
 
@@ -359,7 +347,7 @@ nf.ComponentState = (function () {
          * @param {object} component
          * @param {boolean} canClear
          */
-        showState: function (component, revision, canClear) {
+        showState: function (component, canClear) {
             return $.ajax({
                 type: 'GET',
                 url: component.uri + '/state',
@@ -377,7 +365,6 @@ nf.ComponentState = (function () {
 
                 // store the component
                 componentStateTable.data('component', component);
-                componentStateTable.data('revision', revision);
 
                 // show the dialog
                 $('#component-state-dialog').modal('show');

http://git-wip-us.apache.org/repos/asf/nifi/blob/8bb56fca/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
index ff1f67a..221f3ad 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
@@ -875,7 +875,9 @@ nf.ConnectionConfiguration = (function () {
                 // add the connection
                 nf.Graph.add({
                     'connections': [response]
-                }, true);
+                }, {
+                    'selectAll': true
+                });
 
                 // reload the connections source/destination components
                 nf.CanvasUtils.reloadConnectionSourceAndDestination(sourceComponentId, destinationComponentId);