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): 4.12
Steps to Reproduce:
0. Custom date range select
1. Enter start date in future, like Oct 12, 2014 (I wanted 2013)
2. Enter end date as current time
Three errors, one helpful, the next saying cannot load metrics, then an exception in the logs.
Probably should just prevent the user from entering bad data?
Also I noticed the time range is saved in the database and cannot be fixed through the UI.
This is stored in my user's configuration. The work-around is to use the RHQ cli to modify the config stuff.
... find Subject s
var conf = s.getUserConfiguration()
Nice catch, Elias.
time: 2014-08-11 17:40:18 +0200
author: Jirka Kremser - email@example.com
message: [BZ 1128276] - Custom time range, if set with invalid wrong range,
cannot set back - Adding a client side validation in web UI