Bug 1261907 - Metric chart in JON UI is not redrawn after it is first open
Summary: Metric chart in JON UI is not redrawn after it is first open
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: UI
Version: JON 3.3.3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ER01
: JON 3.3.5
Assignee: Jay Shaughnessy
QA Contact: Matt Mahoney
URL:
Whiteboard:
Depends On: 1261910
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-10 12:16 UTC by bkramer
Modified: 2019-08-15 05:23 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-03 15:02:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Archive containing screen shots that illustrate an issue (856.23 KB, application/zip)
2015-11-09 09:55 UTC, bkramer
no flags Details
Before (62.98 KB, image/png)
2015-11-10 10:40 UTC, Stian Lund
no flags Details
After (65.07 KB, image/png)
2015-11-10 10:41 UTC, Stian Lund
no flags Details
Requests-Before (59.00 KB, image/png)
2015-11-10 10:53 UTC, Stian Lund
no flags Details
Requests-After (63.38 KB, image/png)
2015-11-10 10:54 UTC, Stian Lund
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1603323 0 None None None 2016-01-28 19:37:56 UTC
Red Hat Product Errata RHSA-2016:0118 0 normal SHIPPED_LIVE Critical: Red Hat JBoss Operations Network 3.3.5 update 2016-02-03 20:00:55 UTC

Description bkramer 2015-09-10 12:16:50 UTC
Description of problem:
Metric chart displayed in the pop up window:

1. JON UI -> JBossAS7 Standalone Servers AutoGroup -> Summary -> Activity -> click on "Maximum Request Time" metric;
2. JON UI -> JBossAS7 Standalone Servers -> RHQ Server -> Summary -> Activity -> click on "Maximum Request Time" metric;

In both cases, it is necessary to change the time period (for instance select 4h and then back again 1h) to force graph to refresh.

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

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Michael Burman 2015-11-06 13:29:08 UTC
I can't reproduce this with 3.3.4 .. if I open a graph and set it to 1 hour, it keeps being auto-updated on the set refresh interval.

Comment 4 bkramer 2015-11-09 09:55:14 UTC
Created attachment 1091681 [details]
Archive containing screen shots that illustrate an issue

Comment 7 Stian Lund 2015-11-09 11:25:23 UTC
I think maybe the description could be clearer. The issue is not with the refresh interval, but that the graphs in the popup window seems to be cached and needs to be refreshed to show actual values. 

The same applies to the small graphs in the metric summary display, there's a separate issue for this: https://bugzilla.redhat.com/show_bug.cgi?id=1261890

Most noticable just after logging in before changing the time range.

Comment 9 bkramer 2015-11-09 11:57:52 UTC
I just tested this issue in both JBoss ON 3.3.3 and 3.3.4 but I couldn't see reported issue. The refresh interval was set to 1 minute and every minute the graph was re-drawn and updated. 

However, I still see the issue reported in: https://bugzilla.redhat.com/show_bug.cgi?id=1261890

Comment 10 Michael Burman 2015-11-09 12:44:20 UTC
Okay, after discussing with bkramer I can understand what the issue is (it's not the popup to be clear, it's the portlet showing the activity data). I had troubles reproducing this, it did not happen to me, but now for some reason (unknown to me) it happened to me also. I can see that the new data was refreshed from the server, but the browser does not always use the new data for redrawing (but from what I can see, the browser is told to redraw the data and at least Firefox does redraw it).

Comment 11 Stian Lund 2015-11-10 10:40:18 UTC
I agree this one is hard to reproduce, and not even sure myself what I saw to report it originally. But there is definitely some caching going on with the popup metrics.

This is not the portlets as reported in BZ1261890 - but possibly with a look at caching in the code both issues can be solved in one go.

It seems to only happen after logging into JON after some time away, and the first time a popup graph is opened, old data is loaded, possibly from the browser or some other cache.

I am attaching a couple of images that shows what I mean.

Before: How the graph looks when opening it the first time. You can see the time range is shown from Sunday 3PM until Monday 12PM

After: How it looks after refreshing by clicking on 1Day, the graph changes and the range is from Monday 12PM until Tuesday 9AM.

I know about this quirk and have gotten used to always refreshing the data to see the current, but we have users who are not that used to JON and they will be confused to see values other than they expect.

I will attach some more screenshots if I can get more examples.

Comment 12 Stian Lund 2015-11-10 10:40:51 UTC
Created attachment 1092153 [details]
Before

Comment 13 Stian Lund 2015-11-10 10:41:20 UTC
Created attachment 1092154 [details]
After

Comment 14 Stian Lund 2015-11-10 10:53:26 UTC
Created attachment 1092155 [details]
Requests-Before

Requests before clicking refresh 5 days. Note Avail.data missing.

Comment 15 Stian Lund 2015-11-10 10:54:14 UTC
Created attachment 1092156 [details]
Requests-After

Requests after clicking refresh 5 days. Note Avail.data now present.

Comment 17 Jay Shaughnessy 2015-12-04 15:48:53 UTC
commit 4954341e71c2baae497cd84f73472b6d52f1ec62
Author: Jay Shaughnessy <jshaughn>
Date:   Fri Dec 4 10:45:55 2015 -0500

 Ensure that the CustomDateRangeState is updated to 'Now' prior to
 dataFetch/graphGeneration not only at refresh time but also on initial
 draw. This is done a couple of different ways due to the various impls/paths
 that generate graphs, but in general needed to be applied to the base classes
 to ensure subclasses also benefited.

 Also:
 - fix a refresh bug in the OOB portlet

Comment 19 Simeon Pinder 2015-12-09 06:29:16 UTC
Moving to ON_QA as available to test with the following brew build:

JON Cumulative patch build: https://brewweb.devel.redhat.com/buildinfo?buildID=469635
  *Note: jon-server-patch-3.3.0.GA.zip maps to DR01 build of jon-server-3.3.0.GA-update-05.zip.

Comment 20 Jay Shaughnessy 2015-12-10 16:59:33 UTC
Testing Notes:

It's not super easy to test this but what I noticed before the fix was this:
1) Log into the UI
2) Navigate to An App Server
   - You should be on the Resource Dashboard
3) Click the max request time metric link in the summary portlet

Depending on your previous state you may already see the problem.  The time range next to the button bar is typically correct. But the graph time range may not match, it may be in the past.  It will stay incorrect until the 1 minute auto-refresh, at which point things will snap forward and the graph will change significantly.  After that it is fine.

If you don't see the problem then set the time range to 1 hour and just stay on the screen but don't interact Let the session time out (yes, this takes an hour, so get some lunch).  When you log in again and go back to the chart you would typically see the problem.

Of course, with the fix, you should not see a problem in any situation, the button bar time range and the graph should be in sync.

Comment 23 errata-xmlrpc 2016-02-03 15:02:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-0118.html


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