Bug 698100

Summary: Can not add metric to graphs area
Product: [Other] RHQ Project Reporter: Heiko W. Rupp <hrupp>
Component: Core UIAssignee: Simeon Pinder <spinder>
Status: CLOSED CURRENTRELEASE QA Contact: Corey Welton <cwelton>
Severity: high Docs Contact:
Priority: urgent    
Version: 4.0.0.Beta2CC: hrupp, mazz, mfoley, spinder
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-24 01:13:24 UTC Type: ---
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: 678340, 703268    
Attachments:
Description Flags
Screenshot none

Description Heiko W. Rupp 2011-04-20 08:11:56 UTC
Take a metric that is not shown and add it to Monitoring->Graphs. This is not possible.
Context menu on the tree only allows to add to the dashboard.

Comment 1 Heiko W. Rupp 2011-04-20 09:17:23 UTC
Workaround (NOT !) :

Click on the metric in the summary->metrics tab to go to the big chart. Then on the upper left corner, click on the resource name and end up in the old UI.

Then use the context menu in the tree to add the metric to the graphs.

Then click on the jboss logo in the upper left corner in the menu bar to return to the GWT ui. Or stay in the JSF UI and enjoy that switching to the monitoring tab does not take a long time to load.

Comment 2 Simeon Pinder 2011-04-28 23:13:11 UTC
I looked into this a little bit. There are a few things to note:

i)the Save Chart to dash was removed recently from the legacy JSF application. Will need to re-enabled in someway or exposed via different functionality(preferable).  Probably from Res|Group>Monitor>Table view as an extra button.

ii)As the Dashboard mechanism is no longer global but customizable, then on "Saving to Dashboard" the new mechanism needs to allow the user to choose which of the 'dashboards' his chart is to be saved to.

iii)As there is no current portlet to display saved charts, this new portlet would need to be created.  This should not be difficult, but the existing 'Saved Charting' JSF mechanism is fairly clunky and would need work/modification. Probably need a rewrite here to provide better naming for a saved chart or cleaner handling of duplicates.  

iv)Preferences were global to the user and would now need to be saved into the specific dashboard instances.

At least a couple hours work.  How popular was this feature? Worthy of the revamp?

Comment 3 Heiko W. Rupp 2011-04-29 09:46:59 UTC
Created attachment 495741 [details]
Screenshot

This is not meant about how to add the metric to a Dashboard on the Dashboard page (which I think will now make much more sense than ever before, but lets discuss that separately).

This issue is about not being able to add any metric to the graphs section on the monitoring tab.
See the screenshot

Comment 4 Simeon Pinder 2011-04-29 15:14:00 UTC
Thaks Heiko. Now I see. I also looked into this and we're going to want to create a GWT interface for MeasurementViewManagerBean to get started. After that a few more hours work I think.  I'll start looking into this.

Comment 5 Simeon Pinder 2011-05-04 23:25:57 UTC
Fixed with commit to master: 
9b9ae763ce51e

Instead of duplicating the functionality via GWT, it was easier to rebuild the portal.war requests and submit them to directly to portal.war followed by a view refresh. 

This took several iterations to get right. 

-Additionally pruned out some Traits that were bing listed under the Measurements/Metrics section.
-Additionally alphabetized the Measurement/Operations/Import menu lists.

Moving this to ON_QA.

Comment 6 Simeon Pinder 2011-05-05 19:42:36 UTC
There was one more issue that needed to be addressed with autogroups.  I made the fixes and squashed all commits down into this commit hash instead:

cf96f1f4792a405f

All previous comments still apply.

Comment 7 Charles Crouch 2011-05-09 20:43:10 UTC
(3:40:48 PM) spinder: ccrouch: regarding BZ 698100, I added that commit hash to that BZ and then found one more bug before successfully pushing to master. The next comment on that BZ has the updated/correct commit hash where I squashed changes into one commit for easier cherrypicking.
(3:41:38 PM) ccrouch: spinder: so this is the only commit right
(3:41:39 PM) ccrouch: http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commit;h=cf96f1f4792a405f99a51f40adf4025794db4dd5
(3:42:07 PM) spinder: ccrouch: yes.  

This fix did not make it into rhq4, so will be considered for triage for rhq 4.0.1

Comment 8 Heiko W. Rupp 2011-05-10 14:55:10 UTC
Works for me in master, but refresh takes a long time (because of the embedded jsf ) - we may add this to release notes.

Comment 9 Heiko W. Rupp 2011-05-10 15:12:56 UTC
(In reply to comment #8)
> Works for me in master, but refresh takes a long time (because of the embedded
> jsf ) - we may add this to release notes.

It works on Firefox for me, but not on chrome.

Comment 10 Heiko W. Rupp 2011-05-10 15:14:49 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > Works for me in master, but refresh takes a long time (because of the embedded
> > jsf ) - we may add this to release notes.
> 
> It works on Firefox for me, but not on chrome.

And now with Chrome too . We need a good explanation on how to clean caches

Comment 11 John Mazzitelli 2011-05-10 16:39:27 UTC
cherry picked cf96f1f4792a405f to the release-4.0.0 branch, commit d3b9181df416bfb018b18ba102d92229970e948b

Comment 12 Mike Foley 2011-05-12 12:25:21 UTC
documenting that i observed bz 703515 while verifying this.  the display area for monitoring--->graphs is very small ... like a slit.

Comment 13 Mike Foley 2011-05-12 12:28:24 UTC
also verified right-click context menu adding graphs to dashboard.  discussed with heiko.  even though there are issues here (ie, 703515) i am going to mark this verified and deal with the other issue on the chaser bz.

Comment 14 Corey Welton 2011-05-24 01:13:23 UTC
Bookkeeping - closing bug - fixed in recent release.

Comment 15 Corey Welton 2011-05-24 01:13:24 UTC
Bookkeeping - closing bug - fixed in recent release.

Comment 16 Corey Welton 2011-05-24 01:13:24 UTC
Bookkeeping - closing bug - fixed in recent release.