Bug 846818

Summary: Dashboard Resource Metric Graph portlet allows invalid resource/resource ID to be used
Product: [JBoss] JBoss Operations Network Reporter: Larry O'Leary <loleary>
Component: UIAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: unspecified    
Version: JON 3.1.0CC: ahovsepy, hrupp
Target Milestone: ER01   
Target Release: JON 3.2.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-02 20:33:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
dashboard.png none

Description Larry O'Leary 2012-08-08 19:44:33 UTC
Description of problem:
When modifying (or setting) the resource and metric for the Resource Metric Graph portlet on the Dashboard, the user is able to enter any value they like. The result is the dashboard becomes inactive/unusable and does not load and produced the following message in the message center:

Message :	Globally uncaught exception
Severity :	Error
Detail :	

java.lang.NumberFormatException:For input string: "app"
--- STACK TRACE FOLLOWS ---
For input string: "app"
   at Unknown.java_lang_NumberFormatException_$NumberFormatException__Ljava_lang_NumberFormatException_2Ljava_lang_String_2Ljava_lang_NumberFormatException_2(Unknown source:0)
   at Unknown.java_lang_Number__1_1parseAndValidateInt__Ljava_lang_String_2IIII(Unknown source:0)
   at Unknown.org_rhq_enterprise_gui_coregui_client_dashboard_portlets_inventory_resource_graph_ResourceGraphPortlet_$configure__Lorg_rhq_enterprise_gui_coregui_client_dashboard_portlets_inventory_resource_graph_ResourceGraphPortlet_2Lorg_rhq_enterprise_gui_coregui_client_dashboard_PortletWindow_2Lorg_rhq_core_domain_dashboard_DashboardPortlet_2V(Unknown source:0)
   at Unknown.org_rhq_enterprise_gui_coregui_client_dashboard_portlets_inventory_resource_graph_ResourceGraphPortlet_configure__Lorg_rhq_enterprise_gui_coregui_client_dashboard_PortletWindow_2Lorg_rhq_core_domain_dashboard_DashboardPortlet_2V(Unknown source:0)
   at Unknown.org_rhq_enterprise_gui_coregui_client_dashboard_PortletFactory_buildPortlet__Ljava_lang_String_2Lorg_rhq_enterprise_gui_coregui_client_dashboard_PortletWindow_2Lorg_rhq_core_domain_dashboard_DashboardPortlet_2Lorg_rhq_core_domain_common_EntityContext_2Lorg_rhq_enterprise_gui_coregui_client_dashboard_Portlet_2(Unknown source:0)
   at Unknown.org_rhq_enterprise_gui_coregui_client_dashboard_PortletWindow_onInit__V(Unknown source:0)
   at Unknown.com_smartgwt_client_widgets_BaseWidget_doInit__V(Unknown source:0)
   at Unknown.com_smartgwt_client_widgets_Window_create__Lcom_google_gwt_core_client_JavaScriptObject_2(Unknown source:0)
   at Unknown.com_smartgwt_client_widgets_BaseWidget_$getOrCreateJsObj__Lcom_smartgwt_client_widgets_BaseWidget_2Lcom_google_gwt_core_client_JavaScriptObject_2(Unknown source:0)
   at Unknown.com_smartgwt_client_widgets_layout_Layout_$addMember__Lcom_smartgwt_client_widgets_layout_Layout_2Lcom_smartgwt_client_widgets_Canvas_2V(Unknown source:0)
   at Unknown.org_rhq_enterprise_gui_coregui_client_dashboard_PortalLayout_$addPortletWindow__Lorg_rhq_enterprise_gui_coregui_client_dashboard_PortalLayout_2Lorg_rhq_enterprise_gui_coregui_client_dashboard_PortletWindow_2ILorg_rhq_enterprise_gui_coregui_client_dashboard_PortalColumn_2(Unknown source:0)
   at Unknown.org_rhq_enterprise_gui_coregui_client_dashboard_DashboardView_$loadPortletWindows__Lorg_rhq_enterprise_gui_coregui_client_dashboard_DashboardView_2V(Unknown source:0)
   at Unknown.org_rhq_enterprise_gui_coregui_client_dashboard_DashboardView_$buildPortlets__Lorg_rhq_enterprise_gui_coregui_client_dashboard_DashboardView_2V(Unknown source:0)
   at Unknown.org_rhq_enterprise_gui_coregui_client_dashboard_DashboardView_onInit__V(Unknown source:0)
   at Unknown.com_smartgwt_client_widgets_BaseWidget_doInit__V(Unknown source:0)
   at Unknown.com_smartgwt_client_widgets_layout_VLayout_create__Lcom_google_gwt_core_client_JavaScriptObject_2(Unknown source:0)
   at Unknown.com_smartgwt_client_widgets_BaseWidget_$getOrCreateJsObj__Lcom_smartgwt_client_widgets_BaseWidget_2Lcom_google_gwt_core_client_JavaScriptObject_2(Unknown source:0)
   at Unknown.org_rhq_enterprise_gui_coregui_client_dashboard_DashboardsView_$updateDashboards__Lorg_rhq_enterprise_gui_coregui_client_dashboard_DashboardsView_2Ljava_util_List_2V(Unknown source:0)
   at Unknown.org_rhq_enterprise_gui_coregui_client_dashboard_DashboardsView$1$1_onPermissionsLoaded__Ljava_util_Set_2V(Unknown source:0)
   at Unknown.org_rhq_enterprise_gui_coregui_client_PermissionsLoader$1_onSuccess__Ljava_lang_Object_2V(Unknown source:0)
   at Unknown.com_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_$onResponseReceived__Lcom_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_2Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V(Unknown source:0)
   at Unknown.org_rhq_enterprise_gui_coregui_client_util_rpc_TrackingRequestCallback_onResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V(Unknown source:0)
   at Unknown.com_google_gwt_http_client_Request_$fireOnResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_RequestCallback_2V(Unknown source:0)
   at Unknown.com_google_gwt_http_client_RequestBuilder$1_onReadyStateChange__Lcom_google_gwt_xhr_client_XMLHttpRequest_2V(Unknown source:0)
   at Unknown.anonymous(Unknown source:0)
   at Unknown.com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(Unknown source:0)
   at Unknown.anonymous(Unknown source:0)
   at Unknown.anonymous(Unknown source:0)


