Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1141796

Summary: Custom time range, if set with invalid wrong range, cannot set back
Product: [JBoss] JBoss Operations Network Reporter: bkramer <bkramer>
Component: UIAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED NEXTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: high    
Version: JON 3.2.2CC: bkramer, myarboro
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-18 15:14:15 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:
Bug Depends On:    
Bug Blocks: 1128276, 1129063    

Description bkramer 2014-09-15 13:26:34 UTC
Description of problem:

Monitoring -> Metrics tab, if you enter a time range with the wrong time, where start time is NOT before end time, usually by mistake, then UI will show an info warning, then "Cannot load metrics", then throw an exception in the log:

Caused by: java.lang.IllegalArgumentException: Start date 1412876100000 is not before 1407522900000
        at org.rhq.enterprise.server.measurement.MeasurementDataManagerBean.getMeasurementAggregate(MeasurementDataManagerBean.java:664) [rhq-server.jar:4.12.0]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0]

Then, you cannot seem to reset the time range. The predefined ranges (1h, 4h, etc.) don't seem to do anything.


Version-Release number of selected component (if applicable): 
JBoss ON 3.2.2


How reproducible:
Always

Steps to Reproduce:
0. Select custom date range
1. Enter start date in past
2. Enter end date still in the past but before start date (for instance, if now is 13h, start date can be set to 12:10 and end date to 12:05)
3. Save the change

Actual results: 
Three errors, one helpful, the next saying cannot load metrics, then an exception in the logs.

Expected results:
Message is shown to inform user that selected interval is not correct but no error is thrown and it is possible to select new time interval or change it to 1d, 5d...

Additional info:

Comment 3 bkramer 2014-09-18 15:16:33 UTC
Closing this Bugzilla as a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1129063