Bug 1113707

Summary: Suspect metrics report, column "Metric" sort doesn't sort until you click several times
Product: [JBoss] JBoss Operations Network Reporter: dsteigne
Component: UIAssignee: Michael Burman <miburman>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: unspecified    
Version: JON 3.2.1CC: jshaughn, loleary, mazz, miburman, mmahoney, myarboro
Target Milestone: ER01Keywords: Triaged
Target Release: JON 3.2.3   
Hardware: All   
OS: All   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1127871 (view as bug list) Environment:
Last Closed: 2014-09-05 15:40:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1127871    

Description dsteigne 2014-06-26 17:12:41 UTC
Description of problem:
If you click on title to sort it and scroll to the end of list and scroll to the up again it starts working till you leave page. There are over 1000 records, if there are only a few then it works as expected.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

Actual results:

Expected results:

Additional info:

Comment 1 Michael Burman 2014-07-07 19:19:02 UTC
Changed the behaviour to allow server-side sorting on the Resource, Metric, Date/Time and Outlier fields. Rest of the fields are not sortable server-side and have client side sorting only allowed (they will be sortable after all the data has been loaded to the client).

Fixed in master commit 3fa0ecb.

Comment 2 John Mazzitelli 2014-08-07 18:42:14 UTC
Getting a conflict - need someone know is familiar with this code to cherry pick it over and resolve. The conflict is:

    protected String getSortFieldForColumn(String columnName) {
<<<<<<< HEAD
        // Note: I don't think this should even be getting called, but it is. We already setCanSortClientOnly(true)
        // on all of the ListGridFields. To me that should mean any sorting done client side on those fields should
        // not be passed in on the Request, but it seems to be...

        // we don't use criterias for this datasource, just return null, don't try and apply any sort.        
        return null;
        // Allow server-side sorting for only unmodified queries, these keywords are for MeasurementOOBManagerBean.
        // Rest of the fields should have client-side sorting only.
        String sortField = null;
        if("scheduleName".equals(columnName)) {
            sortField = "def.displayName";
        } else if("resourceName".equals(columnName)) {
            sortField = "res.name";
        } else if("timestamp".equals(columnName)) {
            sortField = "o.timestamp";
        } else if("factor".equals(columnName)) {
            sortField = "o.oobFactor";
        return sortField;
>>>>>>> 3fa0ecb... [BZ 1113707] Allow sorting resourceName, scheduleName, timestamp and oobFactor on the server-side, rest on the client side only

Comment 3 Jay Shaughnessy 2014-08-07 19:06:36 UTC
Just accept the non-HEAD segment.

Comment 4 John Mazzitelli 2014-08-07 19:09:50 UTC
(In reply to Jay Shaughnessy from comment #3)
> Just accept the non-HEAD segment.

done. cherry pick to release/jon3.2.x branch: 8e2d5ae9b993363e6ccf7ea4874515ae7a1fb1ec

Comment 5 Simeon Pinder 2014-08-15 03:19:07 UTC
Moving to ON_QA as this is available for test in JON 3.2.3 ER01 build: