Bug 1043803 - Gadget web: Call trace gadget cant refresh
Summary: Gadget web: Call trace gadget cant refresh
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: RT Governance
Version: 6.0.0 GA
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: CR1
: 6.0.0
Assignee: Nick Cross
QA Contact: Andrej Vano
URL:
Whiteboard:
: 1044488 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-17 08:53 UTC by Andrej Vano
Modified: 2014-02-06 15:27 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-06 15:27:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Andrej Vano 2013-12-17 08:53:24 UTC
Description of problem:
On fresh install of ER7-2 is the call trace gadget not working properly - in the JS console is logged that the object 'data.tasks' is undefined. The call traces does not appear in the widget until restart of the application server. All the call traces are visible via REST API but it seems the gadget can't refresh itself

Tested on Firefox 26

Version-Release number of selected component (if applicable):
6.0.0.ER7-2

How reproducible: 100%


Steps to Reproduce:
1. default install ER7-2
2. set collectionEnabled = true
3. deploy ordermgmt, ordermgmt-ip
4. add call trace widget to page, set id to "1"
5. execute mvn exec:java -Dreq=order1 -Dcount=10
6. nothing appears in call trace widget (all other gadgets will show the information) - if you manually refresh it by setting the "id" again to 1


when you do this:
1. deploy ordermgmt, ordermgmt-ip
2. mvn exec:java -Dreq=order1 -Dcount=10
3. then add call trace gadget and set the id to 1

all the 10 request will be shown but any new call traces afterwards are displayed


Actual results: after restarting AS and accessing gadget web again, the call traces are displayed but any new call traces are displayed (you have to restart the AS again)


Expected results:


Additional info:
JavaScript errors logged into firebug console: 

TypeError: data.tasks is undefined (http://localhost:8080/gadget-web/gadgets/ifr?url=http://localhost:8080/gadgets/calltrace-gadget/gadget.xml&view=home&value=4 , line 87)
treeData = new Array(data.tasks.length);

TypeError: c.tabs is undefined (http://localhost:8080/gadget-web/gadgets/js/dynamic-height:setprefs:core:tabs!core:rpc.js?container=default&nocache=0&debug=0&c=0&v=ed29d4a6219330cd21ba8081cdd7686a&jsload=0 , line 4)
....config.register("tabset",{},function(c){gadgets.TabSet.addCSS_(c.tabs.css.join(...

Comment 2 Eric Wittmann 2013-12-17 19:15:58 UTC
The gadget was making an RPC call via the gadget IO api without specifying a refresh interval (amount of time the gadget framework should cache the data).  The default is 1 hour - so the data was being cached for that long.

I have fixed this by adding a 5 second hard coded caching timeout for the data.

Comment 3 kconner 2013-12-18 14:18:07 UTC
*** Bug 1044488 has been marked as a duplicate of this bug. ***

Comment 4 Andrej Vano 2014-01-06 09:30:45 UTC
Hello Eric,

unfortunately the call trace gadget is not refreshing on ER8. The behavior and the steps to reproduce are the same as in the bug description.

Comment 5 Eric Wittmann 2014-01-06 15:22:59 UTC
It looks like my bug fix didn't make it into the ER8 build.  I'm not certain why.  The relevant commit is here:

https://github.com/jboss-integration/rtgov/commit/a2339d86505a32a01b4e1d23579137b4f5269df6

And I've confirmed that the rtgov ER8 tag contains the fix:

https://github.com/jboss-integration/rtgov/blob/1.0.0.Final-ip6.0-ER8/modules/gadgets/src/main/webapp/calltrace-gadget/gadget.xml#L53

However, when I look at the gadget.xml file that actually gets deployed when installing ER8, that line of code is missing.

Perhaps I/we failed to communicate the new tag name to the prod team.

Assigning this to ncross.

@ncross: the rtgov tag for ER8 is:  1.0.0.Final-ip6.0-ER8

Comment 6 Nick Cross 2014-01-07 11:37:34 UTC
Not sure why we missed that ; updated tag in builder.cfg with SHA 4e92ae0b8ca231267bc98880971be3c262247469.

Comment 7 Andrej Vano 2014-01-15 07:41:41 UTC
Hi Eric,

just a question - is the call trace gadget supposed to refresh automatically? In the past there was a refresh period box in the settings of call trace widget and this setting is missing in the last few versions.

Comment 8 Eric Wittmann 2014-01-15 12:47:26 UTC
We made the decision to remove the automatic refresh feature from the calltrace gadget because it would reset the tree every time the refresh happened.  This was not a good user experience.  It's also not great that it has to be manually refreshed, but it was the lesser of two evils.

Comment 9 Andrej Vano 2014-01-15 13:47:48 UTC
Hello,

thanks for the info. The call trace gadget is working now (with manual refreshing).

(CR1)


Note You need to log in before you can comment on or make changes to this bug.