mcgilman commented on a change in pull request #3442: NIFI-6225 Added 
alphabetical sort onto relationship lists for Connection dialog
URL: https://github.com/apache/nifi/pull/3442#discussion_r278261012
 
 

 ##########
 File path: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
 ##########
 @@ -102,7 +102,7 @@
                 initializeSourceProcessor(source).done(function (processor) {
                     if (!nfCommon.isEmpty(processor.relationships)) {
                         // populate the available connections
-                        $.each(processor.relationships, function (i, 
relationship) {
+                        $.each(processor.relationships.sort(), function (i, 
relationship) {
 
 Review comment:
   @markobean Right so there should be no change needed on the 
`ProcessorDTO.setRelationships` side since order should be preserved when the 
object is unmarshalled.
   
   On the connection side, unfortunately, we cannot simply change the type in 
the DTO since we regard that object model as part of our REST API public 
interface. We cannot break those APIs until our next major release.
   
   However, as I alluded to earlier, we can enforce the order when merging the 
responses similar to when we serialize the DTO in the linked source above. That 
change would need to be added when merging responses that contain any 
`ConnectionDTO`. That change would belong in `ConnectionEntityMerger` [1]. 
   
   Is that something that can be updated in this PR? I understand it's a bit 
outside the scope of this proposed PR so I'm happy to have this PR closed the 
original JIRA updated to reflect these findings.
   
   [1] 
https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/manager/ConnectionEntityMerger.java

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to