Bug 848494 - Metric graphs on dashboards uses the client's time for obtaining the data
Metric graphs on dashboards uses the client's time for obtaining the data
Product: RHQ Project
Classification: Other
Component: Core UI (Show other bugs)
All All
medium Severity medium (vote)
: ---
: RHQ 4.5.0
Assigned To: Jirka Kremser
Mike Foley
Depends On:
  Show dependency treegraph
Reported: 2012-08-15 14:46 EDT by Jirka Kremser
Modified: 2013-09-01 06:19 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-09-01 06:19:20 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jirka Kremser 2012-08-15 14:46:29 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):

How reproducible:

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
Actual results:
Graph with no data points

Expected results:
Graph with data points from the last 8 hours (no matter what time is on machine, where the browser is running)
Comment 1 Jirka Kremser 2012-09-18 08:56:07 EDT

time:    Tue Sep 18 14:53:48 2012 +0200
commit:  6314bfb9675380bd8d4194800b54f608bf00acda
author:  Jirka Kremser - jkremser@redhat.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
Comment 2 Heiko W. Rupp 2013-09-01 06:19:20 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.