Bug 753959

Summary: Adding a dashboard incorrectly adds items to the right-click context submenus for adding graphs
Product: [Other] RHQ Project Reporter: Mike Foley <mfoley>
Component: Core UIAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.2CC: hrupp, mazz
Target Milestone: ---   
Target Release: JON 3.0.0, RHQ 4.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
image documenting the verification none

Description Mike Foley 2011-11-14 23:08:41 UTC
Description of problem:  Adding a dashboard incorrectly adds items to the right-click context submenus for adding graphs


Version-Release number of selected component (if applicable):
jon 3

How reproducible:

mazz, myself, charles

Steps to Reproduce:
1.  platforms ... with the monitoring tab selected
2.  view the right-click context menu for adding graphs
3.  add a dashboard
4.  view the right-click context menu ... the number of items on the submenu for measurements has doubled
  
Actual results:
number of items on submenu for measurements increases incorrectly when you add dashboards

Expected results:
number of items on submenu does not increase

Additional info:
<mazz> cannot add non-summary metric graphs via resource tree context menu unless you have visited the dashboard page first
<mazz> that's what the summary is
<ccrouch> mazz: because one of the options is "Add graph to dashboard [x]"
<mazz> ok. 
<mazz> I see.
<ccrouch> but there is another bug
<ccrouch> add two dashboards
<ccrouch> and you get
<ccrouch> Add graph to dashboard [x]
<ccrouch> Add graph to metric view
<ccrouch> Add graph to dashboard [y]
<ccrouch> Add graph to metric view
<ccrouch> so its looping over too much
<mazz> so the dup "graph to metriv view"
<mazz> yeah, I think I see that in the code
<ccrouch> do you mind if I try to delete you Default dashboard mazz :-)
<mazz> go ahead
<mazz> I'm not doing anything here at the moment
<mazz> I think I see the code that's doing this
<ccrouch> ha
<ccrouch> it bounces right back :-)
<mazz> I think that "Add Graph to Monitor View" is inside the for loop
<ccrouch> yep
<mazz> when it should be outside of it

Comment 1 John Mazzitelli 2011-11-14 23:22:54 UTC
git commit:
master : 36a26861294cc2ed1a47ec39c3e5bdac3722ecc6
release_jon3.x : c6e550f9da09dc3d418fcf6fee2fd99803ee48b2

Comment 2 Mike Foley 2011-11-15 17:03:55 UTC
Created attachment 533805 [details]
image documenting the verification

Comment 3 Mike Foley 2011-11-15 17:04:15 UTC
verified.  attached image to document the verification

Comment 4 Mike Foley 2012-02-07 19:25:27 UTC
marking VERIFIED JON 3 bugs to CLOSED/CURRENTRELEASE

Comment 5 Mike Foley 2012-02-07 19:29:21 UTC
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE