NIFI-12107 Fixed sorting in the cluster table#7923
NIFI-12107 Fixed sorting in the cluster table#7923paulettehc wants to merge 1 commit intoapache:mainfrom
Conversation
c789076 to
ee034ee
Compare
ee034ee to
3984124
Compare
exceptionfactory
left a comment
There was a problem hiding this comment.
Thanks for working on this issue @paulettehc. I noted a couple questions related to the column identifier references.
| // defines a function for sorting | ||
| var comparer = function (a, b) { | ||
| if (sortDetails.columnId === 'heartbeat' || sortDetails.columnId === 'uptime') { | ||
| if (sortDetails.columnId === 'heartbeat' || sortDetails.columnId === 'nodeStartTime') { |
There was a problem hiding this comment.
This change to nodeStartTime appears to be incorrect since nodeStartTime is a field value not an id value. Should that part of the conditional be removed since the uptime ID is being compared later on using the duration comparison?
| var aNode = formatNodeAddress(a); | ||
| var bNode = formatNodeAddress(b); | ||
| return aNode === bNode ? 0 : aNode > bNode ? 1 : -1; | ||
| } else if (sortDetails.columnId === 'version' || sortDetails.columnId === 'javaVersion') { |
There was a problem hiding this comment.
The field id is javaversion all lowercase, versus the field value, which is javaVersion, so it looks like this needs to be changed.
There was a problem hiding this comment.
Thanks for reviewing! If you look at line 1454, the columnId is set to the field vs the id. All of the columns in line 835, which has not been changed, also use the field value.
exceptionfactory
left a comment
There was a problem hiding this comment.
Thanks for the clarification on the columnId @paulettehc, that makes sense. The changes look good! +1 merging
Summary
NIFI-12107 Fixed sorting of the following columns in the cluster table:
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000NIFI-00000Pull Request Formatting
mainbranchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
mvn clean install -P contrib-checkLicensing
LICENSEandNOTICEfilesDocumentation