Red Hat Bugzilla – Bug 1261907
Metric chart in JON UI is not redrawn after it is first open
Last modified: 2016-02-03 10:02:56 EST
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):
Steps to Reproduce:
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.
Created attachment 1091681 [details]
Archive containing screen shots that illustrate an issue
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.
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
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).
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.
Created attachment 1092153 [details]
Created attachment 1092154 [details]
Created attachment 1092155 [details]
Requests before clicking refresh 5 days. Note Avail.data missing.
Created attachment 1092156 [details]
Requests after clicking refresh 5 days. Note Avail.data now present.
Author: Jay Shaughnessy <firstname.lastname@example.org>
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
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.
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.
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.