Bug 848494 - Metric graphs on dashboards uses the client's time for obtaining the data
Summary: Metric graphs on dashboards uses the client's time for obtaining the data
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Core UI
Version: 4.4
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: RHQ 4.5.0
Assignee: Jirka Kremser
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-15 18:46 UTC by Jirka Kremser
Modified: 2013-09-01 10:19 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-09-01 10:19:20 UTC
Embargoed:


Attachments (Terms of Use)

Description Jirka Kremser 2012-08-15 18:46:29 UTC
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):
RHQ 4.5.0-SNAPSHOT

How reproducible:
always

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 12:56:07 UTC
http://git.fedorahosted.org/cgit/rhq/rhq.git/diff/?id=6314bfb

master
time:    Tue Sep 18 14:53:48 2012 +0200
commit:  6314bfb9675380bd8d4194800b54f608bf00acda
author:  Jirka Kremser - jkremser
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 10:19:20 UTC
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.