Bug 642543

Summary: Double click on 'Import' of 'Discovery Queue' gives - Failed to import resources
Product: [Other] RHQ Project Reporter: Rajan Timaniya <rtimaniy>
Component: Core UIAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Corey Welton <cwelton>
Severity: medium Docs Contact:
Priority: low    
Version: 4.0.0CC: ian.springer, mfoley
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
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:
Embargoed:
Bug Depends On:    
Bug Blocks: 585306    
Attachments:
Description Flags
screenshot
none
server log none

Description Rajan Timaniya 2010-10-13 09:47:26 UTC
Created attachment 453147 [details]
screenshot

Description of problem:
Double click on 'Import' of 'Discovery Queue' gives - Failed to import resources.

Server log:
2010-10-13 14:47:11,753 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/coregui]] Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract void org.rhq.enterprise.gui.coregui.client.gwt.ResourceGWTService.importResources(java.lang.Integer[])' threw an unexpected exception: java.lang.RuntimeException: javax.ejb.EJBException:java.lang.IllegalArgumentException: Can only commit resources with status: [COMMITTED] -> java.lang.IllegalArgumentException:Can only commit resources with status: [COMMITTED]
        at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:378)
        at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:581)
...


Note: 'Import button is enable even there isn't any resource in 'Discovery Queue'  and on-click of 'Import' RHQ gives message - Successfully imported the selected resources

Version-Release number of selected component (if applicable):
RHQ-Master build#409
http://hudson-qe.rhq.rdu.redhat.com:8080/view/RHQ/job/ci-rhq-master/409/

How reproducible:
Always

Steps to Reproduce:
1) Install RHQ Server
2) Log-in to RHQ
3) Install RHQ Agent (wait for some time to discover resources)
4) Double click on 'Import' button of 'Discovery Queue' 
  
Actual results:
Double click on 'Import' of 'Discovery Queue' gives - Failed to import resources.

Expected results:
After single click of 'Import', RHQ should disable the 'Import' button until new resource(s) not discovered. 

Additional info:
Please refer attachment for screenshot and server log.

Comment 1 Rajan Timaniya 2010-10-13 09:54:50 UTC
Created attachment 453150 [details]
server log

Comment 2 Ian Springer 2011-02-16 22:17:42 UTC
With commit 2751f05 to master, all of the buttons are disabled as soon as the user clicks one of the buttons. This should make it virtually impossible for anyone other than Tommy to double-click one of the buttons.

Comment 3 Mike Foley 2011-04-15 20:24:35 UTC
verified through interactive testing.

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

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

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