exceptionfactory commented on code in PR #10233:
URL: https://github.com/apache/nifi/pull/10233#discussion_r2301043302
##########
nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ProcessGroupAuditor.java:
##########
@@ -246,6 +252,48 @@ public void enableComponentsAdvice(ProceedingJoinPoint
proceedingJoinPoint, Stri
}
saveUpdateProcessGroupAction(groupId, operation);
+ if (components.get(Component.Processor) != null) {
+ saveUpdateConnectableActions(components.get(Component.Processor),
operation, Component.Processor);
+ }
+ if (components.get(Component.InputPort) != null) {
+ saveUpdateConnectableActions(components.get(Component.InputPort),
operation, Component.InputPort);
+ }
+ if (components.get(Component.OutputPort) != null) {
+ saveUpdateConnectableActions(components.get(Component.OutputPort),
operation, Component.OutputPort);
+ }
+ }
+
+ private Map<Component, List<Connectable>> getComponents(final String
groupId, final Collection<String> componentIds) {
Review Comment:
Is it necessary to build up the intermediate `Map` as opposed to iterating
through the Component IDs and then adding to the list of Actions?
##########
nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ProcessGroupAuditor.java:
##########
@@ -246,6 +252,48 @@ public void enableComponentsAdvice(ProceedingJoinPoint
proceedingJoinPoint, Stri
}
saveUpdateProcessGroupAction(groupId, operation);
+ if (components.get(Component.Processor) != null) {
Review Comment:
It looks like `components.containsKey()` would be the more appropriate check
for these three conditionals. It may also be simpler to create a static List of
these three types and implement a simple loop.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]