Bug 1030304

Summary: Incorrect last value in overview graph on resource summary page
Product: [JBoss] JBoss Operations Network Reporter: Filip Brychta <fbrychta>
Component: UIAssignee: Mike Thompson <mithomps>
Status: CLOSED CURRENTRELEASE QA Contact: Filip Brychta <fbrychta>
Severity: medium Docs Contact:
Priority: unspecified    
Version: JON 3.2CC: ahovsepy, jshaughn
Target Milestone: ER05   
Target Release: JON 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-11 14:03:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
summary page screen shot
none
uptime screen shot
none
Summary Metrics with fix
none
Monitoring/Metrics for comparison none

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>
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>
Date:   Thu Oct 16 15:24:23 2014 -0700

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

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