Bug 1000175 - Metrics UI tab does not refresh properly between different resources
Summary: Metrics UI tab does not refresh properly between different resources
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Core UI
Version: 4.9
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ER02
: RHQ 4.10
Assignee: Mike Thompson
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: 924725
TreeView+ depends on / blocked
 
Reported: 2013-08-22 21:09 UTC by Stefan Negrea
Modified: 2014-10-13 11:53 UTC (History)
5 users (show)

Fixed In Version: RHQ 4.9.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-23 12:31:34 UTC
Embargoed:


Attachments (Terms of Use)

Description Stefan Negrea 2013-08-22 21:09:30 UTC
Description of problem:
Metrics tab in the UI of an individual resource does not refresh when selecting different resources with metrics from the inventory tree. Metrics from a previously selected resource are displayed. The only way to see the metrics for the selected resource is to do a full browser refresh.


How reproducible:
Every time 

Steps to Reproduce:
1. Browse the inventory section of the UI
2. Select a single CPU resource and open the Metrics tab, note the metrics displayed
3. Select a single File System resource and note that the metrics displayed do not get refreshed.

Actual results:
The metrics displayed in the Metrics tab do not get refreshed according to the resource selected.

Expected results:
The metrics displayed should get refreshed to display the ones for the current resource. 

Additional info:
The correct metrics for a resource get displayed correctly on a full page refresh (browser refresh).

Comment 1 Mike Thompson 2013-08-23 21:06:00 UTC
The fix to keep the selected metric graphs open, added state to the metrics view. This was being held when switching resources. I added logic to preserve the state in the view of selected(opened) graphs only if the resource did not change.

Committed to master commit id: 6262b38

Comment 2 Jay Shaughnessy 2013-09-14 22:57:08 UTC
This is still an issue in the 4.9 release. After some investigation it seems the root cause is that the metrics time range "slides" forward on each refresh. The range is actually stored as a set of user preferences and by default a user preference update causes a page reload, ostensibly to then apply the change to the current page.

But the metrics view is already updating on a scheduled interval.  This causes a redundant refresh, at the CoreGUI.refresh level, that conflicts (sometimes, not always) with the auto-refresh update of the view.

re-assigning to myself, setting back to ON-DEV and re-targeting for 4.10.

Comment 3 Jay Shaughnessy 2013-09-15 02:26:22 UTC
The suto refresh should now be working.  It should also be faster, with more of an "in-place" update since the page refresh no longer happens.  Also, the avail detail, if open, no longer collapses on refresh.


master commit 1235addbf5e819b8b18f5b5ee4a92b4c1bf2d51e
Author: Jay Shaughnessy <jshaughn>
Date:   Sat Sep 14 22:15:16 2013 -0400

Fix refresh issue brought on by the fact that when the metric view refreshed
istelf it updated the user prefs tracking the "sliding" time range, which
in turn triggered the standard CoreGUI.refresh that refreshed the entire
page.  These stepped on each other.
- Enhance UserPreferences API to let the caller suppress refresh on
  preference change.
- Use the new UserPreferences hooks in ButtonBarDateTimeEditor and
  MeasurementUserPreferences to suppress refresh as needed.
- Restructure MetricsResourceView to minimize impact when asked to
  refreshData.  Now also maintains availDetail collapse state on
  auto refresh.
- Add isRefreshing support to AbstractD3GraphListView (although this
  is not likely to be needed, it's a little more protection)

Comment 4 Mike Thompson 2013-09-18 14:26:08 UTC
Still a couple side effects to fix here.

Comment 5 Mike Thompson 2013-09-24 15:39:22 UTC
The side effects were fixed and committed to master for ER02.
commit id: 1334459  and  3507a4d

Comment 6 Armine Hovsepyan 2013-11-12 14:02:22 UTC
verified in ER5

video here -> http://d.pr/v/CQbB

Comment 7 Heiko W. Rupp 2014-04-23 12:31:34 UTC
Bulk closing of 4.10 issues.

If an issue is not solved for you, please open a new BZ (or clone the existing one) with a version designator of 4.10.


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