You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2019/04/22 15:57:42 UTC

[GitHub] [nifi] mcgilman commented on a change in pull request #3442: NIFI-6225 Added alphabetical sort onto relationship lists for Connection dialog

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_r277333737
 
 

 ##########
 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
 ##########
 @@ -1385,8 +1385,8 @@
 
                 // initialize the connection dialog
                 $.when(initializeSourceEditConnectionDialog(source), initializeDestinationEditConnectionDialog(destination, connection.destination)).done(function () {
-                    var availableRelationships = connection.availableRelationships;
-                    var selectedRelationships = connection.selectedRelationships;
+                    var availableRelationships = connection.availableRelationships.sort();
+                    var selectedRelationships = connection.selectedRelationships.sort();
 
 Review comment:
   Both the available relationships and the selected relationships are sorted server side [1]. I think the behavior you're seeing is actually a bug in our cluster response merging logic. Since the data type of the DTO is just a `Set` when the object is unmarshalled the sorted ordered is lost. I think should be making sure the items are resorted after merging to ensure the responses from our REST API do not differ when standalone vs clustered.
   
   [1] https://github.com/apache/nifi/blob/161e4b57632b2d5454390871980288eb66df2502/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java#L702

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services