NissimShiman commented on code in PR #10233:
URL: https://github.com/apache/nifi/pull/10233#discussion_r2307398597
##########
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:
Thank you @exceptionfactory for looking at this and thank you @dan-s1 for
your assistance with code tightening as well.
> 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?
@exceptionfactory
I was originally thinking that it might be nice to see similar components
listed consecutively in the flow history and the intermediate `Map` was done
for that.
That being said, your suggestion will tighten up the code nicely.
Let me know if we still want to leave out the `Map`
(and we want to keep it, I'll likely be incorporating @dan-s1 's comments to
make that approach better)
--
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]