Bug 959455

Summary: Confusing number of total rows in Administration->Agents page
Product: [JBoss] JBoss Operations Network Reporter: Lukas Krejci <lkrejci>
Component: High AvailabilityAssignee: Jirka Kremser <jkremser>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: unspecified    
Version: JON 3.2CC: gerhard.dreschler, hrupp, jkremser, myarboro
Target Milestone: ER01Keywords: TestCaseNeeded
Target Release: JON 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-11 13:59:27 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:
Embargoed:

Description Lukas Krejci 2013-05-03 14:26:03 UTC
Description of problem:

In my inventory I have 120 agents (created using agentspawn).
SELECT COUNT(*) FROM rhq_agent gives me 120.

When I navigate to Administration->Agents, the first number of agents I see in the "total" is 58.
When I scroll down, the list doesn't get lazily loaded with the rest of the agents, nor does the reported total number of agents change.

When scrolled down, pressing the "Refresh" button will reload the table and the reported total will change to 100.
Scrolling to the very bottom again and pressing "Refresh" will finally get me to the true total of 120.

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

How reproducible:
always

Steps to Reproduce:
1.Generate large number of agents connected to a server
2.Follow the steps in the description
  
Actual results:
The reported number of agents isn't always correct and the page doesn't lazily load when scrolling past the currently loaded number of rows.

Expected results:
The total should be correct any time and lazy (or eager) loading of the whole list should be possible.


Additional info:

Comment 4 Jirka Kremser 2014-08-05 13:23:33 UTC
branch:  master
link:    https://github.com/rhq-project/rhq/commit/d539c8bb0
time:    2014-08-05 15:22:40 +0200
commit:  d539c8bb0c859b57cf60ac7a640898701cee263e
author:  Jirka Kremser - jkremser
message: [BZ 959455] - Confusing number of total rows in Administration->Agents
         page - calling setPagingInfo(response, result); solves the
         issue. I fixed that also for StorageNodeDatasource,
         AffinityGroupWithCountsDatasource, FailoverListItemDatasource,
         PartitionEventDatasource, ServerDatasource and
         ServerWithAgentCountDatasource

Comment 5 Lukas Krejci 2014-08-07 10:27:33 UTC
cherry-picked to release/jon3.3.x

commit 1136fd5ae206b9e9b0695b8f79b84fac3e9b1ab1
Author: Jirka Kremser <jkremser>
Date:   Tue Aug 5 15:22:40 2014 +0200

    [BZ 959455] - Confusing number of total rows in Administration->Agents page - calling setPagingInfo(response, result); solves the issue. I fixed that also for StorageNodeDatasource, Affi
    
    (cherry picked from commit d539c8bb0c859b57cf60ac7a640898701cee263e)
    Signed-off-by: Lukas Krejci <lkrejci>

Comment 6 Simeon Pinder 2014-08-19 23:50:33 UTC
Moving to ON_QA as available to test in the following brew build:

https://brewweb.devel.redhat.com//buildinfo?buildID=379025