Bug 1030304 - Incorrect last value in overview graph on resource summary page
Summary: Incorrect last value in overview graph on resource summary page
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: UI
Version: JON 3.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ER05
: JON 3.3.0
Assignee: Mike Thompson
QA Contact: Filip Brychta
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-14 10:22 UTC by Filip Brychta
Modified: 2014-12-11 14:03 UTC (History)
2 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2014-12-11 14:03:01 UTC


Attachments (Terms of Use)
summary page screen shot (135.85 KB, image/png)
2013-11-14 10:22 UTC, Filip Brychta
no flags Details
uptime screen shot (158.91 KB, image/png)
2013-11-14 10:23 UTC, Filip Brychta
no flags Details
Summary Metrics with fix (18.94 KB, image/png)
2014-10-16 22:46 UTC, Mike Thompson
no flags Details
Monitoring/Metrics for comparison (26.11 KB, image/png)
2014-10-16 22:47 UTC, Mike Thompson
no flags Details

Description Filip Brychta 2013-11-14 10:22:14 UTC
Created attachment 823867 [details]
summary page screen shot

Description of problem:
See attached summary page screen shot. There is a graph for Uptime metric and last value in this graph is incorrect. Uptime should be still growing (see uptime screen shot)

Version-Release number of selected component (if applicable):
Version :	
3.2.0.ER5
Build Number :	
2cb2bc9:225c796

How reproducible:
Always

Comment 1 Filip Brychta 2013-11-14 10:23:06 UTC
Created attachment 823868 [details]
uptime screen shot

Comment 3 Jay Shaughnessy 2014-09-05 17:25:18 UTC
There does seem to be something to at least be explained.  I also see a drop but it seems to be related to a new install not yet having enough data to cover the time range of the sparkline.

Also, though, there is a disparity between the sparklines in the summary and those in the metrics list grid column.  I would expect them to look the same.

Comment 5 Simeon Pinder 2014-09-29 08:12:37 UTC
Moving into ER05 as didn't make the ER04 cut.

Comment 6 Mike Thompson 2014-10-16 19:04:02 UTC
(In reply to Jay Shaughnessy from comment #3)
> There does seem to be something to at least be explained.  I also see a drop
> but it seems to be related to a new install not yet having enough data to
> cover the time range of the sparkline.

When a new sparkline is created it fills from the left to right and there is not enough data yet to completely cover the range of the sparkline the very first point is 0. This is why it looks to drop off at the end whenever we don't have enough data to fill the sparkline.

> 
> Also, though, there is a disparity between the sparklines in the summary and
> those in the metrics list grid column.  I would expect them to look the same.

The sparklines in the summary and the sparklines on the metrics tab can have different time periods and therefore would not look the same. The summary tab sparklines are fixed and the metrics tab sparklines are whatever the person last left them at.

Continuing to look more, but this is what I have uncovered so far.

Comment 7 Mike Thompson 2014-10-16 19:32:58 UTC
Here is an example of the sparkline (notice the values) and the corresponding canvas elemement that is created by a jquery plugin.

<span id="sparkline_4" class="dynamicsparkline" values="49.2,37.5,28,43.75,15.428571428571429," width="0">
<canvas style="display: inline-block; width: 18px; height: 17px; vertical-align: top;" width="18" height="17"></canvas>
</span>

Comment 8 Mike Thompson 2014-10-16 22:09:16 UTC
Got it!

There was a trailing comma in the summary sparklines that was not present in the metrics sparklines (it can be seen in the output above). That trailing comma causes the last value to default to zero until the sparkline is filled up with enough values that it doesn't matter.

Comment 9 Mike Thompson 2014-10-16 22:43:14 UTC
Checked into master:

commit f3ecc797a741da1896578bacd00926af91b45cf7
Author: Mike Thompson <mithomps@redhat.com>
Date:   Thu Oct 16 15:24:23 2014 -0700

    [BZ 1030304] Incorrect last value in overview graph on resource summary page.

This also solves the inconsistency issue between summary sparklines and monitor/metric sparklines (providing they are on the same time range). See included images for this.

Comment 10 Mike Thompson 2014-10-16 22:46:14 UTC
Created attachment 947764 [details]
Summary Metrics with fix

Comment 11 Mike Thompson 2014-10-16 22:47:34 UTC
Created attachment 947765 [details]
Monitoring/Metrics for comparison

This shows the equality between sparklines in summary vs monitoring/metrics now.

Comment 12 Jay Shaughnessy 2014-10-17 13:57:53 UTC

release/jon3.3.x commit e894d4a76b16bf2da94e6d87dc3b89c05db19285
Author: Mike Thompson <mithomps@redhat.com>
Date:   Thu Oct 16 15:24:23 2014 -0700

    (cherry picked from commit f3ecc797a741da1896578bacd00926af91b45cf7)
    Signed-off-by: Jay Shaughnessy <jshaughn@redhat.com>

Comment 13 Simeon Pinder 2014-10-21 20:24:13 UTC
Moving to ON_QA as available to test with the latest brew build:
https://brewweb.devel.redhat.com//buildinfo?buildID=394734

Comment 14 Filip Brychta 2014-10-22 11:16:21 UTC
Verified on
Version :	
3.3.0.ER05
Build Number :	
92b6d6a:2cdb528


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