Red Hat Bugzilla – Bug 848494
Metric graphs on dashboards uses the client's time for obtaining the data
Last modified: 2013-09-01 06:19:20 EDT
Description of problem:
If the RHQ webapp is accessed from a different machine via any browser, the System.currentTimeMillis() invoked on the GWT client side code (class AbstractMetricGraphView) returns the client's time in millis. This value is then passed to the server for obtaining the measurement data. It the user has, say, time artificially shifted 8 hours ahead, nothing is returned from the server.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. access the RHQ webapp from a browser running on different machine than the RHQ is installed on.
2. on that machine (where the browser is running) set the time to _actual_time_ + 8 hours
3. in the webapp: create a new dashboard (click on Dashboard menu -> New Dashboard)
4. select Resource Metric Graph or Resource Group Metric in the Add Portlet combo
5. click on the Edit icon placed in the right top corner of the new portlet
6. choose some resource (i.e Datasource) in the Resource combo (i.e. DefaultDS)
7. choose any of the available options in the Metric combo (i.e. Available Connection Count)
8. click on save button
Graph with no data points
Graph with data points from the last 8 hours (no matter what time is on machine, where the browser is running)
time: Tue Sep 18 14:53:48 2012 +0200
author: Jirka Kremser - email@example.com
message: [BZ 848494 - Metric graphs on dashboards uses the client's time for obtaining the data] System.currentTimeMillis() is now invoked on the server side for the metric graphs
Bulk closing of items that are on_qa and in old RHQ releases, which are out for a long time and where the issue has not been re-opened since.