Bug 971649

Summary: d3 Graph High values are sometimes too large by quite a bit
Product: [Other] RHQ Project Reporter: Mike Thompson <mithomps>
Component: Core UIAssignee: Mike Thompson <mithomps>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: high    
Version: 4.7CC: hrupp
Target Milestone: ---   
Target Release: RHQ 4.9   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-26 08:31:38 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
graph showing erroneous max value
none
json error raw data none

Description Mike Thompson 2013-06-07 05:01:31 UTC
Description of problem:
Some graphs that show the legend at the right with min, max, avg have an erroneous value in the max.

Looks like an error of 100x in some highs.

Instead of a 9Gb max it is a 900Gb max.

Reproduce:
Take a look at the file system graphs for a single hard disk.

An error in org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.MetricGraphData#normalizeUnitsAndValues

private MeasurementNumericValueAndUnits normalizeUnitsAndValues(double value, MeasurementUnits measurementUnits) {
        MeasurementNumericValueAndUnits newValue = MeasurementConverterClient.fit(value, measurementUnits);
        MeasurementNumericValueAndUnits returnValue;

        // adjust for percentage numbers
        if (measurementUnits.equals(MeasurementUnits.PERCENTAGE)) {
            returnValue = new MeasurementNumericValueAndUnits(newValue.getValue() * 100, newValue.getUnits());
        } else {
            returnValue = new MeasurementNumericValueAndUnits(newValue.getValue(), newValue.getUnits());
        }

        return returnValue;
    }

Which should work but needs further investigation why it does not.

Comment 1 Mike Thompson 2013-06-07 05:03:23 UTC
Created attachment 757984 [details]
graph showing erroneous max value

Comment 2 Mike Thompson 2013-06-07 05:07:02 UTC
Created attachment 757985 [details]
json error raw data

Comment 3 Mike Thompson 2013-09-10 16:35:51 UTC
The graphs have changed much since this BZ. In fact, the only place you can see this legend is on a wide portlet and inventory detail summary graph. I have verified this fix in file system resources of latest build.

Comment 4 Heiko W. Rupp 2014-03-26 08:31:38 UTC
Bulk closing now that 4.10 is out.

If you think an issue is not resolved, please open a new BZ and link to the existing one.