Version-Release number of selected component (if applicable):
JON 3.1.0

How reproducible:
Always

Steps to Reproduce:
1. Add a Resource Metric Graph portlet to the Dashboard
2. Edit the portlet settings and instead of selecting a Resource from the resource list, type in a resource name or any arbitrary value (such as abc) which is not a number
3. Enter any numeric value for Metric (this can also be any non numeric value and the same error will occur)
4. Save the changes
  
Actual results:
After the portlet settings have been saved, the Dashboard no longer loads and the message center indicated "Globally uncaught exception"

Expected results:
The save of the portlet settings should fail due to invalid data (or perhaps the edit field should now allow manually input)

Comment 1 mark yarborough 2012-11-06 20:05:11 UTC
Per 3.1.2 triage with loleary, mfoley, ccrouch, asantos: Okay to move to JON 3.2.

Comment 2 Heiko W. Rupp 2013-08-09 16:21:32 UTC
Looks like Bug 918051, which was fixed in master June 19th, 2013.
Corresponding JON Bug is Bug 975585

Comment 3 Heiko W. Rupp 2013-08-09 16:22:51 UTC
*** Bug 975585 has been marked as a duplicate of this bug. ***

Comment 4 Armine Hovsepyan 2013-09-20 16:00:08 UTC
Created attachment 800561 [details]
dashboard.png

Comment 5 Armine Hovsepyan 2013-09-20 16:02:55 UTC
verified
if not existing resource name is typed empty resource name is stored -> leading to "click the settings button to configure this portlet" message on portlet.
No globally uncaught exception and no exceptions in neither server nor agent logs.