From b64232117f2273c36473122bd6378aa013be458d Mon Sep 17 00:00:00 2001 From: James Wing Date: Mon, 22 May 2017 18:07:43 -0700 Subject: [PATCH] NIFI-3707 Sort Attributes in FlowFile Details UI Signed-off-by: Pierre Villard This closes #1843. --- .../src/main/webapp/js/nf/canvas/nf-queue-listing.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-queue-listing.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-queue-listing.js index b9714ef7b6..55281054cf 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-queue-listing.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-queue-listing.js @@ -462,7 +462,10 @@ var attributesContainer = $('#flowfile-attributes-container'); // get any action details - $.each(flowFile.attributes, function (attributeName, attributeValue) { + var sortedAttributeNames = Object.keys(flowFile.attributes).sort(); + sortedAttributeNames.forEach(function (attributeName) { + var attributeValue = flowFile.attributes[attributeName]; + // create the attribute record var attributeRecord = $('
') .append($('
' + nfCommon.formatValue(attributeName) + '
').ellipsis())