Bug 1030304 - Incorrect last value in overview graph on resource summary page
Incorrect last value in overview graph on resource summary page
Status: CLOSED CURRENTRELEASE
Product: JBoss Operations Network
Classification: JBoss
Component: UI (Show other bugs)
JON 3.2
Unspecified Unspecified
unspecified Severity medium
: ER05
: JON 3.3.0
Assigned To: Mike Thompson
Filip Brychta
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-14 05:22 EST by Filip Brychta
Modified: 2014-12-11 09:03 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-12-11 09:03:01 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Filip Brychta 2013-11-14 05:22:14 EST
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 05:23:06 EST
Created attachment 823868 [details]
uptime screen shot
Comment 3 Jay Shaughnessy 2014-09-05 13:25:18 EDT
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 04:12:37 EDT
Moving into ER05 as didn't make the ER04 cut.
Comment 6 Mike Thompson 2014-10-16 15:04:02 EDT
(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 15:32:58 EDT
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 18:09:16 EDT
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 18:43:14 EDT
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 18:46:14 EDT
Created attachment 947764 [details]
Summary Metrics with fix
Comment 11 Mike Thompson 2014-10-16 18:47:34 EDT
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 09:57:53 EDT

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 16:24:13 EDT
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 07:16:21 EDT
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.