diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/connection-details.jsp b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/connection-details.jsp index e02f8a2413..f32ecdb763 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/connection-details.jsp +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/connection-details.jsp @@ -38,8 +38,7 @@
- Relationships -
+ Selected relationships
@@ -161,4 +160,4 @@
- \ No newline at end of file + diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js index 05db5db53b..8a0fd32f15 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js @@ -370,7 +370,7 @@ * @argument {string} name The relationship name */ var createRelationshipOption = function (name) { - $('
').append( + return $('
').append( $('
').text(name)).appendTo('#read-only-relationship-names'); }; @@ -496,30 +496,17 @@ var availableRelationships = connection.availableRelationships; var selectedRelationships = connection.selectedRelationships; - // show the available relationship if applicable + // show the selected relationships if applicable if (nfCommon.isDefinedAndNotNull(availableRelationships) || nfCommon.isDefinedAndNotNull(selectedRelationships)) { - // populate the available connections - $.each(availableRelationships, function (i, name) { - createRelationshipOption(name); - }); - - // ensure all selected relationships are present - // (may be undefined) and selected + // populate the selected connections $.each(selectedRelationships, function (i, name) { // mark undefined relationships accordingly if ($.inArray(name, availableRelationships) === -1) { var option = createRelationshipOption(name); $(option).children('div.relationship-name').addClass('undefined'); + } else { + createRelationshipOption(name); } - - // ensure all selected relationships are bold - var relationships = $('#read-only-relationship-names').children('div'); - $.each(relationships.children('div.relationship-name'), function (i, relationshipNameElement) { - var relationshipName = $(relationshipNameElement); - if (relationshipName.text() === name) { - relationshipName.css('font-weight', 'bold'); - } - }); }); $('#selected-relationship-text').show(); @@ -580,4 +567,4 @@ }).fail(nfErrorHandler.handleAjaxError); } }; -})); \ No newline at end of file +}));