markobean 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_r277393685
##########
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:
@mcgilman, I observed the out-of-order of Relationships only in a cluster
environment. I could not reproduce in a stand-alone. The ordering is not the
list of processor properties (e.g. RouteOnAttribute with several user-defined
relationships.) Rather, it is the "For Relationships" list on the Connection
configuration. Moreover, the list appears correctly sorted when creating a new
relationship. However, when returning to the configuration of the same
Connection, the "For Relationships" is now out of order. This observation also
points to a problem with the Cluster merging logic since when creating a new
Connection, the Cluster is not queried (I don't believe), but it is when
viewing the configuration of a Connection.
I think you are correct in this having to do with it being a Set (not
ordered) in the DTO. Specifically, I noted
ConnectionDTO.getAvailableRelationships method returns a Set. Perhaps this
should be a List instead?
----------------------------------------------------------------
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