Bug 1261907 - Metric chart in JON UI is not redrawn after it is first open
Metric chart in JON UI is not redrawn after it is first open
Product: JBoss Operations Network
Classification: JBoss
Component: UI (Show other bugs)
JON 3.3.3
Unspecified Unspecified
high Severity high
: ER01
: JON 3.3.5
Assigned To: Jay Shaughnessy
Matt Mahoney
: Triaged
Depends On: 1261910
  Show dependency treegraph
Reported: 2015-09-10 08:16 EDT by bkramer
Modified: 2016-02-03 10:02 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-02-03 10:02:56 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1603323 None None None 2016-01-28 14:37 EST

  None (edit)
Description bkramer 2015-09-10 08:16:50 EDT
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:

Steps to Reproduce:

Actual results:

Expected results:

Additional info:
Comment 1 Michael Burman 2015-11-06 08:29:08 EST
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 04:55 EST
Created attachment 1091681 [details]
Archive containing screen shots that illustrate an issue
Comment 7 Stian Lund 2015-11-09 06:25:23 EST
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 06:57:52 EST
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 07:44:20 EST
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 05:40:18 EST
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 05:40 EST
Created attachment 1092153 [details]
Comment 13 Stian Lund 2015-11-10 05:41 EST
Created attachment 1092154 [details]
Comment 14 Stian Lund 2015-11-10 05:53 EST
Created attachment 1092155 [details]

Requests before clicking refresh 5 days. Note Avail.data missing.
Comment 15 Stian Lund 2015-11-10 05:54 EST
Created attachment 1092156 [details]

Requests after clicking refresh 5 days. Note Avail.data now present.
Comment 17 Jay Shaughnessy 2015-12-04 10:48:53 EST
commit 4954341e71c2baae497cd84f73472b6d52f1ec62
Author: Jay Shaughnessy <jshaughn@redhat.com>
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.

 - fix a refresh bug in the OOB portlet
Comment 19 Simeon Pinder 2015-12-09 01:29:16 EST
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 11:59:33 EST
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 10:02:56 EST
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.


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