NIFI-2766: - Ensuring the root group is included in /resources.

This closes #1013.

Signed-off-by: Bryan Bende <bbende@apache.org>
This commit is contained in:
Matt Gilman 2016-09-13 10:46:21 -04:00 committed by Bryan Bende
parent d325773760
commit b48355e75a
No known key found for this signature in database
GPG Key ID: A0DDA9ED50711C39
1 changed files with 6 additions and 0 deletions

View File

@ -797,6 +797,12 @@ public class ControllerFacade implements Authorizable {
final ProcessGroup root = flowController.getGroup(flowController.getRootGroupId()); final ProcessGroup root = flowController.getGroup(flowController.getRootGroupId());
// include the root group
final Resource rootResource = root.getResource();
resources.add(rootResource);
resources.add(ResourceFactory.getDataResource(rootResource));
resources.add(ResourceFactory.getPolicyResource(rootResource));
// add each processor // add each processor
for (final ProcessorNode processor : root.findAllProcessors()) { for (final ProcessorNode processor : root.findAllProcessors()) {
final Resource processorResource = processor.getResource(); final Resource processorResource = processor.getResource();