Red Hat Bugzilla – Bug 894319
Globally uncaught exception on navigating a resource after adding 'Resource Metric Graph' portlet to dashboard
Last modified: 2013-09-11 07:04:35 EDT
Description of problem:
Added 'Resource Metric Graph' portlet to the dashboard, selected and saved a resource and metric for the portlet and navigated to platform or any resource in inventory. It displays Globally uncaught exception in UI after clicking the resource in inventory.
Please refer the screenshot and attachment for the error details as displayed in message center.
No errors in server/agent logs.
Tried deleting the portlet from dashboard and again navigating to a resource in inventory. It still shows the exception.
Version-Release number of selected component (if applicable):
JON Version: JON 3.1.2.CR2
Build Number: 74de575:bca49e0
Browsers: Firefox 10, IE8 and IE9
Database: Postgres 8.4.2
Steps to Reproduce:
1. Login to JON
2. Navigate to Dashboard menu
3. Click on 'New Dashboard' button or 'Edit Mode' for default dashboard.
4. Add portlet 'Resource Metric Graph'
5. Click on icon for setting in the 'Resource Metric Graph' portlet.
6. Select any resource ( Ex: RHQ Agent )
7. Select any metric ( Ex: Total number of commands received per minute )
8. Click on 'Save' button.
9. Navigate to 'Inventory' menu.
10. Click on 'Resources->Platforms'
11. Click on the platform resource.
12. It displays 'Globally uncaught exception'
Globally uncaught exception on navigating a resource after adding 'Resource Metric Graph' portlet to dashboard.
Exception should not be displayed.
1. The exception also occurs after adding 'Resource Group Metric Graph' portlet to dashboard. ( Add the portlet to dashboard, select and save a resource and metric for the portlet and navigate to platform or any other resource in inventory.)
2. The exception does not occur in JON 3.1.1 GA build.
Created attachment 676836 [details]
Created attachment 676837 [details]
I have characterized this a bit more...
This bug occurs when you move from Dashboard to Inventory Detail view only if the dashboard contains Resource Metric Graphs that are configured (with metrics).
And the workaround is to refresh the page. The application is stable until the above condition is met again.
In effort to narrow down the offending commit from 3.1.1 to 3.1.2. I have found that the commit b9d4a5f introduces a new version of gflot (along with jquery, excanvas and sparklines). Consistent with the above behavior described, when you visit a gflot screen and then try to goto a screen with sparklines the erroneous behavior occurs.
I was clued into this because the bug was stateful and not consistent. It takes a view of the Dashboard with a populated Resource Metric Graph to setup the condition for sparkline graphs to error out.
If I take 3.1.2 CR1 and revert the above commit everything is fine (without the functionality that the commit fixes).
This issue also exists in resource level dashboard and compatible group dashboard.
( Resource/Group->Summary->activity->Edit Mode->Add Resource Metric Graph portlet->select and save a resource and metric for the portlet and navigate to platform or any other resource in inventory.)
This bug is related to bug 852837.
per BZ triage, the fix for this will be targetted in JON 3.1.2 CR3
By backing out BZ 852837 with 2 commits b9d4a5f and 8000e71 this problem no longer occurs. BZ 852837 creates this problem so by backing it out this BZ never occurs.
Just needs to be verified with QE that the problem no longer occurs.
I've re-reverted the commits d069824b5 and 037e48a28 and pushed commit 8c1226a9b that solve both bugs. I was jQuery conflict (again). We should get rid of Gflot in the future.
fixed in release/jon3.1.x
time: Tue Jan 15 19:40:05 2013 +0100
author: Jirka Kremser - firstname.lastname@example.org
message: [BZ 894319 - Globally uncaught exception on navigating a resource after adding 'Resource Metric Graph' portlet to dashboard] Gflot now doesn't use its own version of jQuery. This bug was caused by the fact that Gflot lazily loads the jQuery to the page, so if user visited the dashboard before the page when Sparkline is used (resource summary tab), the exception was thrown. (cherry-picked from 5adfb817554307a6615e25cb6f952e1c1e9025bd, BZ 895664)
Moving this to ON_QA since available for test in ER3.
VERIFIED in JON 3.1.2
Verified on JON 3.1.2 CR3 build.
Verified on main dashboard, resource level and compatible group level ..verified on Firefox 10, IE8 and IE9. The exception does not exist.