Bug 1113707 - Suspect metrics report, column "Metric" sort doesn't sort until you click several times
Summary: Suspect metrics report, column "Metric" sort doesn't sort until you click sev...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: UI
Version: JON 3.2.1
Hardware: All
OS: All
unspecified
medium
Target Milestone: ER01
: JON 3.2.3
Assignee: Michael Burman
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: 1127871
TreeView+ depends on / blocked
 
Reported: 2014-06-26 17:12 UTC by dsteigne
Modified: 2018-12-05 18:57 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1127871 (view as bug list)
Environment:
Last Closed: 2014-09-05 15:40:34 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 972953 None None None Never

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):
3.2.1

How reproducible:


Steps to Reproduce:
1.
2.
3.

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:

http://jon01.mw.lab.eng.bos.redhat.com:8042/dist/release/jon/3.2.3.GA/8-14-14/


Note You need to log in before you can comment on or make changes to this bug.